mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-16 14:05:28 +00:00
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:
@@ -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
|
||||
// =============================================================================
|
||||
|
||||
Reference in New Issue
Block a user