From d00125abe1e70f09e39e376b17b99b8199351367 Mon Sep 17 00:00:00 2001 From: nytmyr <53322305+nytmyr@users.noreply.github.com> Date: Sun, 16 Mar 2025 18:12:48 -0500 Subject: [PATCH] [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. --- zone/bot.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/zone/bot.cpp b/zone/bot.cpp index cebe4aac4..c2304518b 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -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;