From 1bb7c63cf9dfde6b89cd783478f918c8ac74271d Mon Sep 17 00:00:00 2001 From: ariel- Date: Tue, 6 Sep 2016 22:23:34 -0300 Subject: [PATCH] Core/Entities: moved duplicated triggered cast proc check to Unit::ProcDamageAndSpellFor, it was preventing some always triggered auras from proccing. --- src/server/game/Entities/Unit/Unit.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index cec338926e..cb8890bace 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -12798,9 +12798,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) { @@ -12814,7 +12818,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<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;