mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-10-01 17:58:08 -05:00
Fix Link Trade eggs
Thanks Wanderer1391! Traded eggs get their Met Location set to 30002. When an egg hatches, if Met Location > 0, copy Met Location to Egg Location and set Met Location equal to current overworld location.
This commit is contained in:
@@ -206,6 +206,11 @@ private LegalityCheck verifyEncounter()
|
||||
return new LegalityCheck(Severity.Invalid, "Invalid met level, expected 1.");
|
||||
if (pk6.IsEgg)
|
||||
{
|
||||
if (pk6.Egg_Location == 30002)
|
||||
return new LegalityCheck(Severity.Invalid, "Egg location shouldn't be 'traded' for an un-hatched egg.");
|
||||
|
||||
if (pk6.Met_Location == 30002)
|
||||
return new LegalityCheck(Severity.Valid, "Valid traded un-hatched egg.");
|
||||
return pk6.Met_Location == 0
|
||||
? new LegalityCheck(Severity.Valid, "Valid un-hatched egg.")
|
||||
: new LegalityCheck(Severity.Invalid, "Invalid location for un-hatched egg (expected ID:0)");
|
||||
|
||||
@@ -701,7 +701,7 @@ private void TradeHT(string SAV_Trainer, int SAV_COUNTRY, int SAV_REGION, int SA
|
||||
// Misc Updates
|
||||
private void UpdateEgg(int Day, int Month, int Year)
|
||||
{
|
||||
Egg_Location = 30002;
|
||||
Met_Location = 30002;
|
||||
Egg_Day = Day;
|
||||
Egg_Month = Month;
|
||||
Egg_Year = Year - 2000;
|
||||
|
||||
Reference in New Issue
Block a user