aboutsummaryrefslogtreecommitdiff
path: root/src/game/WorldSession.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2008-12-29 12:22:49 -0600
committermegamage <none@none>2008-12-29 12:22:49 -0600
commit35ce5ca6ba2ac8f0a70049cca652a541f2e10bec (patch)
treea7c78051aee7bf4a6c9c47b2cb8581b0cdaa69b3 /src/game/WorldSession.cpp
parentbf8c7b928fd2211661a5e83146d6522825e2218d (diff)
*Update to Mangos 6973.
--HG-- branch : trunk
Diffstat (limited to 'src/game/WorldSession.cpp')
-rw-r--r--src/game/WorldSession.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/game/WorldSession.cpp b/src/game/WorldSession.cpp
index d49fe1cda83..4697216c5dc 100644
--- a/src/game/WorldSession.cpp
+++ b/src/game/WorldSession.cpp
@@ -310,6 +310,10 @@ void WorldSession::LogoutPlayer(bool Save)
if(_player->InBattleGround())
_player->LeaveBattleground();
+ ///- Teleport to home if the player is in an invalid instance
+ if(!_player->m_InstanceValid && !_player->isGameMaster())
+ _player->TeleportTo(_player->m_homebindMapId, _player->m_homebindX, _player->m_homebindY, _player->m_homebindZ, _player->GetOrientation());
+
sOutdoorPvPMgr.HandlePlayerLeaveZone(_player,_player->GetZoneId());
for (int i=0; i < PLAYER_MAX_BATTLEGROUND_QUEUES; i++)