Temp fix for Bot::Camp() zone crashes (memory leak still needs to be addressed)

This commit is contained in:
Uleat 2019-08-27 01:09:11 -04:00
parent c0575892cb
commit 7749f83134

View File

@ -7465,12 +7465,13 @@ void Bot::DoEnduranceUpkeep() {
void Bot::Camp(bool databaseSave) { void Bot::Camp(bool databaseSave) {
Sit(); Sit();
auto group = GetGroup(); //auto group = GetGroup();
if(group) if(GetGroup())
RemoveBotFromGroup(this, GetGroup()); RemoveBotFromGroup(this, GetGroup());
if (group->GroupCount() < 2) // RemoveBotFromGroup() code is too complicated for this to work as-is (still needs to be addressed to prevent memory leaks)
group->DisbandGroup(); //if (group->GroupCount() < 2)
// group->DisbandGroup();
LeaveHealRotationMemberPool(); LeaveHealRotationMemberPool();