Core/Movement: Fix fleeing speed to 66% run speed

Fix AssistanceMovementGenerator using 100% MOVE_RUN speed instead of 66% . Please note that the fleeing mechanic still has some open issues that this single commit doesn't fix

(cherry picked from commit 862d47394b)
This commit is contained in:
jackpoz
2019-12-22 15:46:48 +01:00
committed by Shauren
parent b40cadd5a1
commit 2327ff4d6d
2 changed files with 2 additions and 2 deletions

View File

@@ -990,7 +990,7 @@ void MotionMaster::MoveSeekAssistance(float x, float y, float z)
_owner->AttackStop();
_owner->CastStop();
_owner->ToCreature()->SetReactState(REACT_PASSIVE);
Add(new AssistanceMovementGenerator(EVENT_ASSIST_MOVE, x, y, z));
Add(new AssistanceMovementGenerator(EVENT_ASSIST_MOVE, x, y, z, _owner->GetSpeed(MOVE_RUN) * 0.66f));
}
else
TC_LOG_ERROR("movement.motionmaster", "MotionMaster::MoveSeekAssistance: '%s', attempted to seek assistance.", _owner->GetGUID().ToString().c_str());

View File

@@ -63,7 +63,7 @@ class PointMovementGenerator : public MovementGeneratorMedium<T, PointMovementGe
class AssistanceMovementGenerator : public PointMovementGenerator<Creature>
{
public:
explicit AssistanceMovementGenerator(uint32 id, float x, float y, float z) : PointMovementGenerator<Creature>(id, x, y, z, true) { }
explicit AssistanceMovementGenerator(uint32 id, float x, float y, float z, float speed = 0.0f) : PointMovementGenerator<Creature>(id, x, y, z, true, speed) { }
void Finalize(Unit*, bool, bool) override;
MovementGeneratorType GetMovementGeneratorType() const override;