Core/Auras: Implemented new spell proc attribute PROC_ATTR_USE_STACKS_FOR_CHARGES to drop stacks instead of charges

This commit is contained in:
Shauren
2021-02-18 23:28:26 +01:00
committed by Ovahlord
parent 116a9864d8
commit bb450b82ef
2 changed files with 16 additions and 8 deletions

View File

@@ -1873,8 +1873,13 @@ void Aura::TriggerProcOnEvent(uint8 procEffectMask, AuraApplication* aurApp, Pro
}
// Remove aura if we've used last charge to proc
if (IsUsingCharges() && !GetCharges())
Remove();
if (IsUsingCharges())
{
if (!GetCharges())
Remove();
}
else if (ASSERT_NOTNULL(sSpellMgr->GetSpellProcEntry(m_spellInfo->Id))->AttributesMask & PROC_ATTR_USE_STACKS_FOR_CHARGES)
ModStackAmount(-1);
}
void Aura::_DeleteRemovedApplications()

View File

@@ -236,12 +236,15 @@ enum ProcFlagsHit
enum ProcAttributes
{
PROC_ATTR_REQ_EXP_OR_HONOR = 0x0000001, // requires proc target to give exp or honor for aura proc
PROC_ATTR_TRIGGERED_CAN_PROC = 0x0000002, // aura can proc even with triggered spells
PROC_ATTR_REQ_MANA_COST = 0x0000004, // requires triggering spell to have a mana cost for aura proc
PROC_ATTR_REQ_SPELLMOD = 0x0000008, // requires triggering spell to be affected by proccing aura to drop charges
PROC_ATTR_REDUCE_PROC_60 = 0x0000080, // aura should have a reduced chance to proc if level of proc Actor > 60
PROC_ATTR_CANT_PROC_FROM_ITEM_CAST = 0x0000100, // do not allow aura proc if proc is caused by a spell casted by item
PROC_ATTR_REQ_EXP_OR_HONOR = 0x0000001, // requires proc target to give exp or honor for aura proc
PROC_ATTR_TRIGGERED_CAN_PROC = 0x0000002, // aura can proc even with triggered spells
PROC_ATTR_REQ_POWER_COST = 0x0000004, // requires triggering spell to have a power cost for aura proc
PROC_ATTR_REQ_SPELLMOD = 0x0000008, // requires triggering spell to be affected by proccing aura to drop charges
PROC_ATTR_REDUCE_PROC_60 = 0x0000080, // aura should have a reduced chance to proc if level of proc Actor > 60
PROC_ATTR_USE_STACKS_FOR_CHARGES = 0x0000010, // consuming proc drops a stack from proccing aura instead of charge
PROC_ATTR_REDUCE_PROC_60 = 0x0000080, // aura should have a reduced chance to proc if level of proc Actor > 60
PROC_ATTR_CANT_PROC_FROM_ITEM_CAST = 0x0000100, // do not allow aura proc if proc is caused by a spell casted by item
};
struct SpellProcEntry