From 84552b53dad9ca0e65167956d228082a28b61795 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Wed, 14 Sep 2022 03:20:47 +0200 Subject: [PATCH] fix(DB/Spells): Added 500ms cooldown to Flurry proc. (#13002) --- .../rev_1662808735373629900.sql | 4 ++++ src/server/game/Entities/Unit/Unit.cpp | 20 ++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 data/sql/updates/pending_db_world/rev_1662808735373629900.sql diff --git a/data/sql/updates/pending_db_world/rev_1662808735373629900.sql b/data/sql/updates/pending_db_world/rev_1662808735373629900.sql new file mode 100644 index 000000000..dc6ba715d --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1662808735373629900.sql @@ -0,0 +1,4 @@ +-- +UPDATE `spell_proc_event` SET `Cooldown`=0 WHERE `entry`=-16256; +UPDATE `spell_proc_event` SET `Cooldown`=500 WHERE `entry`=-16257; + diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 78c282c29..ce05bb5d6 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -8348,7 +8348,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere // Used in case when access to whole aura is needed // All procs should be handled like this... -bool Unit::HandleAuraProc(Unit* victim, uint32 damage, Aura* triggeredByAura, SpellInfo const* /*procSpell*/, uint32 /*procFlag*/, uint32 procEx, uint32 /*cooldown*/, bool* handled) +bool Unit::HandleAuraProc(Unit* victim, uint32 damage, Aura* triggeredByAura, SpellInfo const* /*procSpell*/, uint32 /*procFlag*/, uint32 procEx, uint32 cooldown, bool* handled) { SpellInfo const* dummySpell = triggeredByAura->GetSpellInfo(); @@ -8521,6 +8521,24 @@ bool Unit::HandleAuraProc(Unit* victim, uint32 damage, Aura* triggeredByAura, Sp } break; } + case SPELLFAMILY_SHAMAN: + { + // Flurry + if ((dummySpell->SpellFamilyFlags[1] & 0x00000200) != 0) + { + if (cooldown) + { + if (HasSpellCooldown(dummySpell->Id)) + { + *handled = true; + break; + } + + AddSpellCooldown(dummySpell->Id, 0, cooldown); + } + } + break; + } } return false; }