Core/Movement: FormationMovementGenerator

Port From (https://github.com/TrinityCore/TrinityCore/commit/84df2c57a385df4503fc1f8ff5dfdf445ea2e31f)
This commit is contained in:
hondacrx
2020-05-07 14:34:16 -04:00
parent c9a91fa62f
commit 415d6d84ba
7 changed files with 198 additions and 30 deletions
+6
View File
@@ -607,6 +607,12 @@ namespace Game.Movement
StartMovement(new RotateMovementGenerator(time, direction), MovementSlot.Active);
}
public void MoveFormation(uint id, Position destination, uint moveType, bool forceRun = false, bool forceOrientation = false)
{
if (_owner.GetTypeId() == TypeId.Unit)
StartMovement(new FormationMovementGenerator(id, destination, moveType, forceRun, forceOrientation), MovementSlot.Active);
}
void Pop()
{
if (Empty())