Core/Unit: added GetTotalAuraXXX overloads taking a predicate - Redefined existing overloads to use the predicate logic, avoids code duplication and not checking same stack rules

This commit is contained in:
hondacrx
2018-03-12 14:00:18 -04:00
parent 53efa9224f
commit 237580ab50
3 changed files with 166 additions and 166 deletions
+1 -2
View File
@@ -360,9 +360,8 @@ namespace Game.Entities
}
}
public bool AddSameEffectStackRuleSpellGroups(SpellInfo spellInfo, int amount, out Dictionary<SpellGroup, int> groups)
public bool AddSameEffectStackRuleSpellGroups(SpellInfo spellInfo, int amount, Dictionary<SpellGroup, int> groups)
{
groups = new Dictionary<SpellGroup, int>();
uint spellId = spellInfo.GetFirstRankSpell().Id;
var spellGroup = GetSpellSpellGroupMapBounds(spellId);
// Find group with SPELL_GROUP_STACK_RULE_EXCLUSIVE_SAME_EFFECT if it belongs to one