diff options
author | Andrew <47818697+Nyeriah@users.noreply.github.com> | 2024-11-14 16:03:35 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-14 16:03:35 -0300 |
commit | 5252e6cf5b155d058c3f3556d276e373d28e4c45 (patch) | |
tree | 22b1a83a3ca85c51c231a2da3d500bef0f9d617e /src | |
parent | 65d2ca31cf8c2fa96304487ce70042963ac4de93 (diff) |
fix(Scripts/Spells): Spell school reflectors should have failure chan… (#20560)
fix(Scripts/Spells): Spell school reflectors should have failure chance at higher levels
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Spells/spell_item.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index 90d8ceb038..1d033aeee3 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -4141,6 +4141,27 @@ class spell_item_luffa : public SpellScript } }; +// 23097 - Fire Reflector +// 23131 - Frost Reflector +// 23132 - Shadow Reflector +class spell_item_spell_reflectors: public AuraScript +{ + PrepareAuraScript(spell_item_spell_reflectors); + + void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/) + { + if (GetCaster()->GetLevel() > 70) + amount = 4; + else if (GetCaster()->GetLevel() > 60) + amount = 50; + } + + void Register() override + { + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_item_spell_reflectors::CalculateAmount, EFFECT_0, SPELL_AURA_REFLECT_SPELLS_SCHOOL); + } +}; + void AddSC_item_spell_scripts() { RegisterSpellScript(spell_item_massive_seaforium_charge); @@ -4267,4 +4288,5 @@ void AddSC_item_spell_scripts() RegisterSpellScript(spell_item_gor_dreks_ointment); RegisterSpellScript(spell_item_skyguard_blasting_charges); RegisterSpellScript(spell_item_luffa); + RegisterSpellScript(spell_item_spell_reflectors); } |