From b29c191d9930f4d1c1ef41974c65b034b078611d Mon Sep 17 00:00:00 2001 From: hondacrx Date: Tue, 24 May 2022 12:47:46 -0400 Subject: [PATCH] Core/Movement: add optional velocity argument for MoveLand and MoveTakeoff Port From (https://github.com/TrinityCore/TrinityCore/commit/eeac4a12f244e7f730f772b4093cc5089dfc6a0c) --- Source/Game/Movement/MotionMaster.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Source/Game/Movement/MotionMaster.cs b/Source/Game/Movement/MotionMaster.cs index 2c05017a1..7c77dcc8a 100644 --- a/Source/Game/Movement/MotionMaster.cs +++ b/Source/Game/Movement/MotionMaster.cs @@ -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); init.MoveTo(pos, false); init.SetAnimation(AnimTier.Ground); + if (velocity.HasValue) + init.SetVelocity(velocity.Value); + 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); - init.MoveTo(pos); + init.MoveTo(pos, false); init.SetAnimation(AnimTier.Hover); + if (velocity.HasValue) + init.SetVelocity(velocity.Value); Add(new GenericMovementGenerator(init, MovementGeneratorType.Effect, id)); }