Fix evolution egg move g7

#377
Also removes unnecessary variable for 'games', can just use the created
array.
This commit is contained in:
Kurt 2016-11-12 06:10:44 -08:00
parent 139fc97b82
commit 9228d6eac5
2 changed files with 2 additions and 5 deletions

View file

@ -1464,16 +1464,13 @@ namespace PKHeX
if (pkm.WasEgg && !Legal.NoHatchFromEgg.Contains(pkm.Species))
{
int games = 1;
GameVersion[] Games = { GameVersion.XY };
switch (pkm.GenNumber)
{
case 6:
games = 2;
Games = new[] {GameVersion.XY, GameVersion.ORAS};
break;
case 7:
games = 1;
Games = new[] {GameVersion.SM};
break;
}
@ -1481,7 +1478,7 @@ namespace PKHeX
bool checkAllGames = pkm.WasTradedEgg;
bool splitBreed = Legal.SplitBreed.Contains(pkm.Species);
int iterate = (checkAllGames ? games : 1) * (splitBreed ? 2 : 1);
int iterate = (checkAllGames ? Games.Length : 1) * (splitBreed ? 2 : 1);
for (int i = 0; i < iterate; i++)
{
int gameSource = !checkAllGames ? -1 : i % iterate / (splitBreed ? 2 : 1);

View file

@ -197,7 +197,7 @@ namespace PKHeX
case GameVersion.SN:
case GameVersion.MN:
case GameVersion.SM:
int index = PersonalTable.SM.getFormeIndex(pkm.Species, pkm.AltForm);
int index = PersonalTable.SM.getFormeIndex(species, pkm.AltForm);
if (pkm.InhabitedGeneration(7))
return LevelUpSM[index].getMoves(1);
break;