mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Spell: reimplemented TRIGGERED_DISALLOW_PROC_EVENTS trigger flag
Triggered spells shouldn't chain-trigger other spells Closes #18217
This commit is contained in:
@@ -11002,6 +11002,11 @@ void Unit::TriggerAurasProcOnEvent(Unit* actionTarget, uint32 typeMaskActor, uin
|
||||
|
||||
void Unit::TriggerAurasProcOnEvent(ProcEventInfo& eventInfo, AuraApplicationProcContainer& aurasTriggeringProc)
|
||||
{
|
||||
Spell const* triggeringSpell = eventInfo.GetProcSpell();
|
||||
bool const disableProcs = triggeringSpell && triggeringSpell->IsProcDisabled();
|
||||
if (disableProcs)
|
||||
SetCantProc(true);
|
||||
|
||||
for (auto const& aurAppProc : aurasTriggeringProc)
|
||||
{
|
||||
AuraApplication* aurApp;
|
||||
@@ -11020,6 +11025,9 @@ void Unit::TriggerAurasProcOnEvent(ProcEventInfo& eventInfo, AuraApplicationProc
|
||||
if (spellInfo->HasAttribute(SPELL_ATTR3_DISABLE_PROC))
|
||||
SetCantProc(false);
|
||||
}
|
||||
|
||||
if (disableProcs)
|
||||
SetCantProc(false);
|
||||
}
|
||||
|
||||
SpellSchoolMask Unit::GetMeleeDamageSchoolMask() const
|
||||
|
||||
@@ -425,7 +425,7 @@ enum TriggerCastFlags
|
||||
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_DISALLOW_PROC_EVENTS = 0x00001000, //! Disallows proc events from triggered spell (default)
|
||||
TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE = 0x00002000, //! Will ignore mounted/on vehicle restrictions
|
||||
// reuse = 0x00004000,
|
||||
// reuse = 0x00008000,
|
||||
|
||||
@@ -476,6 +476,7 @@ class TC_GAME_API Spell
|
||||
bool IsNextMeleeSwingSpell() const;
|
||||
bool IsTriggered() const { return (_triggeredCastFlags & TRIGGERED_FULL_MASK) != 0; }
|
||||
bool IsIgnoringCooldowns() const { return (_triggeredCastFlags & TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD) != 0; }
|
||||
bool IsProcDisabled() const { return (_triggeredCastFlags & TRIGGERED_DISALLOW_PROC_EVENTS) != 0; }
|
||||
bool IsChannelActive() const { return m_caster->GetUInt32Value(UNIT_CHANNEL_SPELL) != 0; }
|
||||
bool IsAutoActionResetSpell() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user