aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Spells/spell_shaman.cpp74
1 files changed, 74 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp
index 7a931969c1a..6293afaefee 100644
--- a/src/server/scripts/Spells/spell_shaman.cpp
+++ b/src/server/scripts/Spells/spell_shaman.cpp
@@ -130,6 +130,8 @@ enum ShamanSpells
SPELL_SHAMAN_UNDULATION_PROC = 216251,
SPELL_SHAMAN_UNLIMITED_POWER_BUFF = 272737,
SPELL_SHAMAN_VOLCANIC_SURGE = 408572,
+ SPELL_SHAMAN_VOLTAIC_BLAZE_DAMAGE = 470057,
+ SPELL_SHAMAN_VOLTAIC_BLAZE_OVERRIDE = 470058,
SPELL_SHAMAN_WINDFURY_ATTACK = 25504,
SPELL_SHAMAN_WINDFURY_ENCHANTMENT = 334302,
SPELL_SHAMAN_WIND_RUSH = 192082
@@ -2098,6 +2100,75 @@ class spell_sha_undulation_passive : public AuraScript
uint8 _castCounter = 1; // first proc happens after two casts, then one every 3 casts
};
+// 470057 - Voltaic Blaze
+class spell_sha_voltaic_blaze : public SpellScript
+{
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return spell_sha_maelstrom_weapon_base::Validate();
+ }
+
+ void ApplyFlameShock(SpellEffIndex /*effIndex*/) const
+ {
+ Unit* caster = GetCaster();
+ caster->m_Events.AddEventAtOffset([caster, targets = CastSpellTargetArg(GetHitUnit())]() mutable
+ {
+ if (!targets.Targets)
+ return;
+
+ targets.Targets->Update(caster);
+
+ caster->CastSpell(targets, SPELL_SHAMAN_FLAME_SHOCK, true);
+ }, 500ms);
+ }
+
+ void EnergizeMaelstrom(SpellEffIndex /*effIndex*/) const
+ {
+ spell_sha_maelstrom_weapon_base::GenerateMaelstromWeapon(GetCaster(), GetEffectValue());
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_sha_voltaic_blaze::ApplyFlameShock, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
+ OnEffectHitTarget += SpellEffectFn(spell_sha_voltaic_blaze::EnergizeMaelstrom, EFFECT_1, SPELL_EFFECT_DUMMY);
+ }
+};
+
+// 470058 - Voltaic Blaze
+class spell_sha_voltaic_blaze_aura : public AuraScript
+{
+ static bool CheckProc(ProcEventInfo const& eventInfo)
+ {
+ // 470057 - Voltaic Blaze does not have any unique SpellFamilyFlags, check by id
+ return eventInfo.GetSpellInfo()->Id == SPELL_SHAMAN_VOLTAIC_BLAZE_DAMAGE;
+ }
+
+ void Register() override
+ {
+ DoCheckProc += AuraCheckProcFn(spell_sha_voltaic_blaze_aura::CheckProc);
+ }
+};
+
+// 470053 - Voltaic Blaze
+class spell_sha_voltaic_blaze_talent : public AuraScript
+{
+ static bool CheckProc(AuraEffect const* aurEff, ProcEventInfo const& /*eventInfo*/)
+ {
+ return roll_chance_i(aurEff->GetAmount());
+ }
+
+ static void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo const& eventInfo)
+ {
+ eventInfo.GetActor()->CastSpell(eventInfo.GetActor(), SPELL_SHAMAN_VOLTAIC_BLAZE_OVERRIDE);
+ }
+
+ void Register() override
+ {
+ DoCheckEffectProc += AuraCheckEffectProcFn(spell_sha_voltaic_blaze_talent::CheckProc, EFFECT_0, SPELL_AURA_DUMMY);
+ OnEffectProc += AuraEffectProcFn(spell_sha_voltaic_blaze_talent::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
+ }
+};
+
// 33757 - Windfury Weapon
class spell_sha_windfury_weapon : public SpellScript
{
@@ -2303,6 +2374,9 @@ void AddSC_shaman_spell_scripts()
RegisterSpellScript(spell_sha_thorims_invocation_trigger);
RegisterSpellScript(spell_sha_unlimited_power);
RegisterSpellScript(spell_sha_undulation_passive);
+ RegisterSpellScript(spell_sha_voltaic_blaze);
+ RegisterSpellScript(spell_sha_voltaic_blaze_aura);
+ RegisterSpellScript(spell_sha_voltaic_blaze_talent);
RegisterSpellScript(spell_sha_windfury_weapon);
RegisterSpellScript(spell_sha_windfury_weapon_proc);
RegisterSpellScript(spell_sha_windspeakers_lava_resurgence);