Skip to content
Permalink
Browse files

Server/Spells: Fix for SPELL_AURA_MOD_MINIMUM_SPEED.

Signed-off-by: AriDEV <aridev666@gmail.com>
  • Loading branch information
AriDEV committed Feb 10, 2020
1 parent f0529c5 commit d564a727150d0e13b25cabc54d6c92a87be4e1e6
Showing with 6 additions and 7 deletions.
  1. +6 −7 src/server/game/Entities/Unit/Unit.cpp
@@ -10857,14 +10857,13 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced)
// Apply strongest slow aura mod to speed
int32 slow = GetMaxNegativeAuraModifier(SPELL_AURA_MOD_DECREASE_SPEED);
if (slow)
{
AddPct(speed, slow);
if (float minSpeedMod = (float) GetMaxPositiveAuraModifier(SPELL_AURA_MOD_MINIMUM_SPEED))
{
float min_speed = minSpeedMod / 100.0f;
if (speed < min_speed)
speed = min_speed;
}

if (float minSpeedMod = (float)GetMaxPositiveAuraModifier(SPELL_AURA_MOD_MINIMUM_SPEED))
{
float min_speed = minSpeedMod / 100.0f;
if (speed < min_speed)
speed = min_speed;
}
SetSpeed(mtype, speed, forced);
}

0 comments on commit d564a72

Please sign in to comment.
You can’t perform that action at this time.