[10378] Avoid double lookup member slot in guild operations.

Also more wide use ObjectGuid in guild code
and fixed some uint32->uint64 guid assigns.
This commit is contained in:
VladimirMangos 2010-08-19 07:35:43 +04:00
parent f2406c1962
commit 9b3d37f0cf
9 changed files with 189 additions and 190 deletions

View file

@ -4172,7 +4172,7 @@ void Player::DeleteFromDB(ObjectGuid playerguid, uint32 accountId, bool updateRe
// remove from guild
if (uint32 guildId = GetGuildIdFromDB(playerguid))
if (Guild* guild = sObjectMgr.GetGuildById(guildId))
guild->DelMember(playerguid.GetRawValue());
guild->DelMember(playerguid);
// remove from arena teams
LeaveAllArenaTeams(playerguid);