[Crash] Fix dangling Group member pointers for Bots. (#3134)

* [Crash] Fix dangling Group member pointers for Bots.

* fixes for edge cases
This commit is contained in:
Aeadoin
2023-03-21 11:57:04 -04:00
committed by GitHub
parent 4fe44f4cb6
commit fe2dcb6544
5 changed files with 100 additions and 58 deletions
+1
View File
@@ -141,6 +141,7 @@ public:
bool HasGroup() final { return GetGroup() != nullptr; }
Raid* GetRaid() final { return entity_list.GetRaidByBot(this); }
Group* GetGroup() final { return entity_list.GetGroupByMob(this); }
Group* GetGroupByLeaderName() { return entity_list.GetGroupByLeaderName(GetName()); }
// Common, but informal "interfaces" with Client object
uint32 CharacterID() const { return GetBotID(); }