From 43d32987244ac5cdc32e2ee2001a47c6c4d2db2d Mon Sep 17 00:00:00 2001 From: hondacrx Date: Wed, 5 Jan 2022 23:24:23 -0500 Subject: [PATCH] Core/Movement: Fix fleeing speed to 66% run speed Port From (https://github.com/TrinityCore/TrinityCore/commit/2327ff4d6dab16cedb5e82c50f1cdcce8983abde) --- Source/Game/Movement/Generators/PointMovement.cs | 2 +- Source/Game/Movement/MotionMaster.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Game/Movement/Generators/PointMovement.cs b/Source/Game/Movement/Generators/PointMovement.cs index 6024f4e45..4aff4847b 100644 --- a/Source/Game/Movement/Generators/PointMovement.cs +++ b/Source/Game/Movement/Generators/PointMovement.cs @@ -185,7 +185,7 @@ namespace Game.Movement public class AssistanceMovementGenerator : PointMovementGenerator { - public AssistanceMovementGenerator(uint id, float x, float y, float z) : base(id, x, y, z, true) { } + public AssistanceMovementGenerator(uint id, float x, float y, float z, float speed = 0.0f) : base(id, x, y, z, true, speed) { } public override void Finalize(Unit owner, bool active, bool movementInform) { diff --git a/Source/Game/Movement/MotionMaster.cs b/Source/Game/Movement/MotionMaster.cs index 1aca37212..931cf0c84 100644 --- a/Source/Game/Movement/MotionMaster.cs +++ b/Source/Game/Movement/MotionMaster.cs @@ -919,7 +919,7 @@ namespace Game.Movement _owner.AttackStop(); _owner.CastStop(); _owner.ToCreature().SetReactState(ReactStates.Passive); - Add(new AssistanceMovementGenerator(EventId.AssistMove, x, y, z)); + Add(new AssistanceMovementGenerator(EventId.AssistMove, x, y, z, _owner.GetSpeed(UnitMoveType.Run) * 0.66f)); } else Log.outError(LogFilter.Server, $"MotionMaster::MoveSeekAssistance: {_owner.GetGUID()}, attempted to seek assistance");