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:
1 parent
ffb22996b1
commit
73bae7c5e5
3 files changed
+5
-21
No files matched your search
@@ -455,7 +455,7 @@ enum SpellAttr2
|
||||
SPELL_ATTR2_UNK27 = 0x08000000, // 27
|
||||
SPELL_ATTR2_IGNORE_ACTION_AURA_INTERRUPT_FLAGS = 0x10000000, // 28 doesnt break auras with SpellAuraInterruptFlags::Action and SpellAuraInterruptFlags::ActionDelayed
|
||||
SPELL_ATTR2_CANT_CRIT = 0x20000000, // 29 Spell can't crit
|
||||
SPELL_ATTR2_TRIGGERED_CAN_TRIGGER_PROC = 0x40000000, // 30 spell can trigger even if triggered
|
||||
SPELL_ATTR2_ACTIVE_THREAT = 0x40000000, // 30 Active Threat
|
||||
SPELL_ATTR2_FOOD_BUFF = 0x80000000 // 31 Food or Drink Buff (like Well Fed)
|
||||
};
|
||||
|
||||
@@ -470,7 +470,7 @@ enum SpellAttr3
|
||||
SPELL_ATTR3_UNK6 = 0x00000040, // 6
|
||||
SPELL_ATTR3_STACK_FOR_DIFF_CASTERS = 0x00000080, // 7 separate stack for every caster
|
||||
SPELL_ATTR3_ONLY_TARGET_PLAYERS = 0x00000100, // 8 can only target players
|
||||
SPELL_ATTR3_TRIGGERED_CAN_TRIGGER_PROC_2 = 0x00000200, // 9 triggered from effect?
|
||||
SPELL_ATTR3_NOT_A_PROC = 0x00000200, // 9 Not a Proc
|
||||
SPELL_ATTR3_MAIN_HAND = 0x00000400, // 10 Main hand weapon required
|
||||
SPELL_ATTR3_BATTLEGROUND = 0x00000800, // 11 Can only be cast in battleground
|
||||
SPELL_ATTR3_ONLY_TARGET_GHOSTS = 0x00001000, // 12
|
||||
@@ -487,7 +487,7 @@ enum SpellAttr3
|
||||
SPELL_ATTR3_UNK23 = 0x00800000, // 23
|
||||
SPELL_ATTR3_REQ_OFFHAND = 0x01000000, // 24 Req offhand weapon
|
||||
SPELL_ATTR3_TREAT_AS_PERIODIC = 0x02000000, // 25 Makes the spell appear as periodic in client combat logs - used by spells that trigger another spell on each tick
|
||||
SPELL_ATTR3_CAN_PROC_WITH_TRIGGERED = 0x04000000, // 26 auras with this attribute can proc from triggered spell casts with SPELL_ATTR3_TRIGGERED_CAN_TRIGGER_PROC_2 (67736 + 52999)
|
||||
SPELL_ATTR3_CAN_PROC_FROM_PROCS = 0x04000000, // 26 Can Proc From Procs
|
||||
SPELL_ATTR3_DRAIN_SOUL = 0x08000000, // 27 only drain soul has this flag
|
||||
SPELL_ATTR3_UNK28 = 0x10000000, // 28
|
||||
SPELL_ATTR3_NO_DONE_BONUS = 0x20000000, // 29 Ignore caster spellpower and done damage mods? client doesn't apply spellmods for those spells
|
||||
|
||||
@@ -1733,8 +1733,8 @@ uint8 Aura::GetProcEffectMask(AuraApplication* aurApp, ProcEventInfo& eventInfo,
|
||||
return 0;
|
||||
|
||||
// check if aura can proc when spell is triggered (exception for hunter auto shot & wands)
|
||||
if (spell->IsTriggered() && !(procEntry->AttributesMask & PROC_ATTR_TRIGGERED_CAN_PROC) && !(eventInfo.GetTypeMask() & AUTO_ATTACK_PROC_FLAG_MASK))
|
||||
if (!GetSpellInfo()->HasAttribute(SPELL_ATTR3_CAN_PROC_WITH_TRIGGERED))
|
||||
if (!GetSpellInfo()->HasAttribute(SPELL_ATTR3_CAN_PROC_FROM_PROCS) && !(procEntry->AttributesMask & PROC_ATTR_TRIGGERED_CAN_PROC) && !(eventInfo.GetTypeMask() & AUTO_ATTACK_PROC_FLAG_MASK))
|
||||
if (spell->IsTriggered() && !spell->GetSpellInfo()->HasAttribute(SPELL_ATTR3_NOT_A_PROC))
|
||||
return 0;
|
||||
|
||||
if (spell->m_CastItem && (procEntry->AttributesMask & PROC_ATTR_CANT_PROC_FROM_ITEM_CAST))
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user