Core/Entities: moved duplicated triggered cast proc check to Unit::ProcDamageAndSpellFor, it was preventing some always triggered auras from proccing.

This commit is contained in:
ariel- authored and Aokromes committed 2016-09-08 07:07:15 +02:00
1 parent 3c2da4159e
commit 1bb7c63cf9
1 file changed
+8 -11
+8 -11
View File
@@ -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<<i;
}
}
@@ -13747,13 +13751,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;