Update p_raid_instance

This commit is contained in:
neckkola
2022-02-03 20:20:23 -04:00
parent 5566ea4d85
commit 5113415d5c
3 changed files with 12 additions and 9 deletions
+10 -9
View File
@@ -3994,7 +3994,15 @@ void Bot::Depop() {
entity_list.RemoveFromHateLists(this);
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();
@@ -8426,14 +8434,7 @@ 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)