Core/Auras: Implemented new spell proc attribute PROC_ATTR_USE_STACKS_FOR_CHARGES to drop stacks instead of charges
Port From (https://github.com/TrinityCore/TrinityCore/commit/54c5cc97f53dd456a4496d23c0b3375f9280639a)
This commit is contained in:
@@ -2412,6 +2412,7 @@ namespace Framework.Constants
|
|||||||
TriggeredCanProc = 0x02, // aura can proc even with triggered spells
|
TriggeredCanProc = 0x02, // aura can proc even with triggered spells
|
||||||
ReqPowerCost = 0x04, // requires triggering spell to have a power cost for aura proc
|
ReqPowerCost = 0x04, // requires triggering spell to have a power cost for aura proc
|
||||||
ReqSpellmod = 0x08, // requires triggering spell to be affected by proccing aura to drop charges
|
ReqSpellmod = 0x08, // requires triggering spell to be affected by proccing aura to drop charges
|
||||||
|
UseStacksForCharges = 0x10, // consuming proc drops a stack from proccing aura instead of charge
|
||||||
ReduceProc60 = 0x80 // aura should have a reduced chance to proc if level of proc Actor > 60
|
ReduceProc60 = 0x80 // aura should have a reduced chance to proc if level of proc Actor > 60
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1834,8 +1834,13 @@ namespace Game.Spells
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Remove aura if we've used last charge to proc
|
// Remove aura if we've used last charge to proc
|
||||||
if (IsUsingCharges() && GetCharges() == 0)
|
if (IsUsingCharges())
|
||||||
Remove();
|
{
|
||||||
|
if (GetCharges() == 0)
|
||||||
|
Remove();
|
||||||
|
}
|
||||||
|
else if (Global.SpellMgr.GetSpellProcEntry(m_spellInfo).AttributesMask.HasAnyFlag(ProcAttributes.UseStacksForCharges))
|
||||||
|
ModStackAmount(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public float CalcPPMProcChance(Unit actor)
|
public float CalcPPMProcChance(Unit actor)
|
||||||
|
|||||||
Reference in New Issue
Block a user