From 424f97208a04546a3f83bfe0a287b1c35a89287f Mon Sep 17 00:00:00 2001 From: blinkysc <37940565+blinkysc@users.noreply.github.com> Date: Thu, 26 Feb 2026 18:52:50 -0600 Subject: [PATCH] fix(Core/Spells): Allow Mutilate offhand to proc Focused Attacks (#24907) --- .../rev_1772144945706318839.sql | 7 ++++++ src/server/scripts/Spells/spell_rogue.cpp | 25 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1772144945706318839.sql diff --git a/data/sql/updates/pending_db_world/rev_1772144945706318839.sql b/data/sql/updates/pending_db_world/rev_1772144945706318839.sql new file mode 100644 index 000000000..f243d2ffe --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1772144945706318839.sql @@ -0,0 +1,7 @@ +-- Replace generic no-offhand-proc with Focused Attacks-specific script +-- that only blocks Fan of Knives offhand from proccing, allowing Mutilate +-- offhand and other offhand attacks to proc normally +DELETE FROM `spell_script_names` WHERE `spell_id` = -51634 AND `ScriptName` = 'spell_gen_no_offhand_proc'; +DELETE FROM `spell_script_names` WHERE `spell_id` = -51634 AND `ScriptName` = 'spell_rog_focused_attacks'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(-51634, 'spell_rog_focused_attacks'); diff --git a/src/server/scripts/Spells/spell_rogue.cpp b/src/server/scripts/Spells/spell_rogue.cpp index 832ec5c35..a234dbb5d 100644 --- a/src/server/scripts/Spells/spell_rogue.cpp +++ b/src/server/scripts/Spells/spell_rogue.cpp @@ -1062,6 +1062,30 @@ class spell_rog_turn_the_tables_proc : public SpellScript } }; +// -51634 - Focused Attacks +// Block Fan of Knives offhand from proccing +class spell_rog_focused_attacks : public AuraScript +{ + PrepareAuraScript(spell_rog_focused_attacks); + + bool CheckProc(ProcEventInfo& eventInfo) + { + // Block Fan of Knives offhand (0x40000) from proccing + SpellInfo const* spellInfo = eventInfo.GetSpellInfo(); + if (spellInfo && spellInfo->SpellFamilyName == SPELLFAMILY_ROGUE + && (spellInfo->SpellFamilyFlags[1] & 0x40000) + && (eventInfo.GetTypeMask() & PROC_FLAG_DONE_OFFHAND_ATTACK)) + return false; + + return true; + } + + void Register() override + { + DoCheckProc += AuraCheckProcFn(spell_rog_focused_attacks::CheckProc); + } +}; + void AddSC_rogue_spell_scripts() { RegisterSpellScript(spell_rog_savage_combat); @@ -1092,4 +1116,5 @@ void AddSC_rogue_spell_scripts() RegisterSpellAndAuraScriptPair(spell_rog_honor_among_thieves_proc, spell_rog_honor_among_thieves_proc_aura); RegisterSpellScript(spell_rog_turn_the_tables); RegisterSpellScript(spell_rog_turn_the_tables_proc); + RegisterSpellScript(spell_rog_focused_attacks); }