Corrected calculation for SPELL_AURA_PERIODIC_DAMAGE_PERCENT (#19060)

This commit is contained in:
xinef1
2017-03-02 00:12:57 +01:00
committed by ariel-
parent fb2aebe46b
commit ce1108b8a2

View File

@@ -5568,8 +5568,8 @@ void AuraEffect::HandlePeriodicDamageAurasTick(Unit* target, Unit* caster) const
}
}
}
else
damage = uint32(target->CountPctFromMaxHealth(damage));
else // ceil obtained value, it may happen that 10 ticks for 10% damage may not kill owner
damage = uint32(ceil(CalculatePct<float, float>(target->GetMaxHealth(), damage)));
if (!m_spellInfo->HasAttribute(SPELL_ATTR4_FIXED_DAMAGE))
{