Core/Unit: Correct speed calculus when affected by SPELL_AURA_MOD_MINIMUM_SPEED
Port From (https://github.com/TrinityCore/TrinityCore/commit/1d2f20d59a372cf3625db93a50da206a4e60e9b9)
This commit is contained in:
@@ -522,7 +522,11 @@ namespace Game.Entities
|
||||
float minSpeedMod = GetMaxPositiveAuraModifier(AuraType.ModMinimumSpeed);
|
||||
if (minSpeedMod != 0)
|
||||
{
|
||||
float min_speed = minSpeedMod / 100.0f;
|
||||
float baseMinSpeed = 1.0f;
|
||||
if (!GetOwnerGUID().IsPlayer() && !IsHunterPet() && GetTypeId() == TypeId.Unit)
|
||||
baseMinSpeed = ToCreature().GetCreatureTemplate().SpeedRun;
|
||||
|
||||
float min_speed = MathFunctions.CalculatePct(baseMinSpeed, minSpeedMod);
|
||||
if (speed < min_speed)
|
||||
speed = min_speed;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user