diff options
-rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 0feebfce220..871293ed2c4 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -13869,9 +13869,13 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u if (!procSuccess) continue; - // Triggered spells not triggering additional spells - bool triggered = !spellProto->HasAttribute(SPELL_ATTR3_CAN_PROC_WITH_TRIGGERED) ? - (procExtra & PROC_EX_INTERNAL_TRIGGERED && !(procFlag & PROC_FLAG_DONE_TRAP_ACTIVATION)) : false; + bool triggeredCanProcAura = true; + // Additional checks for triggered spells (ignore trap casts) + if (procExtra & PROC_EX_INTERNAL_TRIGGERED && !(procFlag & PROC_FLAG_DONE_TRAP_ACTIVATION)) + { + if (!spellProto->HasAttribute(SPELL_ATTR3_CAN_PROC_WITH_TRIGGERED)) + triggeredCanProcAura = false; + } for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) { @@ -13885,7 +13889,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u if (!isTriggerAura[aurEff->GetAuraType()] && triggerData.spellProcEvent == NULL) continue; // Some spells must always trigger - if (!triggered || isAlwaysTriggeredAura[aurEff->GetAuraType()]) + if (triggeredCanProcAura || isAlwaysTriggeredAura[aurEff->GetAuraType()]) triggerData.effMask |= 1<<i; } } @@ -14806,13 +14810,6 @@ bool Unit::IsTriggeredAtSpellProcEvent(Unit* victim, Aura* aura, SpellInfo const if (!EventProcFlag) return false; - // Additional checks for triggered spells (ignore trap casts) - if (procExtra & PROC_EX_INTERNAL_TRIGGERED && !(procFlag & PROC_FLAG_DONE_TRAP_ACTIVATION)) - { - if (!spellInfo->HasAttribute(SPELL_ATTR3_CAN_PROC_WITH_TRIGGERED)) - return false; - } - // Check spellProcEvent data requirements if (!sSpellMgr->IsSpellProcEventCanTriggeredBy(spellInfo, spellProcEvent, EventProcFlag, procSpell, procFlag, procExtra, active)) return false; |