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:
hondacrx
2021-02-21 21:36:09 -05:00
parent 22100aa2f2
commit 7080de0cac
2 changed files with 8 additions and 2 deletions
+7 -2
View File
@@ -1834,8 +1834,13 @@ namespace Game.Spells
}
// Remove aura if we've used last charge to proc
if (IsUsingCharges() && GetCharges() == 0)
Remove();
if (IsUsingCharges())
{
if (GetCharges() == 0)
Remove();
}
else if (Global.SpellMgr.GetSpellProcEntry(m_spellInfo).AttributesMask.HasAnyFlag(ProcAttributes.UseStacksForCharges))
ModStackAmount(-1);
}
public float CalcPPMProcChance(Unit actor)