mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[6972] Fixed teleporting players home at logging out in invalid instances
This commit is contained in:
parent
e2b744f016
commit
28ee9a7c39
2 changed files with 5 additions and 1 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue