Core/Creatures: Update creature transport offsets when teleporting while on transport
Port From (https://github.com/TrinityCore/TrinityCore/commit/f205e50f929955e9daafb6d85d8c1f57d9c0dbdc)
This commit is contained in:
@@ -1883,6 +1883,13 @@ namespace Game.Entities
|
|||||||
moveUpdateTeleport.Status.Guid = GetGUID();
|
moveUpdateTeleport.Status.Guid = GetGUID();
|
||||||
moveUpdateTeleport.Status.Pos.Relocate(pos);
|
moveUpdateTeleport.Status.Pos.Relocate(pos);
|
||||||
moveUpdateTeleport.Status.Time = Time.GetMSTime();
|
moveUpdateTeleport.Status.Time = Time.GetMSTime();
|
||||||
|
var transportBase = GetDirectTransport();
|
||||||
|
if (transportBase != null)
|
||||||
|
{
|
||||||
|
pos.GetPosition(out float tx, out float ty, out float tz, out float to);
|
||||||
|
transportBase.CalculatePassengerOffset(ref tx, ref ty, ref tz, ref to);
|
||||||
|
moveUpdateTeleport.Status.transport.pos.Relocate(tx, ty, tz, to);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Broadcast the packet to everyone except self.
|
// Broadcast the packet to everyone except self.
|
||||||
|
|||||||
Reference in New Issue
Block a user