Core/Spell: added some helpers to SpellInfo to reduce code duplication

This commit is contained in:
hondacrx
2018-03-18 12:27:19 -04:00
parent 2ca6b95029
commit 4d8391a7fd
3 changed files with 57 additions and 40 deletions
+1 -8
View File
@@ -1479,14 +1479,7 @@ namespace Game.Entities
expertise += GetTotalAuraModifier(AuraType.ModExpertise, aurEff =>
{
// item neutral spell
if ((int)aurEff.GetSpellInfo().EquippedItemClass == -1)
return true;
// item dependent spell
else if (weapon != null && weapon.IsFitToSpellRequirements(aurEff.GetSpellInfo()))
return true;
return false;
return aurEff.GetSpellInfo().IsItemFitToSpellRequirements(weapon);
});
if (expertise < 0)