diff options
author | ariel- <ariel-@users.noreply.github.com> | 2016-09-06 22:23:34 -0300 |
---|---|---|
committer | joschiwald <joschiwald.trinity@gmail.com> | 2017-02-26 15:30:14 +0100 |
commit | c229816104c346d4c00d587d6418df0b999e2da1 (patch) | |
tree | 8415784b0334fbdfdf8f4b2c0782ae913ec0e807 | |
parent | 945bbbfa77d4800bf9e6c156981d984e6d648455 (diff) |
Core/Entities: moved duplicated triggered cast proc check to Unit::ProcDamageAndSpellFor, it was preventing some always triggered auras from proccing.
(cherry picked from commit 19e757af5cb6bbde3f9263f0f4aaec87a7e0301c)
-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 3332f1510a0..a7ee9419d2c 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -11677,9 +11677,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 (AuraEffect const* aurEff : itr->second->GetBase()->GetAuraEffects()) { @@ -11692,7 +11696,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 << aurEff->GetEffIndex(); } } @@ -12649,13 +12653,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; |