[11898] Prevent resetting instances while offline players are in it

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
cyberium 2012-01-31 22:09:48 +01:00 committed by Schmoozerd
parent 2836e704a8
commit 35e991d70e
4 changed files with 46 additions and 10 deletions

View file

@ -1659,6 +1659,9 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
DEBUG_LOG("Player %s is being teleported to map %u", GetName(), mapid);
}
if (Group* grp = GetGroup())
grp->SetPlayerMap(GetObjectGuid(), mapid);
// if we were on a transport, leave
if (!(options & TELE_TO_NOT_LEAVE_TRANSPORT) && m_transport)
{