Misc cleanup

allowInherited was always false as SpecialMoves is never null (?? new
int[0])
This commit is contained in:
Kurt 2017-04-06 21:23:08 -07:00
parent fc552fbfbe
commit 9002d882b2

View file

@ -2544,9 +2544,9 @@ namespace PKHeX.Core
{ {
if (pkm.IsEgg) if (pkm.IsEgg)
{ {
int[] SpecialMoves = (EncounterMatch as IMoveset)?.Moves ?? new int[0]; int[] SpecialMoves = (EncounterMatch as IMoveset)?.Moves;
var allowinherited = SpecialMoves == null && !pkm.WasGiftEgg && !pkm.WasEventEgg && !MatchIsMysteryGift; var allowinherited = SpecialMoves == null;
return parseMovesIsEggPreRelearn(Moves, SpecialMoves, allowinherited); return parseMovesIsEggPreRelearn(Moves, SpecialMoves ?? new int[0], allowinherited);
} }
if (pkm.WasEgg) if (pkm.WasEgg)
return parseMovesWasEggPreRelearn(Moves, validLevelMoves, validTMHM, validTutor); return parseMovesWasEggPreRelearn(Moves, validLevelMoves, validTMHM, validTutor);