diff options
Diffstat (limited to 'src/game/WorldSession.cpp')
-rw-r--r-- | src/game/WorldSession.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/game/WorldSession.cpp b/src/game/WorldSession.cpp index f2e08969a96..eb2612a1543 100644 --- a/src/game/WorldSession.cpp +++ b/src/game/WorldSession.cpp @@ -249,6 +249,12 @@ void WorldSession::LogoutPlayer(bool Save) if (_player) { + // Unpossess the current possessed unit of player + _player->StopCharmOrPossess(); + + // Remove any possession of this player on logout + _player->RemoveCharmedOrPossessedBy(NULL); + if (uint64 lguid = GetPlayer()->GetLootGUID()) DoLootRelease(lguid); @@ -370,13 +376,6 @@ void WorldSession::LogoutPlayer(bool Save) if(_player->GetGroup() && !_player->GetGroup()->isRaidGroup() && m_Socket) _player->RemoveFromGroup(); - // Unpossess the current possessed unit of player - if (_player->isPossessing()) - _player->RemovePossess(false); - - // Remove any possession of this player on logout - _player->UnpossessSelf(false); - ///- 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 |