Core/Movement: Replace old TargetedMovementGenerator into ChaseMovementGenerator and FollowMovementGenerator, full rewrite for both.

Port From (https://github.com/TrinityCore/TrinityCore/commit/14939204955d1a24fe465cdfcbf307daf3ce4f09)
This commit is contained in:
hondacrx
2021-09-26 10:29:27 -04:00
parent 4004f583a9
commit ad1975b277
22 changed files with 712 additions and 629 deletions
@@ -135,7 +135,7 @@ namespace Game.Movement
}
}
public override void UnitSpeedChanged()
public void UnitSpeedChanged()
{
_recalculateSpeed = true;
}
@@ -183,16 +183,16 @@ namespace Game.Movement
_arrivalSpellTargetGuid = arrivalSpellTargetGuid;
}
public override void Initialize(Unit owner) { }
public void Initialize(Unit owner) { }
public override void Reset(Unit owner) { }
public void Reset(Unit owner) { }
public override bool Update(Unit owner, uint diff)
public bool Update(Unit owner, uint diff)
{
return !owner.MoveSpline.Finalized();
}
public override void Finalize(Unit owner)
public void Finalize(Unit owner)
{
MovementInform(owner);
}
@@ -206,7 +206,7 @@ namespace Game.Movement
owner.ToCreature().GetAI().MovementInform(MovementGeneratorType.Effect, _pointId);
}
public override MovementGeneratorType GetMovementGeneratorType() { return MovementGeneratorType.Effect; }
public MovementGeneratorType GetMovementGeneratorType() { return MovementGeneratorType.Effect; }
uint _pointId;
uint _arrivalSpellId;