Core/Entities: Replace existing GetAuraEffectsByType + iteration uses with proper helper functions

This commit is contained in:
hondacrx
2018-03-12 14:33:20 -04:00
parent 237580ab50
commit 6ee6180866
6 changed files with 126 additions and 203 deletions
+2 -4
View File
@@ -4509,10 +4509,8 @@ namespace Game.Spells
}
}
var blockSpells = m_caster.GetAuraEffectsByType(AuraType.BlockSpellFamily);
foreach (var block in blockSpells)
if (block.GetMiscValue() == (int)m_spellInfo.SpellFamilyName)
return SpellCastResult.SpellUnavailable;
if (m_caster.HasAuraTypeWithMiscvalue(AuraType.BlockSpellFamily, (int)m_spellInfo.SpellFamilyName))
return SpellCastResult.SpellUnavailable;
bool reqCombat = true;
var stateAuras = m_caster.GetAuraEffectsByType(AuraType.AbilityIgnoreAurastate);