[9282] Possible fixed crash source added in [9228]

After [9228] groups stored under leader guid keys, but group leader can change
and in result at group disband after leader change group not removed from storage.
This commit is contained in:
VladimirMangos 2010-02-02 00:43:18 +03:00
parent b85417df73
commit 742f8df025
3 changed files with 11 additions and 1 deletions

View file

@ -1253,6 +1253,11 @@ void Group::_setLeader(const uint64 &guid)
m_leaderGuid = slot->guid;
m_leaderName = slot->name;
// Non-BG groups stored in sObjectMgr with leader low-guids as keys
if (IsCreated() && !isBGGroup())
sObjectMgr.UpdateGroup(this);
}
void Group::_removeRolls(const uint64 &guid)