mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
Core/Units: Changed SPELL_AURA_MOD_MINIMUM_SPEED to always be applied, not only if under a slow aura (SPELL_AURA_MOD_MINIMUM_SPEED can set the minimum speed higher than base speed)
This commit is contained in:
@@ -10424,15 +10424,15 @@ 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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user