Core/Movement: Formation Rewrite

Port From (https://github.com/TrinityCore/TrinityCore/commit/924116f0461f5e1e03a026129b81dfe23faa20e4)
This commit is contained in:
hondacrx
2022-02-17 16:18:54 -05:00
parent d9b9739999
commit 266284247c
8 changed files with 168 additions and 123 deletions
+3 -3
View File
@@ -994,10 +994,10 @@ namespace Game.Movement
Add(new RotateMovementGenerator(id, time, direction));
}
public void MoveFormation(uint id, Position destination, WaypointMoveType moveType, bool forceRun = false, bool forceOrientation = false)
public void MoveFormation(Unit leader, float range, float angle, uint point1, uint point2)
{
if (_owner.GetTypeId() == TypeId.Unit)
Add(new FormationMovementGenerator(id, destination, moveType, forceRun, forceOrientation));
if (_owner.GetTypeId() == TypeId.Unit && leader != null)
Add(new FormationMovementGenerator(leader, range, angle, point1, point2), MovementSlot.Default);
}
public void LaunchMoveSpline(MoveSplineInit init, uint id = 0, MovementGeneratorPriority priority = MovementGeneratorPriority.Normal, MovementGeneratorType type = MovementGeneratorType.Effect)