aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Spells/spell_shaman.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp
index 3b680dec910..1dca1e9e0fa 100644
--- a/src/server/scripts/Spells/spell_shaman.cpp
+++ b/src/server/scripts/Spells/spell_shaman.cpp
@@ -38,6 +38,7 @@ enum ShamanSpells
{
SPELL_SHAMAN_ANCESTRAL_GUIDANCE = 108281,
SPELL_SHAMAN_ANCESTRAL_GUIDANCE_HEAL = 114911,
+ SPELL_SHAMAN_CHAIN_LIGHTNING_ENERGIZE = 195897,
SPELL_SHAMAN_CHAINED_HEAL = 70809,
SPELL_SHAMAN_CRASH_LIGHTNING_CLEAVE = 187878,
SPELL_SHAMAN_EARTH_SHIELD_HEAL = 204290,
@@ -186,6 +187,30 @@ class spell_sha_bloodlust : public SpellScript
}
};
+// 188443 - Chain lightning
+class spell_sha_chain_lightning : public SpellScript
+{
+ PrepareSpellScript(spell_sha_chain_lightning);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_SHAMAN_CHAIN_LIGHTNING_ENERGIZE, SPELL_SHAMAN_MAELSTROM_CONTROLLER })
+ && sSpellMgr->AssertSpellInfo(SPELL_SHAMAN_MAELSTROM_CONTROLLER, DIFFICULTY_NONE)->GetEffects().size() > EFFECT_4;
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ if (AuraEffect const* energizeAmount = GetCaster()->GetAuraEffect(SPELL_SHAMAN_MAELSTROM_CONTROLLER, EFFECT_4))
+ GetCaster()->CastSpell(GetCaster(), SPELL_SHAMAN_CHAIN_LIGHTNING_ENERGIZE, CastSpellExtraArgs(energizeAmount)
+ .AddSpellMod(SPELLVALUE_BASE_POINT0, energizeAmount->GetAmount() * GetUnitTargetCountForEffect(EFFECT_0)));
+ }
+
+ void Register() override
+ {
+ OnEffectLaunch += SpellEffectFn(spell_sha_chain_lightning::HandleScript, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
+ }
+};
+
// 187874 - Crash Lightning
class spell_sha_crash_lightning : public SpellScript
{
@@ -1194,6 +1219,7 @@ void AddSC_shaman_spell_scripts()
RegisterAuraScript(spell_sha_ancestral_guidance);
RegisterSpellScript(spell_sha_ancestral_guidance_heal);
RegisterSpellScript(spell_sha_bloodlust);
+ RegisterSpellScript(spell_sha_chain_lightning);
RegisterSpellScript(spell_sha_crash_lightning);
RegisterAuraScript(spell_sha_earth_shield);
RegisterAuraScript(spell_sha_earthen_rage_passive);