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 | |
parent | d2e1b7421a74b54dbc02fa3a9c33fb9bb012d1e7 (diff) |
Core/Spells: Fix shaman talent "Feedback"
Note: For Chain Lightning need more fix
-rw-r--r-- | sql/updates/world/2013_06_16_00_world_spell_misc_434.sql | 11 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_shaman.cpp | 39 |
2 files changed, 50 insertions, 0 deletions
diff --git a/sql/updates/world/2013_06_16_00_world_spell_misc_434.sql b/sql/updates/world/2013_06_16_00_world_spell_misc_434.sql new file mode 100644 index 00000000000..917c05bfad8 --- /dev/null +++ b/sql/updates/world/2013_06_16_00_world_spell_misc_434.sql @@ -0,0 +1,11 @@ +DELETE FROM `spell_script_names` WHERE `spell_id` IN (86183,86184,86185); +INSERT INTO `spell_script_names`(`spell_id`, `ScriptName`) VALUES +(86183, 'spell_sha_feedback'), +(86184, 'spell_sha_feedback'), +(86185, 'spell_sha_feedback'); + +DELETE FROM `spell_proc_event` WHERE `entry` IN (86183,86184,86185); +INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES +(86183, 0, 11, 0x3, 0, 0, 0, 0, 0, 0, 0), +(86184, 0, 11, 0x3, 0, 0, 0, 0, 0, 0, 0), +(86185, 0, 11, 0x3, 0, 0, 0, 0, 0, 0, 0); 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(); |