mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 00:48:56 +01:00
Core/Spells: minor cleanup for ad175f11f6
This commit is contained in:
@@ -7436,14 +7436,13 @@ float Unit::SpellHealingPctDone(Unit* victim, SpellInfo const* spellProto) const
|
||||
}
|
||||
}
|
||||
|
||||
float healthPctDiff = 100.0f - victim->GetHealthPct();
|
||||
float healthPctDiff = 100.f - victim->GetHealthPct();
|
||||
for (AuraEffect const* healingDonePctVsTargetHealth : owner->GetAuraEffectsByType(SPELL_AURA_MOD_HEALING_DONE_PCT_VERSUS_TARGET_HEALTH))
|
||||
{
|
||||
if (!healingDonePctVsTargetHealth->IsAffectingSpell(spellProto))
|
||||
continue;
|
||||
|
||||
uint32 maxBonus = healingDonePctVsTargetHealth->GetAmount();
|
||||
AddPct(DoneTotalMod, CalculatePct(maxBonus, healthPctDiff));
|
||||
AddPct(DoneTotalMod, CalculatePct(float(healingDonePctVsTargetHealth->GetAmount()), healthPctDiff));
|
||||
}
|
||||
|
||||
return DoneTotalMod;
|
||||
|
||||
Reference in New Issue
Block a user