aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAqua Deus <95978183+aquadeus@users.noreply.github.com>2025-01-13 16:57:17 +0100
committerGitHub <noreply@github.com>2025-01-13 16:57:17 +0100
commit4f63d34021dfcaabb69f008800e250357e898869 (patch)
tree366c78a6cc0b93600ee94de96af4ac53046a828c /src
parent2702c4896f35f9e2323f97210d3b2d6abe95c1a1 (diff)
Scripts/Spells Update Ice Barrier absorb formula (#30589)
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Spells/spell_mage.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/server/scripts/Spells/spell_mage.cpp b/src/server/scripts/Spells/spell_mage.cpp
index b0dd0abb7b3..4b433912121 100644
--- a/src/server/scripts/Spells/spell_mage.cpp
+++ b/src/server/scripts/Spells/spell_mage.cpp
@@ -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)