Core/Spells: Exclude TriggerCastFlags that can be set for non-triggered spells from being checked by Spell::IsTriggered

This commit is contained in:
Shauren authored and Ovahlord committed 2025-08-02 08:58:18 +02:00
1 parent 3c18ebf97d
commit c158f40455
3 files changed
+7 -3

No files matched your search

+1 -1
View File
@@ -7877,7 +7877,7 @@ bool Spell::CheckEffectTarget(Unit const* target, uint32 eff, Position const* lo
bool Spell::IsTriggered() const
{
return (_triggeredCastFlags & TRIGGERED_FULL_MASK) != 0;
return (_triggeredCastFlags & TRIGGERED_IS_TRIGGERED_MASK) != 0;
}
bool Spell::IsIgnoringCooldowns() const
+2 -2
View File
@@ -76,7 +76,7 @@ enum WeaponAttackType : uint8;
constexpr float MAX_SPELL_RANGE_TOLERANCE = 3.0f;
constexpr float TRAJECTORY_MISSILE_SIZE = 3.0f;
enum SpellCastFlags
enum SpellCastFlags : uint32
{
CAST_FLAG_NONE = 0x00000000,
CAST_FLAG_PENDING = 0x00000001, // aoe combat log?
@@ -89,7 +89,7 @@ enum SpellCastFlags
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,
+4
View File
@@ -183,6 +183,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