Core/Spells: Exclude TriggerCastFlags that can be set for non-triggered spells from being checked by Spell::IsTriggered
Port From (https://github.com/TrinityCore/TrinityCore/commit/56fb627c7dd151190412468370db083ef3b044ad)
This commit is contained in:
@@ -1597,6 +1597,7 @@ namespace Framework.Constants
|
|||||||
DontResetPeriodicTimer = 0x20000, //! Will allow periodic aura timers to keep ticking (instead of resetting)
|
DontResetPeriodicTimer = 0x20000, //! Will allow periodic aura timers to keep ticking (instead of resetting)
|
||||||
DontReportCastError = 0x40000, //! Will Return SpellFailedDontReport In Checkcast Functions
|
DontReportCastError = 0x40000, //! Will Return SpellFailedDontReport In Checkcast Functions
|
||||||
FullMask = 0x0007FFFF, //! Used when doing CastSpell with triggered == true
|
FullMask = 0x0007FFFF, //! Used when doing CastSpell with triggered == true
|
||||||
|
IsTriggeredMask = FullMask & ~(IgnorePowerCost | IgnoreCastInProgress | IgnoreCastTime | IgnoreShapeshift | DontReportCastError), //!< Will be recognized by Spell::IsTriggered as triggered
|
||||||
|
|
||||||
// debug flags (used with .cast triggered commands)
|
// debug flags (used with .cast triggered commands)
|
||||||
IgnoreEquippedItemRequirement = 0x80000, //! Will ignore equipped item requirements
|
IgnoreEquippedItemRequirement = 0x80000, //! Will ignore equipped item requirements
|
||||||
@@ -1639,7 +1640,7 @@ namespace Framework.Constants
|
|||||||
Unk8 = 0x80,
|
Unk8 = 0x80,
|
||||||
Unk9 = 0x100,
|
Unk9 = 0x100,
|
||||||
Unk10 = 0x200,
|
Unk10 = 0x200,
|
||||||
Unk11 = 0x400,
|
Unk11 = 0x400, // sorts missed targets before hit targets for chain visual
|
||||||
PowerLeftSelf = 0x800,
|
PowerLeftSelf = 0x800,
|
||||||
Unk13 = 0x1000,
|
Unk13 = 0x1000,
|
||||||
Unk14 = 0x2000,
|
Unk14 = 0x2000,
|
||||||
|
|||||||
@@ -8476,7 +8476,7 @@ namespace Game.Spells
|
|||||||
m_timer = m_casttime > 0 ? m_casttime : 0;
|
m_timer = m_casttime > 0 ? m_casttime : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsTriggered() { return (!m_fromClient && _triggeredCastFlags.HasAnyFlag(TriggerCastFlags.FullMask)) || !m_originalCastId.IsEmpty(); }
|
public bool IsTriggered() { return (!m_fromClient && _triggeredCastFlags.HasAnyFlag(TriggerCastFlags.IsTriggeredMask)) || !m_originalCastId.IsEmpty(); }
|
||||||
public bool IsTriggeredByAura(SpellInfo auraSpellInfo) { return (auraSpellInfo == m_triggeredByAuraSpell); }
|
public bool IsTriggeredByAura(SpellInfo auraSpellInfo) { return (auraSpellInfo == m_triggeredByAuraSpell); }
|
||||||
public bool IsIgnoringCooldowns() { return _triggeredCastFlags.HasAnyFlag(TriggerCastFlags.IgnoreSpellAndCategoryCD); }
|
public bool IsIgnoringCooldowns() { return _triggeredCastFlags.HasAnyFlag(TriggerCastFlags.IgnoreSpellAndCategoryCD); }
|
||||||
public bool IsFocusDisabled() { return _triggeredCastFlags.HasFlag(TriggerCastFlags.IgnoreSetFacing) || (m_spellInfo.IsChanneled() && !m_spellInfo.HasAttribute(SpellAttr1.TrackTargetInChannel)); }
|
public bool IsFocusDisabled() { return _triggeredCastFlags.HasFlag(TriggerCastFlags.IgnoreSetFacing) || (m_spellInfo.IsChanneled() && !m_spellInfo.HasAttribute(SpellAttr1.TrackTargetInChannel)); }
|
||||||
|
|||||||
Reference in New Issue
Block a user