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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user