diff options
author | Vincent-Michael <Vincent_Michael@gmx.de> | 2013-06-16 22:57:09 +0200 |
---|---|---|
committer | Vincent-Michael <Vincent_Michael@gmx.de> | 2013-06-16 23:00:54 +0200 |
commit | b21749a68c19fb1dc6a7d72fc85f6d148b3b753f (patch) | |
tree | 15910d5d9c84d7394ce4f3cad9813d0f933facc8 /src | |
parent | d2e1b7421a74b54dbc02fa3a9c33fb9bb012d1e7 (diff) |
Core/Spells: Fix shaman talent "Feedback"
Note: For Chain Lightning need more fix
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Spells/spell_shaman.cpp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index db24d860a3e..e7853d5f85c 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -35,6 +35,7 @@ enum ShamanSpells SPELL_SHAMAN_ANCESTRAL_AWAKENING_PROC = 52752, SPELL_SHAMAN_BIND_SIGHT = 6277, SPELL_SHAMAN_EARTH_SHIELD_HEAL = 379, + SPELL_SHAMAN_ELEMENTAL_MASTERY = 16166, SPELL_SHAMAN_EXHAUSTION = 57723, SPELL_SHAMAN_FIRE_NOVA_TRIGGERED_R1 = 8349, SPELL_SHAMAN_FLAME_SHOCK = 8050, @@ -362,6 +363,43 @@ class spell_sha_earthen_power : public SpellScriptLoader } }; +// 86185 Feedback +class spell_sha_feedback : public SpellScriptLoader +{ + public: + spell_sha_feedback() : SpellScriptLoader("spell_sha_feedback") { } + + class spell_sha_feedback_AuraScript : public AuraScript + { + PrepareAuraScript(spell_sha_feedback_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) + { + if (!sSpellMgr->GetSpellInfo(SPELL_SHAMAN_ELEMENTAL_MASTERY)) + return false; + return true; + } + + void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); // will prevent default effect execution + if (Player* target = GetTarget()->ToPlayer()) + target->ModifySpellCooldown(SPELL_SHAMAN_ELEMENTAL_MASTERY, aurEff->GetBaseAmount()); + } + + void Register() + { + DoCheckProc += AuraCheckProcFn(spell_sha_feedback_AuraScript::DoCheck); + OnEffectProc += AuraEffectProcFn(spell_sha_feedback_AuraScript::HandleEffectProc, EFFECT_0, SPELL_AURA_DUMMY); + } + }; + + AuraScript* GetAuraScript() const + { + return new spell_sha_feedback_AuraScript(); + } +}; + // 1535 Fire Nova /// Updated 4.3.4 class spell_sha_fire_nova : public SpellScriptLoader @@ -729,6 +767,7 @@ void AddSC_shaman_spell_scripts() new spell_sha_earth_shield(); new spell_sha_earthbind_totem(); new spell_sha_earthen_power(); + new spell_sha_feedback(); new spell_sha_fire_nova(); new spell_sha_flame_shock(); new spell_sha_healing_stream_totem(); |