[6972] Fixed teleporting players home at logging out in invalid instances

This commit is contained in:
arrai 2008-12-29 14:37:36 +01:00
parent e2b744f016
commit 28ee9a7c39
2 changed files with 5 additions and 1 deletions

View file

@ -307,6 +307,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());
for (int i=0; i < PLAYER_MAX_BATTLEGROUND_QUEUES; i++)
{
if(int32 bgTypeId = _player->GetBattleGroundQueueId(i))

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "6971"
#define REVISION_NR "6972"
#endif // __REVISION_NR_H__