aboutsummaryrefslogtreecommitdiff
path: root/src/game/WorldSession.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/WorldSession.cpp')
-rw-r--r--src/game/WorldSession.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/game/WorldSession.cpp b/src/game/WorldSession.cpp
index f4e4e1c1d46..d8f5c8877cb 100644
--- a/src/game/WorldSession.cpp
+++ b/src/game/WorldSession.cpp
@@ -366,6 +366,13 @@ 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