Core/Spells: Fixed missing null checks on some SpellEffects

This commit is contained in:
hondacrx
2021-01-14 17:06:53 -05:00
parent cebee1621e
commit a4c4db7af5
3 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -443,7 +443,7 @@ namespace Game.Misc
if (spellInfo != null)
{
foreach (SpellEffectInfo effect in spellInfo.GetEffects())
if (effect.IsEffect(SpellEffectName.LearnSpell))
if (effect != null && effect.IsEffect(SpellEffectName.LearnSpell))
packet.LearnSpells.Add(effect.TriggerSpell);
}