Core/Spells: Correct implementation of SPELL_ATTR2_TRIGGERED_CAN_TRIGGER_PROC, SPELL_ATTR3_TRIGGERED_CAN_TRIGGER_PROC_2, SPELL_ATTR3_CAN_PROC_WITH_TRIGGERED and rename them (SPELL_ATTR2_ACTIVE_THREAT, SPELL_ATTR3_NOT_A_PROC, SPELL_ATTR3_CAN_PROC_FROM_PROCS)

This commit is contained in:
Shauren authored and Ovahlord committed 2022-02-02 17:45:23 +01:00
1 parent ffb22996b1
commit 73bae7c5e5
3 files changed
+5 -21

No files matched your search

-16
View File
@@ -522,22 +522,6 @@ bool SpellMgr::CanSpellTriggerProcOnEvent(SpellProcEntry const& procEntry, ProcE
if (eventInfo.GetTypeMask() & (PROC_FLAG_KILLED | PROC_FLAG_KILL | PROC_FLAG_DEATH))
return true;
// do triggered cast checks
// Do not consider autoattacks as triggered spells
if (!(procEntry.AttributesMask & PROC_ATTR_TRIGGERED_CAN_PROC) && !(eventInfo.GetTypeMask() & AUTO_ATTACK_PROC_FLAG_MASK))
{
if (Spell const* spell = eventInfo.GetProcSpell())
{
if (spell->IsTriggered())
{
SpellInfo const* spellInfo = spell->GetSpellInfo();
if (!spellInfo->HasAttribute(SPELL_ATTR3_TRIGGERED_CAN_TRIGGER_PROC_2) &&
!spellInfo->HasAttribute(SPELL_ATTR2_TRIGGERED_CAN_TRIGGER_PROC))
return false;
}
}
}
// check school mask (if set) for other trigger types
if (procEntry.SchoolMask && !(eventInfo.GetSchoolMask() & procEntry.SchoolMask))
return false;