mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[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:
parent
f2406c1962
commit
9b3d37f0cf
9 changed files with 189 additions and 190 deletions
|
|
@ -379,11 +379,13 @@ void WorldSession::LogoutPlayer(bool Save)
|
|||
LoginDatabase.PExecute("UPDATE account SET active_realm_id = 0 WHERE id = '%u'", GetAccountId());
|
||||
|
||||
///- If the player is in a guild, update the guild roster and broadcast a logout message to other guild members
|
||||
Guild *guild = sObjectMgr.GetGuildById(_player->GetGuildId());
|
||||
if(guild)
|
||||
if (Guild *guild = sObjectMgr.GetGuildById(_player->GetGuildId()))
|
||||
{
|
||||
guild->SetMemberStats(_player->GetGUID());
|
||||
guild->UpdateLogoutTime(_player->GetGUID());
|
||||
if (MemberSlot* slot = guild->GetMemberSlot(_player->GetObjectGuid()))
|
||||
{
|
||||
slot->SetMemberStats(_player);
|
||||
slot->UpdateLogoutTime();
|
||||
}
|
||||
|
||||
guild->BroadcastEvent(GE_SIGNED_OFF, _player->GetGUID(), _player->GetName());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue