mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user