diff options
author | Shocker <none@none> | 2010-09-28 09:11:41 +0300 |
---|---|---|
committer | Shocker <none@none> | 2010-09-28 09:11:41 +0300 |
commit | c847d3c82587cec21ee344b3486fa7bf6e0dc79c (patch) | |
tree | 9312969b171a054177898042cbf92b46e725b155 /src | |
parent | 90a7f3292f4f3ec123296cacd14bf0f27d67b79c (diff) |
Core/Spells: Fix Glyph of Blast Wave (based on patch by dr.tenma), closes issue 3593
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Spells/spell_mage.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_mage.cpp b/src/server/scripts/Spells/spell_mage.cpp index 36504353bcb..24433669136 100644 --- a/src/server/scripts/Spells/spell_mage.cpp +++ b/src/server/scripts/Spells/spell_mage.cpp @@ -35,6 +35,7 @@ enum MageSpells SPELL_MAGE_GLYPH_OF_ETERNAL_WATER = 70937, SPELL_MAGE_SUMMON_WATER_ELEMENTAL_PERMANENT = 70908, SPELL_MAGE_SUMMON_WATER_ELEMENTAL_TEMPORARY = 70907, + SPELL_MAGE_GLYPH_OF_BLAST_WAVE = 62126, }; class spell_mage_cold_snap : public SpellScriptLoader @@ -172,9 +173,42 @@ class spell_mage_summon_water_elemental : public SpellScriptLoader } }; +class spell_mage_blast_wave : public SpellScriptLoader +{ + public: + spell_mage_blast_wave() : SpellScriptLoader("spell_mage_blast_wave") { } + + class spell_mage_blast_wave_SpellScript : public SpellScript + { + bool Validate(SpellEntry const * /*spellEntry*/) + { + if (!sSpellStore.LookupEntry(SPELL_MAGE_GLYPH_OF_BLAST_WAVE)) + return false; + return true; + } + + void HandleKnockBack(SpellEffIndex effIndex) + { + if (GetCaster()->HasAura(SPELL_MAGE_GLYPH_OF_BLAST_WAVE)) + PreventHitDefaultEffect(effIndex); + } + + void Register() + { + OnEffect += SpellEffectFn(spell_mage_blast_wave_SpellScript::HandleKnockBack, EFFECT_2, SPELL_EFFECT_KNOCK_BACK); + } + }; + + SpellScript * GetSpellScript() const + { + return new spell_mage_blast_wave_SpellScript(); + } +}; + void AddSC_mage_spell_scripts() { new spell_mage_cold_snap; new spell_mage_polymorph_cast_visual; new spell_mage_summon_water_elemental; + new spell_mage_blast_wave; } |