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)

Port From (https://github.com/TrinityCore/TrinityCore/commit/b6bc8a50acaf153849f58c8b408e236bb2b70c35)
This commit is contained in:
hondacrx
2022-03-10 13:40:20 -05:00
parent c486b2a846
commit b9caad7455
3 changed files with 5 additions and 21 deletions
+2 -2
View File
@@ -1709,8 +1709,8 @@ namespace Game.Spells
return 0;
// check if aura can proc when spell is triggered (exception for hunter auto shot & wands)
if (spell.IsTriggered() && !procEntry.AttributesMask.HasAnyFlag(ProcAttributes.TriggeredCanProc) && !eventInfo.GetTypeMask().HasFlag(ProcFlags.AutoAttackMask))
if (!GetSpellInfo().HasAttribute(SpellAttr3.CanProcWithTriggered))
if (!GetSpellInfo().HasAttribute(SpellAttr3.CanProcFromProcs) && !procEntry.AttributesMask.HasFlag(ProcAttributes.TriggeredCanProc) && !eventInfo.GetTypeMask().HasFlag(ProcFlags.AutoAttackMask))
if (spell.IsTriggered() && !spell.GetSpellInfo().HasAttribute(SpellAttr3.NotAProc))
return 0;
}
-16
View File
@@ -487,22 +487,6 @@ namespace Game.Entities
if (eventInfo.GetTypeMask().HasAnyFlag(ProcFlags.Killed | ProcFlags.Kill | ProcFlags.Death))
return true;
// Do not consider autoattacks as triggered spells
if (!procEntry.AttributesMask.HasAnyFlag(ProcAttributes.TriggeredCanProc) && !eventInfo.GetTypeMask().HasFlag(ProcFlags.AutoAttackMask))
{
Spell spell = eventInfo.GetProcSpell();
if (spell)
{
if (spell.IsTriggered())
{
SpellInfo spellInfo = spell.GetSpellInfo();
if (!spellInfo.HasAttribute(SpellAttr3.TriggeredCanTriggerProc2) &&
!spellInfo.HasAttribute(SpellAttr2.TriggeredCanTriggerProc))
return false;
}
}
}
// check school mask (if set) for other trigger types
if (procEntry.SchoolMask != 0 && !Convert.ToBoolean(eventInfo.GetSchoolMask() & procEntry.SchoolMask))
return false;