Core/Auras: implemented SPELL_AURA_MOD_HEALING_DONE_PCT_VERSUS_TARGET_HEALTH
Port From (https://github.com/TrinityCore/TrinityCore/commit/ee2ebfe87db6e43fc0ee2e27d760d656eadf9526)
This commit is contained in:
@@ -533,6 +533,12 @@ namespace Game.Entities
|
||||
// Healing done percent
|
||||
DoneTotalMod *= GetTotalAuraMultiplier(AuraType.ModHealingDonePercent);
|
||||
|
||||
// bonus from missing health of target
|
||||
float healthPctDiff = 100.0f - victim.GetHealthPct();
|
||||
foreach (AuraEffect healingDonePctVsTargetHealth in GetAuraEffectsByType(AuraType.ModHealingDonePctVersusTargetHealth))
|
||||
if (healingDonePctVsTargetHealth.IsAffectingSpell(spellProto))
|
||||
MathFunctions.AddPct(ref DoneTotalMod, MathFunctions.CalculatePct((float)healingDonePctVsTargetHealth.GetAmount(), healthPctDiff));
|
||||
|
||||
return DoneTotalMod;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user