[Bots] Charmed Pets were breaking Mob respawns (#4780)

- When bots would charm a pet, once they zoned or camped the pet would poof and not trigger a respawn so the NPC which was charmed would never respawn until the zone was shut down or server restarted.
This commit is contained in:
nytmyr 2025-03-16 18:12:48 -05:00 committed by GitHub
parent 5d69235a4c
commit d00125abe1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3578,8 +3578,16 @@ void Bot::Depop() {
entity_list.RemoveFromHateLists(this);
RemoveAllAuras();
if (HasPet())
GetPet()->Depop();
Mob* bot_pet = GetPet();
if (bot_pet) {
if (bot_pet->Charmed()) {
bot_pet->BuffFadeByEffect(SE_Charm);
}
else {
bot_pet->Depop();
}
}
_botOwner = nullptr;
_botOwnerCharacterID = 0;