fix(Core/Spells): Allow Mutilate offhand to proc Focused Attacks (#24907)

This commit is contained in:
blinkysc
2026-02-26 18:52:50 -06:00
committed by GitHub
parent 5adb7e07e8
commit 424f97208a
2 changed files with 32 additions and 0 deletions

View File

@@ -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');

View File

@@ -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);
}