aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAqua Deus <95978183+aquadeus@users.noreply.github.com>2022-02-07 00:20:01 +0100
committerGitHub <noreply@github.com>2022-02-07 00:20:01 +0100
commitd5bb799f27f2604741af2de8db07b2871d37b378 (patch)
tree56146c95d783810a4f67801e812ff89fb92ea0a2
parenta8cace4c7086c65b760cca38c922410b7400130c (diff)
Scripts/Spells: Fix shaman Undulation talent (#27695)
Co-authored-by: Modox <moardox@gmail.com> Co-authored-by: Shauren <shauren.trinity@gmail.com>
-rw-r--r--sql/updates/world/master/2022_02_06_02_world_shaman_undulation.sql8
-rw-r--r--src/server/scripts/Spells/spell_shaman.cpp29
2 files changed, 37 insertions, 0 deletions
diff --git a/sql/updates/world/master/2022_02_06_02_world_shaman_undulation.sql b/sql/updates/world/master/2022_02_06_02_world_shaman_undulation.sql
new file mode 100644
index 00000000000..d7a141e4099
--- /dev/null
+++ b/sql/updates/world/master/2022_02_06_02_world_shaman_undulation.sql
@@ -0,0 +1,8 @@
+DELETE FROM `spell_proc` WHERE `SpellId` IN (200071,216251);
+INSERT INTO `spell_proc` (`SpellId`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`SpellFamilyMask3`,`ProcFlags`,`SpellTypeMask`,`SpellPhaseMask`,`HitMask`,`AttributesMask`,`DisableEffectsMask`,`ProcsPerMinute`,`Chance`,`Cooldown`,`Charges`) VALUES
+(200071,0x00,11,0x00000080,0x00000000,0x00010000,0x00000000,0x00004400,0x0,0x1,0x0,0x0,0x0,0,100,0,0), -- Undulation (passive)
+(216251,0x00,11,0x00000000,0x00000000,0x00000000,0x00000000,0x0,0x0,0x1,0x0,0x8,0x0,0,0,0,0); -- Undulation (proc)
+
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_sha_undulation_passive';
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(200071,'spell_sha_undulation_passive');
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);