Core/Unit: Correct speed calculus when affected by SPELL_AURA_MOD_MINIMUM_SPEED (#18136)
This commit is contained in:
1 parent
ce6df00019
commit
d21bb8f5ca
3 files changed
+7
-2
No files matched your search
@@ -10996,7 +10996,11 @@ void Unit::UpdateSpeed(UnitMoveType mtype)
|
||||
|
||||
if (float minSpeedMod = (float)GetMaxPositiveAuraModifier(SPELL_AURA_MOD_MINIMUM_SPEED))
|
||||
{
|
||||
float min_speed = minSpeedMod / 100.0f;
|
||||
float baseMinSpeed = 1.0f;
|
||||
if (!GetOwnerGUID().IsPlayer() && !IsHunterPet() && GetTypeId() == TYPEID_UNIT)
|
||||
baseMinSpeed = ToCreature()->GetCreatureTemplate()->speed_run;
|
||||
|
||||
float min_speed = CalculatePct(baseMinSpeed, minSpeedMod);
|
||||
if (speed < min_speed)
|
||||
speed = min_speed;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user