Core/Movement: add optional velocity argument for MoveLand and MoveTakeoff
Port From (https://github.com/TrinityCore/TrinityCore/commit/eeac4a12f244e7f730f772b4093cc5089dfc6a0c)
This commit is contained in:
@@ -621,19 +621,24 @@ namespace Game.Movement
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void MoveLand(uint id, Position pos)
|
public void MoveLand(uint id, Position pos, float? velocity = null)
|
||||||
{
|
{
|
||||||
MoveSplineInit init = new(_owner);
|
MoveSplineInit init = new(_owner);
|
||||||
init.MoveTo(pos, false);
|
init.MoveTo(pos, false);
|
||||||
init.SetAnimation(AnimTier.Ground);
|
init.SetAnimation(AnimTier.Ground);
|
||||||
|
if (velocity.HasValue)
|
||||||
|
init.SetVelocity(velocity.Value);
|
||||||
|
|
||||||
Add(new GenericMovementGenerator(init, MovementGeneratorType.Effect, id));
|
Add(new GenericMovementGenerator(init, MovementGeneratorType.Effect, id));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void MoveTakeoff(uint id, Position pos)
|
public void MoveTakeoff(uint id, Position pos, float? velocity = null)
|
||||||
{
|
{
|
||||||
MoveSplineInit init = new(_owner);
|
MoveSplineInit init = new(_owner);
|
||||||
init.MoveTo(pos);
|
init.MoveTo(pos, false);
|
||||||
init.SetAnimation(AnimTier.Hover);
|
init.SetAnimation(AnimTier.Hover);
|
||||||
|
if (velocity.HasValue)
|
||||||
|
init.SetVelocity(velocity.Value);
|
||||||
|
|
||||||
Add(new GenericMovementGenerator(init, MovementGeneratorType.Effect, id));
|
Add(new GenericMovementGenerator(init, MovementGeneratorType.Effect, id));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user