Corrected calculation for SPELL_AURA_PERIODIC_DAMAGE_PERCENT
Port From (https://github.com/TrinityCore/TrinityCore/commit/6cd254d83b51d25551536122ea0217df447b2cf3)
This commit is contained in:
@@ -5318,8 +5318,8 @@ namespace Game.Spells
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else // ceil obtained value, it may happen that 10 ticks for 10% damage may not kill owner
|
||||||
damage = (uint)target.CountPctFromMaxHealth((int)damage);
|
damage = (uint)Math.Ceiling((float)MathFunctions.CalculatePct(target.GetMaxHealth(), damage));
|
||||||
|
|
||||||
if (!m_spellInfo.HasAttribute(SpellAttr4.FixedDamage))
|
if (!m_spellInfo.HasAttribute(SpellAttr4.FixedDamage))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user