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

@@ -250,7 +250,7 @@ public:
// before GM
float x, y, z;
gmPlayer->GetClosePoint(x, y, z, player->GetCombatReach());
player->TeleportTo(gmPlayer->GetMapId(), x, y, z, player->GetOrientation());
player->TeleportTo(gmPlayer->GetMapId(), x, y, z, player->GetOrientation(), 0, gmPlayer->GetInstanceId());
}
return true;

View File

@@ -454,7 +454,7 @@ public:
float x, y, z;
target->GetClosePoint(x, y, z, _player->GetCombatReach(), 1.0f);
_player->TeleportTo(target->GetMapId(), x, y, z, _player->GetAbsoluteAngle(target), TELE_TO_GM_MODE);
_player->TeleportTo(target->GetMapId(), x, y, z, _player->GetAbsoluteAngle(target), TELE_TO_GM_MODE, target->GetInstanceId());
PhasingHandler::InheritPhaseShift(_player, target);
_player->UpdateObjectVisibility();
}
@@ -578,7 +578,7 @@ public:
// before GM
float x, y, z;
_player->GetClosePoint(x, y, z, target->GetCombatReach());
target->TeleportTo(_player->GetMapId(), x, y, z, target->GetOrientation());
target->TeleportTo(_player->GetMapId(), x, y, z, target->GetOrientation(), 0, map->GetInstanceId());
PhasingHandler::InheritPhaseShift(target, _player);
target->UpdateObjectVisibility();
}