[9284] Realy fixed crash source added in [9228] now.

This commit is contained in:
VladimirMangos 2010-02-02 14:51:53 +03:00
parent 868a4d20a4
commit 66c8c75914
4 changed files with 11 additions and 7 deletions

View file

@ -1251,12 +1251,14 @@ void Group::_setLeader(const uint64 &guid)
CharacterDatabase.CommitTransaction();
}
uint32 old_guidlow = m_leaderGuid;
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);
sObjectMgr.UpdateGroup(old_guidlow,this);
}