diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/game/WorldSession.cpp | 18 | 
1 files changed, 9 insertions, 9 deletions
diff --git a/src/game/WorldSession.cpp b/src/game/WorldSession.cpp index 9ffbc8e1b4d..44bab655886 100644 --- a/src/game/WorldSession.cpp +++ b/src/game/WorldSession.cpp @@ -372,25 +372,25 @@ void WorldSession::LogoutPlayer(bool Save)          if(_player->GetGroup() && !_player->GetGroup()->isRaidGroup() && m_Socket)              _player->RemoveFromGroup(); -        ///- Remove the player from the world -        // the player may not be in the world when logging out -        // e.g if he got disconnected during a transfer to another map -        // calls to GetMap in this case may cause crashes -        if(_player->IsInWorld()) _player->GetMap()->Remove(_player, false); -        // RemoveFromWorld does cleanup that requires the player to be in the accessor -        ObjectAccessor::Instance().RemoveObject(_player); -          ///- Send update to group          if(_player->GetGroup())              _player->GetGroup()->SendUpdate();          ///- Broadcast a logout message to the player's friends          sSocialMgr.SendFriendStatus(_player, FRIEND_OFFLINE, _player->GetGUIDLow(), true); +        sSocialMgr.RemovePlayerSocial (_player->GetGUIDLow ());          ///- Delete the player object          _player->CleanupsBeforeDelete();                    // do some cleanup before deleting to prevent crash at crossreferences to already deleted data -        sSocialMgr.RemovePlayerSocial (_player->GetGUIDLow ()); +        ///- Remove the player from the world +        // the player may not be in the world when logging out +        // e.g if he got disconnected during a transfer to another map +        // calls to GetMap in this case may cause crashes +        if(_player->IsInWorld()) _player->GetMap()->Remove(_player, false); +        // RemoveFromWorld does cleanup that requires the player to be in the accessor +        ObjectAccessor::Instance().RemoveObject(_player); +          delete _player;          _player = NULL;  | 
