diff options
author | Vincent-Michael <Vincent_Michael@gmx.de> | 2013-06-23 20:58:18 +0200 |
---|---|---|
committer | Vincent-Michael <Vincent_Michael@gmx.de> | 2013-06-23 20:58:18 +0200 |
commit | e6363ce2c5c7575d0775e9e22a395a91a961580f (patch) | |
tree | 0b7b981d5e12e06fa179a74c60006d38725738fd | |
parent | ab601de6af21cb10b34a472076ea427440241b5b (diff) |
Core/Spells: Fix shaman talent "Tidal Waves"
Note: Drop charges for critical effect need fixing
-rw-r--r-- | sql/updates/world/2013_01_26_01_world_spell_script_names_434.sql | 5 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_shaman.cpp | 47 |
2 files changed, 48 insertions, 4 deletions
diff --git a/sql/updates/world/2013_01_26_01_world_spell_script_names_434.sql b/sql/updates/world/2013_01_26_01_world_spell_script_names_434.sql new file mode 100644 index 00000000000..89b70f0980a --- /dev/null +++ b/sql/updates/world/2013_01_26_01_world_spell_script_names_434.sql @@ -0,0 +1,5 @@ +DELETE FROM `spell_script_names` WHERE `spell_id` IN (51562,51563,51564); +INSERT INTO `spell_script_names`(`spell_id`, `ScriptName`) VALUES +(51562, 'spell_sha_tidal_waves'), +(51563, 'spell_sha_tidal_waves'), +(51564, 'spell_sha_tidal_waves'); diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index c3bc9c6466a..d2fb3217d0c 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -52,7 +52,8 @@ enum ShamanSpells SPELL_SHAMAN_TOTEM_EARTHBIND_EARTHGRAB = 64695, SPELL_SHAMAN_TOTEM_EARTHBIND_TOTEM = 6474, SPELL_SHAMAN_TOTEM_EARTHEN_POWER = 59566, - SPELL_SHAMAN_TOTEM_HEALING_STREAM_HEAL = 52042 + SPELL_SHAMAN_TOTEM_HEALING_STREAM_HEAL = 52042, + SPELL_SHAMAN_TIDAL_WAVES = 53390 }; enum ShamanSpellIcons @@ -642,8 +643,7 @@ class spell_sha_lava_surge : public SpellScriptLoader void HandleEffectProc(AuraEffect const* /*aurEff*/, ProcEventInfo& /*eventInfo*/) { - PreventDefaultAction(); // will prevent default effect execution - + PreventDefaultAction(); GetTarget()->CastSpell(GetTarget(), SPELL_SHAMAN_LAVA_SURGE, true); } @@ -729,7 +729,7 @@ class spell_sha_mana_tide_totem : public SpellScriptLoader } }; -// -51490 - Thunderstorm +// 51490 - Thunderstorm class spell_sha_thunderstorm : public SpellScriptLoader { public: @@ -758,6 +758,44 @@ class spell_sha_thunderstorm : public SpellScriptLoader } }; +// 51562 - Tidal Waves +class spell_sha_tidal_waves : public SpellScriptLoader +{ + public: + spell_sha_tidal_waves() : SpellScriptLoader("spell_sha_tidal_waves") { } + + class spell_sha_tidal_waves_AuraScript : public AuraScript + { + PrepareAuraScript(spell_sha_tidal_waves_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) + { + if (!sSpellMgr->GetSpellInfo(SPELL_SHAMAN_TIDAL_WAVES)) + return false; + return true; + } + + void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/) + { + PreventDefaultAction(); + int32 basePoints0 = -aurEff->GetAmount(); + int32 basePoints1 = aurEff->GetAmount(); + + GetTarget()->CastCustomSpell(GetTarget(), SPELL_SHAMAN_TIDAL_WAVES, &basePoints0, &basePoints1, NULL, true, NULL, aurEff); + } + + void Register() + { + OnEffectProc += AuraEffectProcFn(spell_sha_tidal_waves_AuraScript::HandleEffectProc, EFFECT_0, SPELL_AURA_DUMMY); + } + }; + + AuraScript* GetAuraScript() const + { + return new spell_sha_tidal_waves_AuraScript(); + } +}; + void AddSC_shaman_spell_scripts() { new spell_sha_ancestral_awakening_proc(); @@ -776,4 +814,5 @@ void AddSC_shaman_spell_scripts() new spell_sha_lava_surge_proc(); new spell_sha_mana_tide_totem(); new spell_sha_thunderstorm(); + new spell_sha_tidal_waves(); } |