From 2b625bb347c68feb6a3abd61fcace755f1310d91 Mon Sep 17 00:00:00 2001 From: neckkola <65987027+neckkola@users.noreply.github.com> Date: Sat, 5 Feb 2022 20:52:34 -0400 Subject: [PATCH] Final - Bot Raid Working --- zone/bot.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/zone/bot.cpp b/zone/bot.cpp index bfd17530d..d508b7a42 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -3995,14 +3995,6 @@ void Bot::Depop() { if(HasGroup()) Bot::RemoveBotFromGroup(this, GetGroup()); - //Mitch - Raid* bot_raid = entity_list.GetRaidByBotName(this->GetName()); - if (bot_raid) { - uint32 gid = bot_raid->GetGroup(this->GetName()); - bot_raid->SendRaidGroupRemove(this->GetName(), bot_raid->GetGroup(this->GetName())); - bot_raid->RemoveMember(this->GetName()); - bot_raid->GroupUpdate(gid); - } if(HasPet()) GetPet()->Depop(); @@ -8434,7 +8426,14 @@ void Bot::Camp(bool databaseSave) { if(GetGroup()) RemoveBotFromGroup(this, GetGroup()); - + //Mitch + Raid* bot_raid = entity_list.GetRaidByBotName(this->GetName()); + if (bot_raid) { + uint32 gid = bot_raid->GetGroup(this->GetName()); + bot_raid->SendRaidGroupRemove(this->GetName(), bot_raid->GetGroup(this->GetName())); + bot_raid->RemoveMember(this->GetName()); + bot_raid->GroupUpdate(gid); + } // RemoveBotFromGroup() code is too complicated for this to work as-is (still needs to be addressed to prevent memory leaks)