mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 18:15:31 +01:00
Core/Auras: implemented SPELL_AURA_MOD_HEALING_DONE_PCT_VERSUS_TARGET_HEALTH (#26176)
This commit is contained in:
@@ -7264,6 +7264,12 @@ float Unit::SpellHealingPctDone(Unit* victim, SpellInfo const* spellProto) const
|
||||
// Healing done percent
|
||||
DoneTotalMod *= GetTotalAuraMultiplier(SPELL_AURA_MOD_HEALING_DONE_PERCENT);
|
||||
|
||||
// bonus from missing health of target
|
||||
float healthPctDiff = 100.0f - victim->GetHealthPct();
|
||||
for (AuraEffect const* healingDonePctVsTargetHealth : GetAuraEffectsByType(SPELL_AURA_MOD_HEALING_DONE_PCT_VERSUS_TARGET_HEALTH))
|
||||
if (healingDonePctVsTargetHealth->IsAffectingSpell(spellProto))
|
||||
AddPct(DoneTotalMod, CalculatePct(float(healingDonePctVsTargetHealth->GetAmount()), healthPctDiff));
|
||||
|
||||
return DoneTotalMod;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user