diff options
author | Shauren <shauren.trinity@gmail.com> | 2016-05-12 16:47:45 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2016-05-12 16:47:45 +0200 |
commit | 791e0f0513a507b07c18d68d7508832cbcd0e0e3 (patch) | |
tree | afb808be3daa7d9841b804f9a5846c9bf7763cfc /src | |
parent | c9ba5ce591a8b4ef5dc0e73d0ce107b6acf5e969 (diff) |
Core/Spells: Fixed Lightning Shield dropping charges when attacked
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Spells/spell_shaman.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index b0f49340f7b..b5546685f68 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -919,6 +919,33 @@ class spell_sha_lava_surge_proc : public SpellScriptLoader } }; +// 324 - Lightning Shield +class spell_sha_lightning_shield : public SpellScriptLoader +{ +public: + spell_sha_lightning_shield() : SpellScriptLoader("spell_sha_lightning_shield") { } + + class spell_sha_lightning_shield_AuraScript : public AuraScript + { + PrepareAuraScript(spell_sha_lightning_shield_AuraScript); + + void UnsetUsingCharges(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + GetAura()->SetUsingCharges(false); + } + + void Register() override + { + OnEffectApply += AuraEffectApplyFn(spell_sha_lightning_shield_AuraScript::UnsetUsingCharges, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_sha_lightning_shield_AuraScript(); + } +}; + // 30884 - Nature's Guardian class spell_sha_nature_guardian : public SpellScriptLoader { @@ -1098,6 +1125,7 @@ void AddSC_shaman_spell_scripts() new spell_sha_lava_lash_spread_flame_shock(); new spell_sha_lava_surge(); new spell_sha_lava_surge_proc(); + new spell_sha_lightning_shield(); new spell_sha_nature_guardian(); new spell_sha_thunderstorm(); new spell_sha_tidal_waves(); |