Fix fleeing speed to 66% run speed

Port From (https://github.com/TrinityCore/TrinityCore/commit/d095d4afe95125bba64312025528a2c4aab157e0)
This commit is contained in:
hondacrx
2022-01-05 23:51:18 -05:00
parent acfe9946c6
commit 654c9743e3
7 changed files with 17 additions and 26 deletions
+8 -5
View File
@@ -914,12 +914,15 @@ namespace Game.Movement
public void MoveSeekAssistance(float x, float y, float z)
{
if (_owner.IsCreature())
Creature creature = _owner.ToCreature();
if (creature != null)
{
_owner.AttackStop();
_owner.CastStop();
_owner.ToCreature().SetReactState(ReactStates.Passive);
Add(new AssistanceMovementGenerator(EventId.AssistMove, x, y, z, _owner.GetSpeed(UnitMoveType.Run) * 0.66f));
Log.outDebug(LogFilter.Movement, $"MotionMaster::MoveSeekAssistance: '{creature.GetGUID()}', seeks assistance (X: {x}, Y: {y}, Z: {z})");
creature.AttackStop();
creature.CastStop();
creature.DoNotReacquireSpellFocusTarget();
creature.SetReactState(ReactStates.Passive);
Add(new AssistanceMovementGenerator(EventId.AssistMove, x, y, z));
}
else
Log.outError(LogFilter.Server, $"MotionMaster::MoveSeekAssistance: {_owner.GetGUID()}, attempted to seek assistance");