diff options
| -rw-r--r-- | sql/updates/world/2013_06_25_00_world_spell_script_names_434.sql | 4 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_shaman.cpp | 40 |
2 files changed, 44 insertions, 0 deletions
diff --git a/sql/updates/world/2013_06_25_00_world_spell_script_names_434.sql b/sql/updates/world/2013_06_25_00_world_spell_script_names_434.sql new file mode 100644 index 00000000000..437f0c3702c --- /dev/null +++ b/sql/updates/world/2013_06_25_00_world_spell_script_names_434.sql @@ -0,0 +1,4 @@ +DELETE FROM `spell_script_names` WHERE `spell_id` IN (88756,88764); +INSERT INTO `spell_script_names`(`spell_id`, `ScriptName`) VALUES +(88756, 'spell_sha_rolling_thunder'), +(88764, 'spell_sha_rolling_thunder'); diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index d2fb3217d0c..973614fe665 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -47,6 +47,7 @@ enum ShamanSpells SPELL_SHAMAN_LAVA_FLOWS_R1 = 51480, SPELL_SHAMAN_LAVA_FLOWS_TRIGGERED_R1 = 65264, SPELL_SHAMAN_LAVA_SURGE = 77762, + SPELL_SHAMAN_LIGHTNING_SHIELD = 324, SPELL_SHAMAN_SATED = 57724, SPELL_SHAMAN_STORM_EARTH_AND_FIRE = 51483, SPELL_SHAMAN_TOTEM_EARTHBIND_EARTHGRAB = 64695, @@ -729,6 +730,44 @@ class spell_sha_mana_tide_totem : public SpellScriptLoader } }; +// 88756 - Rolling Thunder +class spell_sha_rolling_thunder : public SpellScriptLoader +{ + public: + spell_sha_rolling_thunder() : SpellScriptLoader("spell_sha_rolling_thunder") { } + + class spell_sha_rolling_thunder_AuraScript : public AuraScript + { + PrepareAuraScript(spell_sha_rolling_thunder_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) + { + if (!sSpellMgr->GetSpellInfo(SPELL_SHAMAN_LIGHTNING_SHIELD)) + return false; + return true; + } + + void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/) + { + if (Aura* aura = GetTarget()->GetAura(SPELL_SHAMAN_LIGHTNING_SHIELD)) + { + aura->SetCharges(std::min(aura->GetCharges() + 1, aurEff->GetAmount())); + aura->RefreshDuration(); + } + } + + void Register() + { + OnEffectProc += AuraEffectProcFn(spell_sha_rolling_thunder_AuraScript::HandleEffectProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const + { + return new spell_sha_rolling_thunder_AuraScript(); + } +}; + // 51490 - Thunderstorm class spell_sha_thunderstorm : public SpellScriptLoader { @@ -813,6 +852,7 @@ void AddSC_shaman_spell_scripts() new spell_sha_lava_surge(); new spell_sha_lava_surge_proc(); new spell_sha_mana_tide_totem(); + new spell_sha_rolling_thunder(); new spell_sha_thunderstorm(); new spell_sha_tidal_waves(); } |
