Core/Auras: prevent stack overflow while processing SPELL_EFFECT_ADD_EXTRA_ATTACKS

This commit is contained in:
ariel-
2016-10-07 12:52:01 -03:00
parent d078029124
commit b93ee312fa

View File

@@ -993,6 +993,16 @@ bool AuraEffect::CheckEffectProc(AuraApplication* aurApp, ProcEventInfo& eventIn
if (!spellInfo || !(spellInfo->GetSchoolMask() & GetMiscValue()))
result = false;
break;
case SPELL_AURA_PROC_TRIGGER_SPELL:
case SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE:
{
// Don't proc extra attacks while already processing extra attack spell
uint32 triggerSpellId = GetSpellInfo()->Effects[GetEffIndex()].TriggerSpell;
if (SpellInfo const* triggeredSpellInfo = sSpellMgr->GetSpellInfo(triggerSpellId))
if (aurApp->GetTarget()->m_extraAttacks && triggeredSpellInfo->HasEffect(SPELL_EFFECT_ADD_EXTRA_ATTACKS))
result = false;
break;
}
default:
break;
}