Core/Movement: Removed template from FleeingMovementGenerator
Port From (https://github.com/TrinityCore/TrinityCore/commit/cc47fd75b44fcfc749cbbdc250295422e8838971)
This commit is contained in:
@@ -585,15 +585,10 @@ namespace Game.Movement
|
||||
if (enemy == null)
|
||||
return;
|
||||
|
||||
if (_owner.IsCreature())
|
||||
{
|
||||
if (time != TimeSpan.Zero)
|
||||
Add(new TimedFleeingMovementGenerator(enemy.GetGUID(), time));
|
||||
else
|
||||
Add(new FleeingMovementGenerator<Creature>(enemy.GetGUID()));
|
||||
}
|
||||
if (_owner.IsCreature() && time > TimeSpan.Zero)
|
||||
Add(new TimedFleeingMovementGenerator(enemy.GetGUID(), time));
|
||||
else
|
||||
Add(new FleeingMovementGenerator<Player>(enemy.GetGUID()));
|
||||
Add(new FleeingMovementGenerator(enemy.GetGUID()));
|
||||
}
|
||||
|
||||
public void MovePoint(uint id, Position pos, bool generatePath = true, float? finalOrient = null, float? speed = null, MovementWalkRunSpeedSelectionMode speedSelectionMode = MovementWalkRunSpeedSelectionMode.Default, float? closeEnoughDistance = null)
|
||||
@@ -850,7 +845,7 @@ namespace Game.Movement
|
||||
Vector3 point = new();
|
||||
point.X = (float)(x + radius * Math.Cos(angle));
|
||||
point.Y = (float)(y + radius * Math.Sin(angle));
|
||||
|
||||
|
||||
if (_owner.IsFlying())
|
||||
point.Z = z;
|
||||
else
|
||||
@@ -858,7 +853,7 @@ namespace Game.Movement
|
||||
|
||||
init.Path().Add(point);
|
||||
}
|
||||
|
||||
|
||||
init.SetCyclic();
|
||||
if (_owner.IsFlying())
|
||||
{
|
||||
@@ -1099,7 +1094,7 @@ namespace Game.Movement
|
||||
|
||||
speedZ = (float)Math.Sqrt(2 * gravity * height);
|
||||
}
|
||||
|
||||
|
||||
void ResolveDelayedActions()
|
||||
{
|
||||
while (_delayedActions.Count != 0)
|
||||
|
||||
Reference in New Issue
Block a user