[Crash] Bot aura crash fix (#4752)

- Something between the latest release caused this crash to appear, unsure of this exact cause.
- Prevents bots from being sent a spawn packet for Auras.
- Removes the bot's auras on Depop
This commit is contained in:
nytmyr 2025-03-06 00:12:24 -06:00 committed by GitHub
parent 5a1df38900
commit da824d5178
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View File

@ -690,12 +690,16 @@ void Aura::ProcessSpawns()
continue;
}
if (!e.second->IsOfClientBot()) {
if (!e.second->IsClient()) {
continue;
}
auto c = e.second->CastToClient();
if (!c) {
continue;
}
bool spawned = spawned_for.find(c->GetID()) != spawned_for.end();
if (ShouldISpawnFor(c)) {
if (!spawned) {

View File

@ -3615,6 +3615,7 @@ void Bot::BotPullerProcess(Client* bot_owner, Raid* raid) {
void Bot::Depop() {
WipeHateList();
entity_list.RemoveFromHateLists(this);
RemoveAllAuras();
if (HasPet())
GetPet()->Depop();