Core/Players: Allow teleporting to a specific instance id

This commit is contained in:
Shauren
2022-05-14 20:40:24 +02:00
parent 19b052d939
commit 25c0aaa83f
5 changed files with 31 additions and 13 deletions

View File

@@ -75,7 +75,9 @@ void WorldSession::HandleMoveWorldportAck()
player->m_InstanceValid = true;
Map* oldMap = player->GetMap();
Map* newMap = sMapMgr->CreateMap(loc.GetMapId(), player);
Map* newMap = GetPlayer()->GetTeleportDestInstanceId() ?
sMapMgr->FindMap(loc.GetMapId(), *GetPlayer()->GetTeleportDestInstanceId()) :
sMapMgr->CreateMap(loc.GetMapId(), GetPlayer());
if (player->IsInWorld())
{