[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
@@ -193,6 +193,7 @@ public:
NPC* GetRandomNPC(const glm::vec3& location = glm::vec3(0.f), float distance = 0, NPC* exclude_npc = nullptr);
Mob* GetRandomMob(const glm::vec3& location = glm::vec3(0.f), float distance = 0, Mob* exclude_mob = nullptr);
Group* GetGroupByMob(Mob* mob);
Group* GetGroupByMobName(const char* name);
Group* GetGroupByBot(Bot* bot);
bool IsInSameGroupOrRaidGroup(Client *client1, Client *client2);
Group *GetGroupByClient(Client* client);