fix(Core/Spells): Prevent extra attack abilities from chain-proccing (#24806)

Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
Co-authored-by: trickerer <onlysuffering@gmail.com>
This commit is contained in:
blinkysc
2026-02-22 11:27:54 -06:00
committed by GitHub
parent e281f10b5b
commit 2990f13840
3 changed files with 211 additions and 0 deletions

View File

@@ -282,6 +282,45 @@ public:
return false; // Allow proc
}
// =============================================================================
// Extra Attack Chain-Proc Prevention - simulates SpellAuraEffects.cpp:1245-1261
// =============================================================================
/**
* @brief Configuration for simulating extra attack chain-proc prevention
*/
struct ExtraAttackProcConfig
{
bool triggeredSpellHasExtraAttacks = false; // triggeredSpellInfo->HasEffect(SPELL_EFFECT_ADD_EXTRA_ATTACKS)
uint32 triggerSpellId = 0; // m_spellInfo->Effects[GetEffIndex()].TriggerSpell
uint32 lastExtraAttackSpell = 0; // eventInfo.GetActor()->GetLastExtraAttackSpell()
};
/**
* @brief Simulate extra attack chain-proc prevention from CheckEffectProc
* Returns true if proc should be blocked
*
* @param config Extra attack proc configuration
* @return true if proc should be blocked
*/
static bool ShouldBlockExtraAttackChainProc(ExtraAttackProcConfig const& config)
{
// Only applies when the triggered spell grants extra attacks
if (!config.triggeredSpellHasExtraAttacks)
return false;
// Patch 1.12.0(?) extra attack abilities can no longer chain proc themselves
if (config.lastExtraAttackSpell == config.triggerSpellId)
return true;
// Patch 2.2.0 Sword Specialization (Warrior, Rogue) extra attack can no longer proc additional extra attacks
// 3.3.5 Sword Specialization (Warrior), Hack and Slash (Rogue)
if (config.lastExtraAttackSpell == 16459 || config.lastExtraAttackSpell == 66923)
return true;
return false;
}
// =============================================================================
// DisableEffectsMask - simulates SpellAuras.cpp:2244-2258
// =============================================================================