mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +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())
|
if(_player->InBattleGround())
|
||||||
_player->LeaveBattleground();
|
_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++)
|
for (int i=0; i < PLAYER_MAX_BATTLEGROUND_QUEUES; i++)
|
||||||
{
|
{
|
||||||
if(int32 bgTypeId = _player->GetBattleGroundQueueId(i))
|
if(int32 bgTypeId = _player->GetBattleGroundQueueId(i))
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "6971"
|
#define REVISION_NR "6972"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue