Scripts/Spells Update Ice Barrier absorb formula (#30589)

This commit is contained in:
Aqua Deus
2025-01-13 16:57:17 +01:00
committed by GitHub
parent 2702c4896f
commit 4f63d34021

View File

@@ -892,11 +892,12 @@ class spell_mage_ice_barrier : public AuraScript
});
}
void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& canBeRecalculated)
void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& canBeRecalculated) const
{
canBeRecalculated = false;
if (Unit* caster = GetCaster())
amount += int32(caster->SpellBaseHealingBonusDone(GetSpellInfo()->GetSchoolMask()) * 10.0f);
amount = CalculatePct(GetUnitOwner()->GetMaxHealth(), GetEffectInfo(EFFECT_1).CalcValue());
if (Player const* player = GetUnitOwner()->ToPlayer())
AddPct(amount, player->GetRatingBonusValue(CR_VERSATILITY_DAMAGE_DONE) + player->GetTotalAuraModifier(SPELL_AURA_MOD_VERSATILITY));
}
void HandleProc(AuraEffect* /*aurEff*/, ProcEventInfo& eventInfo)