mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Spells: Exclude TriggerCastFlags that can be set for non-triggered spells from being checked by Spell::IsTriggered
This commit is contained in:
@@ -8376,7 +8376,7 @@ bool Spell::CheckEffectTarget(Item const* /*target*/, SpellEffectInfo const& /*s
|
||||
|
||||
bool Spell::IsTriggered() const
|
||||
{
|
||||
return (!m_fromClient && (_triggeredCastFlags & TRIGGERED_FULL_MASK) != 0)
|
||||
return (!m_fromClient && (_triggeredCastFlags & TRIGGERED_IS_TRIGGERED_MASK) != 0)
|
||||
|| !m_originalCastId.IsEmpty();
|
||||
}
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ enum SpellCastFlags : uint32
|
||||
CAST_FLAG_UNKNOWN_8 = 0x00000080,
|
||||
CAST_FLAG_UNKNOWN_9 = 0x00000100,
|
||||
CAST_FLAG_UNKNOWN_10 = 0x00000200,
|
||||
CAST_FLAG_UNKNOWN_11 = 0x00000400,
|
||||
CAST_FLAG_UNKNOWN_11 = 0x00000400, // sorts missed targets before hit targets for chain visual
|
||||
CAST_FLAG_POWER_LEFT_SELF = 0x00000800,
|
||||
CAST_FLAG_UNKNOWN_13 = 0x00001000,
|
||||
CAST_FLAG_UNKNOWN_14 = 0x00002000,
|
||||
|
||||
@@ -275,6 +275,10 @@ enum TriggerCastFlags : uint32
|
||||
TRIGGERED_DONT_RESET_PERIODIC_TIMER = 0x00020000, //!< Will allow periodic aura timers to keep ticking (instead of resetting)
|
||||
TRIGGERED_DONT_REPORT_CAST_ERROR = 0x00040000, //!< Will return SPELL_FAILED_DONT_REPORT in CheckCast functions
|
||||
TRIGGERED_FULL_MASK = 0x0007FFFF, //!< Used when doing CastSpell with triggered == true
|
||||
TRIGGERED_IS_TRIGGERED_MASK = TRIGGERED_FULL_MASK
|
||||
& ~(TRIGGERED_IGNORE_POWER_COST | TRIGGERED_IGNORE_CAST_IN_PROGRESS
|
||||
| TRIGGERED_IGNORE_CAST_TIME | TRIGGERED_IGNORE_SHAPESHIFT
|
||||
| TRIGGERED_DONT_REPORT_CAST_ERROR), //!< Will be recognized by Spell::IsTriggered as triggered
|
||||
|
||||
// debug flags (used with .cast triggered commands)
|
||||
TRIGGERED_IGNORE_EQUIPPED_ITEM_REQUIREMENT = 0x00080000, //!< Will ignore equipped item requirements
|
||||
|
||||
Reference in New Issue
Block a user