mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 10:05:32 +01:00
Core/Spells: explicitly disable non proccing auras when generating default procs
Closes #21529
This commit is contained in:
@@ -1818,6 +1818,7 @@ void SpellMgr::LoadSpellProcs()
|
||||
|
||||
bool addTriggerFlag = false;
|
||||
uint32 procSpellTypeMask = PROC_SPELL_TYPE_NONE;
|
||||
uint32 nonProcMask = 0;
|
||||
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
{
|
||||
if (!spellInfo->Effects[i].IsEffect())
|
||||
@@ -1828,7 +1829,11 @@ void SpellMgr::LoadSpellProcs()
|
||||
continue;
|
||||
|
||||
if (!isTriggerAura[auraName])
|
||||
{
|
||||
// explicitly disable non proccing auras to avoid losing charges on self proc
|
||||
nonProcMask |= 1 << i;
|
||||
continue;
|
||||
}
|
||||
|
||||
procSpellTypeMask |= spellTypeMask[auraName];
|
||||
if (isAlwaysTriggeredAura[auraName])
|
||||
@@ -1848,7 +1853,6 @@ void SpellMgr::LoadSpellProcs()
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (!procSpellTypeMask)
|
||||
@@ -1911,6 +1915,8 @@ void SpellMgr::LoadSpellProcs()
|
||||
procEntry.AttributesMask |= PROC_ATTR_REQ_EXP_OR_HONOR;
|
||||
if (addTriggerFlag)
|
||||
procEntry.AttributesMask |= PROC_ATTR_TRIGGERED_CAN_PROC;
|
||||
if (nonProcMask)
|
||||
procEntry.AttributesMask |= nonProcMask * PROC_ATTR_DISABLE_EFF_0;
|
||||
|
||||
procEntry.ProcsPerMinute = 0;
|
||||
procEntry.Chance = spellInfo->ProcChance;
|
||||
|
||||
Reference in New Issue
Block a user