Core/Spells: explicitly disable non proccing auras when generating default procs

Closes #21529
This commit is contained in:
ariel-
2018-03-02 02:57:23 -03:00
committed by Aokromes
parent 2697bdf2b2
commit 23b2d7bcea

View File

@@ -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;