Core/Movement: Fixed formation movement resetting state on every waypoint of its leader

Port From (https://github.com/TrinityCore/TrinityCore/commit/1f62d3caaac234bca14929ec2397befe69b85900)
This commit is contained in:
Hondacrx
2025-06-08 19:05:09 -04:00
parent ccc90edf69
commit 90fbffbcc0
@@ -286,7 +286,7 @@ namespace Game.Entities
float angle = formationInfo.FollowAngle + MathF.PI; // for some reason, someone thought it was a great idea to invert relativ angles...
float dist = formationInfo.FollowDist;
if (!member.HasUnitState(UnitState.FollowFormation))
if (member.GetMotionMaster().GetCurrentMovementGeneratorType(MovementSlot.Default) != MovementGeneratorType.Formation)
member.GetMotionMaster().MoveFormation(_leader, dist, angle, formationInfo.LeaderWaypointIDs[0], formationInfo.LeaderWaypointIDs[1]);
}
}