diff options
-rw-r--r-- | sql/updates/world/2013_06_27_00_world_spell_misc_434.sql | 11 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_shaman.cpp | 40 |
2 files changed, 51 insertions, 0 deletions
diff --git a/sql/updates/world/2013_06_27_00_world_spell_misc_434.sql b/sql/updates/world/2013_06_27_00_world_spell_misc_434.sql new file mode 100644 index 00000000000..17055afe2bf --- /dev/null +++ b/sql/updates/world/2013_06_27_00_world_spell_misc_434.sql @@ -0,0 +1,11 @@ +DELETE FROM `spell_script_names` WHERE `spell_id` IN (77794,77795,77796); +INSERT INTO `spell_script_names`(`spell_id`, `ScriptName`) VALUES +(77794, 'spell_sha_focused_insight'), +(77795, 'spell_sha_focused_insight'), +(77796, 'spell_sha_focused_insight'); + +DELETE FROM `spell_proc_event` WHERE `entry` IN (77794,77795,77796); +INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES +(77794, 0, 11, 0x90100000, 0, 0, 0, 0, 0, 0, 0), +(77795, 0, 11, 0x90100000, 0, 0, 0, 0, 0, 0, 0), +(77796, 0, 11, 0x90100000, 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 25c7d7a30c1..e036a476cbd 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -39,6 +39,7 @@ enum ShamanSpells SPELL_SHAMAN_EXHAUSTION = 57723, SPELL_SHAMAN_FIRE_NOVA_TRIGGERED_R1 = 8349, SPELL_SHAMAN_FLAME_SHOCK = 8050, + SPELL_SHAMAN_FOCUSED_INSIGHT = 77800, SPELL_SHAMAN_GLYPH_OF_EARTH_SHIELD = 63279, SPELL_SHAMAN_GLYPH_OF_HEALING_STREAM_TOTEM = 55456, SPELL_SHAMAN_GLYPH_OF_MANA_TIDE = 55441, @@ -486,6 +487,44 @@ class spell_sha_flame_shock : public SpellScriptLoader } }; +// 77794 - Focused Insight +class spell_sha_focused_insight : public SpellScriptLoader +{ + public: + spell_sha_focused_insight() : SpellScriptLoader("spell_sha_focused_insight") { } + + class spell_sha_focused_insight_AuraScript : public AuraScript + { + PrepareAuraScript(spell_sha_focused_insight_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) + { + if (!sSpellMgr->GetSpellInfo(SPELL_SHAMAN_FOCUSED_INSIGHT)) + return false; + return true; + } + + void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/) + { + PreventDefaultAction(); + int32 basePoints0 = aurEff->GetAmount(); + int32 basePoints1 = aurEff->GetSpellInfo()->Effects[EFFECT_1].CalcValue(); + + GetTarget()->CastCustomSpell(GetTarget(), SPELL_SHAMAN_FOCUSED_INSIGHT, &basePoints0, &basePoints1, &basePoints1, true, NULL, aurEff); + } + + void Register() + { + OnEffectProc += AuraEffectProcFn(spell_sha_focused_insight_AuraScript::HandleEffectProc, EFFECT_0, SPELL_AURA_DUMMY); + } + }; + + AuraScript* GetAuraScript() const + { + return new spell_sha_focused_insight_AuraScript(); + } +}; + // 52041 - Healing Stream Totem /// Updated 4.3.4 class spell_sha_healing_stream_totem : public SpellScriptLoader @@ -884,6 +923,7 @@ void AddSC_shaman_spell_scripts() new spell_sha_feedback(); new spell_sha_fire_nova(); new spell_sha_flame_shock(); + new spell_sha_focused_insight(); new spell_sha_healing_stream_totem(); new spell_sha_heroism(); new spell_sha_lava_lash(); |