Core/Movement: Allow overriding speed for taxi movement generator

Port From (https://github.com/TrinityCore/TrinityCore/commit/038f995ad6ce6a26f71367cae3eb7ae107527a18)
This commit is contained in:
Hondacrx
2024-08-04 17:18:56 -04:00
parent 44f1a733e7
commit 22fbfd8360
4 changed files with 33 additions and 36 deletions
+2 -2
View File
@@ -994,7 +994,7 @@ namespace Game.Movement
Log.outError(LogFilter.Server, $"MotionMaster::MoveSeekAssistanceDistract: {_owner.GetGUID()} attempted to call distract after assistance");
}
public void MoveTaxiFlight(uint path, uint pathnode)
public void MoveTaxiFlight(uint path, uint pathnode, float? speed = null)
{
if (_owner.IsTypeId(TypeId.Player))
{
@@ -1006,7 +1006,7 @@ namespace Game.Movement
bool hasExisting = HasMovementGenerator(gen => gen.GetMovementGeneratorType() == MovementGeneratorType.Flight);
Cypher.Assert(!hasExisting, "Duplicate flight path movement generator");
FlightPathMovementGenerator movement = new();
FlightPathMovementGenerator movement = new(speed);
movement.LoadPath(_owner.ToPlayer());
Add(movement);
}