diff options
author | Aqua Deus <95978183+aquadeus@users.noreply.github.com> | 2022-02-07 00:20:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-07 00:20:01 +0100 |
commit | d5bb799f27f2604741af2de8db07b2871d37b378 (patch) | |
tree | 56146c95d783810a4f67801e812ff89fb92ea0a2 /src | |
parent | a8cace4c7086c65b760cca38c922410b7400130c (diff) |
Scripts/Spells: Fix shaman Undulation talent (#27695)
Co-authored-by: Modox <moardox@gmail.com>
Co-authored-by: Shauren <shauren.trinity@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Spells/spell_shaman.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index a3967af2738..8ba4423d60f 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -104,6 +104,7 @@ enum ShamanSpells SPELL_SHAMAN_TOTEMIC_POWER_SPELL_POWER = 28825, SPELL_SHAMAN_TOTEMIC_POWER_ATTACK_POWER = 28826, SPELL_SHAMAN_TOTEMIC_POWER_ARMOR = 28827, + SPELL_SHAMAN_UNDULATION_PROC = 216251, SPELL_SHAMAN_UNLIMITED_POWER_BUFF = 272737, SPELL_SHAMAN_WINDFURY_ATTACK = 25504, SPELL_SHAMAN_WINDFURY_ENCHANTMENT = 334302, @@ -1636,6 +1637,33 @@ class spell_sha_unlimited_power : public AuraScript } }; +// 200071 - Undulation +class spell_sha_undulation_passive : public AuraScript +{ + PrepareAuraScript(spell_sha_undulation_passive); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_SHAMAN_UNDULATION_PROC }); + } + + void HandleProc(AuraEffect* /*aurEff*/, ProcEventInfo& /*eventInfo*/) + { + if (++_castCounter == 3) + { + GetTarget()->CastSpell(GetTarget(), SPELL_SHAMAN_UNDULATION_PROC, true); + _castCounter = 0; + } + } + + void Register() override + { + OnEffectProc += AuraEffectProcFn(spell_sha_undulation_passive::HandleProc, EFFECT_0, SPELL_AURA_DUMMY); + } + + uint8 _castCounter = 1; // first proc happens after two casts, then one every 3 casts +}; + // 33757 - Windfury Weapon class spell_sha_windfury_weapon : public SpellScript { @@ -1781,6 +1809,7 @@ void AddSC_shaman_spell_scripts() RegisterSpellScript(spell_sha_t10_elemental_4p_bonus); RegisterSpellScript(spell_sha_t10_restoration_4p_bonus); RegisterSpellScript(spell_sha_unlimited_power); + RegisterSpellScript(spell_sha_undulation_passive); RegisterSpellScript(spell_sha_windfury_weapon); RegisterSpellScript(spell_sha_windfury_weapon_proc); RegisterAreaTriggerAI(areatrigger_sha_wind_rush_totem); |