diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Spells/spell_mage.cpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_mage.cpp b/src/server/scripts/Spells/spell_mage.cpp index 5e0cd6e682b..8dc3e31f781 100644 --- a/src/server/scripts/Spells/spell_mage.cpp +++ b/src/server/scripts/Spells/spell_mage.cpp @@ -278,6 +278,42 @@ class spell_mage_conjure_refreshment : public SpellScript } }; +// 112965 - Fingers of Frost +class spell_mage_fingers_of_frost : public AuraScript +{ + PrepareAuraScript(spell_mage_fingers_of_frost); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_MAGE_FINGERS_OF_FROST }); + } + + bool CheckFrostboltProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + return eventInfo.GetSpellInfo() && eventInfo.GetSpellInfo()->IsAffected(SPELLFAMILY_MAGE, flag128(0, 0x2000000, 0, 0)) + && roll_chance_i(aurEff->GetAmount()); + } + + bool CheckFrozenOrbProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + return eventInfo.GetSpellInfo() && eventInfo.GetSpellInfo()->IsAffected(SPELLFAMILY_MAGE, flag128(0, 0, 0x80, 0)) + && roll_chance_i(aurEff->GetAmount()); + } + + void Trigger(AuraEffect* aurEff, ProcEventInfo& eventInfo) + { + eventInfo.GetActor()->CastSpell(GetTarget(), SPELL_MAGE_FINGERS_OF_FROST, true, nullptr, aurEff); + } + + void Register() override + { + DoCheckEffectProc += AuraCheckEffectProcFn(spell_mage_fingers_of_frost::CheckFrostboltProc, EFFECT_0, SPELL_AURA_DUMMY); + DoCheckEffectProc += AuraCheckEffectProcFn(spell_mage_fingers_of_frost::CheckFrozenOrbProc, EFFECT_1, SPELL_AURA_DUMMY); + AfterEffectProc += AuraEffectProcFn(spell_mage_fingers_of_frost::Trigger, EFFECT_0, SPELL_AURA_DUMMY); + AfterEffectProc += AuraEffectProcFn(spell_mage_fingers_of_frost::Trigger, EFFECT_1, SPELL_AURA_DUMMY); + } +}; + // 11426 - Ice Barrier class spell_mage_ice_barrier : public AuraScript { @@ -831,6 +867,7 @@ void AddSC_mage_spell_scripts() RegisterSpellScript(spell_mage_cold_snap); RegisterSpellScript(spell_mage_cone_of_cold); RegisterSpellScript(spell_mage_conjure_refreshment); + RegisterAuraScript(spell_mage_fingers_of_frost); RegisterAuraScript(spell_mage_ice_barrier); RegisterSpellScript(spell_mage_ice_lance); RegisterSpellScript(spell_mage_ice_lance_damage); |