mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 02:04:52 +01:00
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
This commit is contained in:
@@ -935,7 +935,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());
|
||||
|
||||
@@ -56,7 +56,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;
|
||||
|
||||
Reference in New Issue
Block a user