Transfer legality for HGSS eggs

Faraway place (3002) can be retained on transfer
This commit is contained in:
Kurt 2017-04-10 18:46:37 -07:00
parent 6378eddc62
commit c45a9f0428
2 changed files with 8 additions and 5 deletions

View file

@ -893,9 +893,12 @@ namespace PKHeX.Core
121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 139, 140, //138 --- 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 139, 140, //138 ---
141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
}; };
internal static int[] EggLocations5 = internal static readonly int[] EggLocations5 =
{ {
30002, 60002, 60003 30002, // Link Trade (NPC)
30003, // Link Trade
60002, // Daycare
60003, // Breeder (NPC)
}; };
} }
} }

View file

@ -443,7 +443,7 @@ namespace PKHeX.Core
{ {
switch (GenNumber) switch (GenNumber)
{ {
case 4: return Species == 490 && Egg_Location == 3001 || Legal.EggLocations4.Contains(Egg_Location); case 4: return Legal.EggLocations4.Contains(Egg_Location) || (Species == 490 && Egg_Location == 3001) || (Egg_Location == 3002 && HGSS); // faraway
case 5: return Legal.EggLocations5.Contains(Egg_Location); case 5: return Legal.EggLocations5.Contains(Egg_Location);
case 6: case 6:
case 7: return Legal.EggLocations.Contains(Egg_Location); case 7: return Legal.EggLocations.Contains(Egg_Location);
@ -460,7 +460,7 @@ namespace PKHeX.Core
if (!WasEgg) return false; if (!WasEgg) return false;
switch (GenNumber) switch (GenNumber)
{ {
case 4: return Legal.GiftEggLocation4.Contains(Egg_Location); case 4: return Legal.GiftEggLocation4.Contains(Egg_Location) || (Egg_Location == 3002 && HGSS); // faraway
case 5: return Egg_Location == 60003; case 5: return Egg_Location == 60003;
case 6: return Egg_Location == 60004; case 6: return Egg_Location == 60004;
} }