Core/Spell: reimplemented TRIGGERED_DISALLOW_PROC_EVENTS trigger flag

Triggered spells shouldn't chain-trigger other spells

Closes #18217
This commit is contained in:
ariel- authored and roc13x committed 2017-05-04 01:28:42 +01:00
1 parent fb6cde2730
commit fcb7910533
3 files changed
+10 -1

No files matched your search

+8
View File
@@ -10730,6 +10730,11 @@ void Unit::TriggerAurasProcOnEvent(Unit* actionTarget, uint32 typeMaskActor, uin
void Unit::TriggerAurasProcOnEvent(ProcEventInfo& eventInfo, AuraApplicationProcContainer& aurasTriggeringProc)
{
Spell const* triggeringSpell = eventInfo.GetProcSpell();
bool const disableProcs = triggeringSpell && triggeringSpell->IsProcDisabled();
if (disableProcs)
SetCantProc(true);
for (auto const& aurAppProc : aurasTriggeringProc)
{
AuraApplication* aurApp;
@@ -10748,6 +10753,9 @@ void Unit::TriggerAurasProcOnEvent(ProcEventInfo& eventInfo, AuraApplicationProc
if (spellInfo->HasAttribute(SPELL_ATTR3_DISABLE_PROC))
SetCantProc(false);
}
if (disableProcs)
SetCantProc(false);
}
SpellSchoolMask Unit::GetMeleeDamageSchoolMask() const