diff --git a/Source/Game/Entities/Unit/Unit.Movement.cs b/Source/Game/Entities/Unit/Unit.Movement.cs index b25d16e5d..a42e0d2f4 100644 --- a/Source/Game/Entities/Unit/Unit.Movement.cs +++ b/Source/Game/Entities/Unit/Unit.Movement.cs @@ -1349,7 +1349,7 @@ namespace Game.Entities caster = Global.ObjAccessor.GetUnit(this, fearAuras[0].GetCasterGUID()); if (caster == null) caster = GetAttackerForHelper(); - GetMotionMaster().MoveFleeing(caster, (uint)(fearAuras.Empty() ? WorldConfig.GetIntValue(WorldCfg.CreatureFamilyFleeDelay) : 0)); // caster == NULL processed in MoveFleeing + GetMotionMaster().MoveFleeing(caster, TimeSpan.FromMilliseconds(fearAuras.Empty() ? WorldConfig.GetIntValue(WorldCfg.CreatureFamilyFleeDelay) : 0)); // caster == NULL processed in MoveFleeing } else { diff --git a/Source/Game/Movement/Generators/FleeingMovementGenerator.cs b/Source/Game/Movement/Generators/FleeingMovementGenerator.cs index 1d5ba2fef..67fbcc2a8 100644 --- a/Source/Game/Movement/Generators/FleeingMovementGenerator.cs +++ b/Source/Game/Movement/Generators/FleeingMovementGenerator.cs @@ -197,7 +197,7 @@ namespace Game.Movement public class TimedFleeingMovementGenerator : FleeingMovementGenerator { - public TimedFleeingMovementGenerator(ObjectGuid fright, uint time) : base(fright) + public TimedFleeingMovementGenerator(ObjectGuid fright, TimeSpan time) : base(fright) { _totalFleeTime = new TimeTracker(time); } diff --git a/Source/Game/Movement/MotionMaster.cs b/Source/Game/Movement/MotionMaster.cs index fe13545cd..723e72b91 100644 --- a/Source/Game/Movement/MotionMaster.cs +++ b/Source/Game/Movement/MotionMaster.cs @@ -581,14 +581,14 @@ namespace Game.Movement Add(new ConfusedMovementGenerator()); } - public void MoveFleeing(Unit enemy, uint time) + public void MoveFleeing(Unit enemy, TimeSpan time = default) { if (!enemy) return; if (_owner.IsCreature()) { - if (time != 0) + if (time != TimeSpan.Zero) Add(new TimedFleeingMovementGenerator(enemy.GetGUID(), time)); else Add(new FleeingMovementGenerator(enemy.GetGUID()));