From 7ba62b6ef1e23fed7da5800aaf1a0a1645b7a2b9 Mon Sep 17 00:00:00 2001 From: Hondacrx Date: Tue, 16 Dec 2025 14:03:14 -0500 Subject: [PATCH] Core/Movement: Fix teleports to transports within the same map Port From (https://github.com/TrinityCore/TrinityCore/commit/d48e97731538b01c4005cd7c73653a0f33015098) --- Source/Game/Handlers/MovementHandler.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Source/Game/Handlers/MovementHandler.cs b/Source/Game/Handlers/MovementHandler.cs index 716136939..361581a35 100644 --- a/Source/Game/Handlers/MovementHandler.cs +++ b/Source/Game/Handlers/MovementHandler.cs @@ -488,20 +488,22 @@ namespace Game uint old_zone = plMover.GetZoneId(); var dest = plMover.GetTeleportDest(); + WorldLocation destLocation = new(dest.Location); - dest.Location.GetPosition(out float x, out float y, out float z, out float o); if (dest.TransportGuid.HasValue) { Transport transport = plMover.GetMap().GetTransport(dest.TransportGuid.Value); if (transport != null) { transport.AddPassenger(plMover); - plMover.m_movementInfo.transport.pos.Relocate(dest.Location.GetPosition()); + plMover.m_movementInfo.transport.pos.Relocate(destLocation); + dest.Location.GetPosition(out float x, out float y, out float z, out float o); transport.CalculatePassengerPosition(ref x, ref y, ref z, ref o); + destLocation.Relocate(x, y, z, o); } } - plMover.UpdatePosition(dest.Location, true); + plMover.UpdatePosition(destLocation, true); plMover.SetFallInformation(0, GetPlayer().GetPositionZ()); uint newzone, newarea;