Add (core): SendTeleportPacket helper (#14389)

* Add (core): SendTeleportPacket helper

add helper to SendTeleportPacket

* sin hard
This commit is contained in:
M'Dic
2022-12-28 13:05:46 -05:00
committed by GitHub
parent 0a4051c4b2
commit 2850052f3e

View File

@@ -20079,7 +20079,10 @@ void Unit::SendTeleportPacket(Position& pos)
Position oldPos = { GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation() };
if (GetTypeId() == TYPEID_UNIT)
Relocate(&pos);
if (GetTypeId() == TYPEID_PLAYER)
{
ToPlayer()->SetCanTeleport(true);
}
WorldPacket data2(MSG_MOVE_TELEPORT, 38);
data2 << GetPackGUID();
BuildMovementPacket(&data2);