feat (core): Add Teleport Helpers (#10611)

* feat (core): Add Teleport Helpers

* Lower case the things
This commit is contained in:
acidmanifesto
2022-02-09 20:54:46 -05:00
committed by GitHub
parent 759b945a13
commit c50f7feda0
2 changed files with 7 additions and 0 deletions

View File

@@ -220,6 +220,7 @@ Player::Player(WorldSession* session): Unit(true), m_mover(this)
m_bMustDelayTeleport = false;
m_bHasDelayedTeleport = false;
teleportStore_options = 0;
m_canTeleport = false;
m_trade = nullptr;
@@ -1463,6 +1464,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
// near teleport, triggering send MSG_MOVE_TELEPORT_ACK from client at landing
if (!GetSession()->PlayerLogout())
{
SetCanTeleport(true);
Position oldPos = GetPosition();
Relocate(x, y, z, orientation);
SendTeleportAckPacket();
@@ -1565,6 +1567,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
if (!GetSession()->PlayerLogout())
{
SetCanTeleport(true);
WorldPacket data(SMSG_NEW_WORLD, 4 + 4 + 4 + 4 + 4);
data << uint32(mapid);
if (m_transport)