Core/Players: Allow teleporting to a specific instance id

This commit is contained in:
Shauren authored and Ovahlord committed 2023-01-09 11:22:58 +01:00
1 parent ce0c09b429
commit 5f8f854794
5 files changed
+31 -13

No files matched your search

+3 -1
View File
@@ -77,7 +77,9 @@ void WorldSession::HandleMoveWorldportAck()
GetPlayer()->m_InstanceValid = true;
Map* oldMap = GetPlayer()->GetMap();
Map* newMap = sMapMgr->CreateMap(loc.GetMapId(), GetPlayer());
Map* newMap = GetPlayer()->GetTeleportDestInstanceId() ?
sMapMgr->FindMap(loc.GetMapId(), *GetPlayer()->GetTeleportDestInstanceId()) :
sMapMgr->CreateMap(loc.GetMapId(), GetPlayer());
MovementInfo::TransportInfo transportInfo = GetPlayer()->m_movementInfo.transport;
if (TransportBase* transport = GetPlayer()->GetTransport())