mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Spell: make a distinction between triggered flags with debugging purposes, and don't use them when casting triggered spells
Fixes #9721 (also other spells affected, example Threat of Thassarian, Stormstrike)
(cherry picked from commit 85143f305d)
This commit is contained in:
@@ -318,13 +318,19 @@ enum TriggerCastFlags : uint32
|
||||
TRIGGERED_IGNORE_SET_FACING = 0x00000200, //! Will not adjust facing to target (if any)
|
||||
TRIGGERED_IGNORE_SHAPESHIFT = 0x00000400, //! Will ignore shapeshift checks
|
||||
TRIGGERED_IGNORE_CASTER_AURASTATE = 0x00000800, //! Will ignore caster aura states including combat requirements and death state
|
||||
// reuse = 0x00001000,
|
||||
TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE = 0x00002000, //! Will ignore mounted/on vehicle restrictions
|
||||
// reuse = 0x00004000,
|
||||
// reuse = 0x00008000,
|
||||
TRIGGERED_IGNORE_CASTER_AURAS = 0x00010000, //! Will ignore caster aura restrictions or requirements
|
||||
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
|
||||
|
||||
// debug flags (used with .cast triggered commands)
|
||||
TRIGGERED_IGNORE_EQUIPPED_ITEM_REQUIREMENT = 0x00080000, //! Will ignore equipped item requirements
|
||||
TRIGGERED_IGNORE_TARGET_CHECK = 0x00100000, //! Will ignore most target checks (mostly DBC target checks)
|
||||
TRIGGERED_FULL_MASK = 0xFFFFFFFF
|
||||
TRIGGERED_FULL_DEBUG_MASK = 0xFFFFFFFF
|
||||
};
|
||||
|
||||
enum UnitMods
|
||||
|
||||
@@ -102,8 +102,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
bool triggered = (triggeredStr != NULL);
|
||||
|
||||
TriggerCastFlags triggered = (triggeredStr != NULL) ? TRIGGERED_FULL_DEBUG_MASK : TRIGGERED_NONE;
|
||||
handler->GetSession()->GetPlayer()->CastSpell(target, spellId, triggered);
|
||||
|
||||
return true;
|
||||
@@ -135,8 +134,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
bool triggered = (triggeredStr != NULL);
|
||||
|
||||
TriggerCastFlags triggered = (triggeredStr != NULL) ? TRIGGERED_FULL_DEBUG_MASK : TRIGGERED_NONE;
|
||||
caster->CastSpell(handler->GetSession()->GetPlayer(), spellId, triggered);
|
||||
|
||||
return true;
|
||||
@@ -170,8 +168,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
bool triggered = (triggeredStr != NULL);
|
||||
|
||||
TriggerCastFlags triggered = (triggeredStr != NULL) ? TRIGGERED_FULL_DEBUG_MASK : TRIGGERED_NONE;
|
||||
float x, y, z;
|
||||
handler->GetSession()->GetPlayer()->GetClosePoint(x, y, z, dist);
|
||||
|
||||
@@ -233,8 +230,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
bool triggered = (triggeredStr != NULL);
|
||||
|
||||
TriggerCastFlags triggered = (triggeredStr != NULL) ? TRIGGERED_FULL_DEBUG_MASK : TRIGGERED_NONE;
|
||||
caster->CastSpell(caster->GetVictim(), spellId, triggered);
|
||||
|
||||
return true;
|
||||
@@ -277,8 +273,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
bool triggered = (triggeredStr != NULL);
|
||||
|
||||
TriggerCastFlags triggered = (triggeredStr != NULL) ? TRIGGERED_FULL_DEBUG_MASK : TRIGGERED_NONE;
|
||||
caster->CastSpell(x, y, z, spellId, triggered);
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user