From 674f38e912f67c9a62b10a72cd56400bb4addf90 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Sat, 31 Aug 2019 15:31:09 -0400 Subject: [PATCH] Corrected calculation for SPELL_AURA_PERIODIC_DAMAGE_PERCENT Port From (https://github.com/TrinityCore/TrinityCore/commit/6cd254d83b51d25551536122ea0217df447b2cf3) --- Source/Game/Spells/Auras/AuraEffect.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Game/Spells/Auras/AuraEffect.cs b/Source/Game/Spells/Auras/AuraEffect.cs index 4309936b7..48c9b34f7 100644 --- a/Source/Game/Spells/Auras/AuraEffect.cs +++ b/Source/Game/Spells/Auras/AuraEffect.cs @@ -5318,8 +5318,8 @@ namespace Game.Spells } } } - else - damage = (uint)target.CountPctFromMaxHealth((int)damage); + else // ceil obtained value, it may happen that 10 ticks for 10% damage may not kill owner + damage = (uint)Math.Ceiling((float)MathFunctions.CalculatePct(target.GetMaxHealth(), damage)); if (!m_spellInfo.HasAttribute(SpellAttr4.FixedDamage)) {