diff options
author | ariel- <ariel-@users.noreply.github.com> | 2016-09-06 22:23:34 -0300 |
---|---|---|
committer | ariel- <ariel-@users.noreply.github.com> | 2016-09-06 22:23:34 -0300 |
commit | 19e757af5cb6bbde3f9263f0f4aaec87a7e0301c (patch) | |
tree | 22c15d615561d682642c1495ef6fa83ef58a70db /src | |
parent | 805637cea15470dac4b9417494e4d89f1c1d3239 (diff) |
Core/Entities: moved duplicated triggered cast proc check to Unit::ProcDamageAndSpellFor, it was preventing some always triggered auras from proccing.
Diffstat (limited to 'src')
-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; |