Add (core): SendTeleportPacket helper (#14389)
* Add (core): SendTeleportPacket helper add helper to SendTeleportPacket * sin hard
This commit is contained in:
@@ -20079,7 +20079,10 @@ void Unit::SendTeleportPacket(Position& pos)
|
|||||||
Position oldPos = { GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation() };
|
Position oldPos = { GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation() };
|
||||||
if (GetTypeId() == TYPEID_UNIT)
|
if (GetTypeId() == TYPEID_UNIT)
|
||||||
Relocate(&pos);
|
Relocate(&pos);
|
||||||
|
if (GetTypeId() == TYPEID_PLAYER)
|
||||||
|
{
|
||||||
|
ToPlayer()->SetCanTeleport(true);
|
||||||
|
}
|
||||||
WorldPacket data2(MSG_MOVE_TELEPORT, 38);
|
WorldPacket data2(MSG_MOVE_TELEPORT, 38);
|
||||||
data2 << GetPackGUID();
|
data2 << GetPackGUID();
|
||||||
BuildMovementPacket(&data2);
|
BuildMovementPacket(&data2);
|
||||||
|
|||||||
Reference in New Issue
Block a user