Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Server/Spells: Fix for SPELL_AURA_MOD_MINIMUM_SPEED.
Browse files Browse the repository at this point in the history
Signed-off-by: AriDEV <aridev666@gmail.com>
  • Loading branch information
AriDEV committed Feb 10, 2020
1 parent f0529c5 commit d564a72
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/server/game/Entities/Unit/Unit.cpp
Expand Up @@ -10857,14 +10857,13 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced)
// Apply strongest slow aura mod to speed // Apply strongest slow aura mod to speed
int32 slow = GetMaxNegativeAuraModifier(SPELL_AURA_MOD_DECREASE_SPEED); int32 slow = GetMaxNegativeAuraModifier(SPELL_AURA_MOD_DECREASE_SPEED);
if (slow) if (slow)
{
AddPct(speed, slow); AddPct(speed, slow);
if (float minSpeedMod = (float) GetMaxPositiveAuraModifier(SPELL_AURA_MOD_MINIMUM_SPEED))
{ if (float minSpeedMod = (float)GetMaxPositiveAuraModifier(SPELL_AURA_MOD_MINIMUM_SPEED))
float min_speed = minSpeedMod / 100.0f; {
if (speed < min_speed) float min_speed = minSpeedMod / 100.0f;
speed = min_speed; if (speed < min_speed)
} speed = min_speed;
} }
SetSpeed(mtype, speed, forced); SetSpeed(mtype, speed, forced);
} }
Expand Down

0 comments on commit d564a72

Please sign in to comment.