mirror of
https://github.com/kwsch/PKHeX
synced 2024-09-20 22:32:00 +00:00
Handle setting egg flag in cxd saves
No longer throws an exception due to EncounterInvalid having an invalid version ID (fails to fetch personal/learnset).
This commit is contained in:
parent
978bcfa56f
commit
78e7536459
2 changed files with 2 additions and 2 deletions
|
@ -27,7 +27,7 @@ public static class EncounterVerifier
|
|||
EncounterStatic3 { Species: (int)Species.Deoxys, Location: 200 } when pk.Language == (int)LanguageID.Japanese => GetInvalid(LEncUnreleased),
|
||||
EncounterStatic4 { Roaming: true } when pk is G4PKM { Met_Location: 193, GroundTile: GroundTileType.Water } => GetInvalid(LG4InvalidTileR45Surf),
|
||||
MysteryGift g => VerifyEncounterEvent(pk, g),
|
||||
{ EggEncounter: true } => VerifyEncounterEgg(pk, enc.Generation),
|
||||
{ EggEncounter: true } when !pk.IsEgg => VerifyEncounterEgg(pk, enc.Generation),
|
||||
EncounterInvalid => GetInvalid(LEncInvalid),
|
||||
_ => GetValid(string.Empty), // todo: refactor
|
||||
};
|
||||
|
|
|
@ -29,7 +29,7 @@ internal static class LearnVerifierEgg
|
|||
{
|
||||
VerifyMovesInitial(result, current, x);
|
||||
}
|
||||
else
|
||||
else if (enc.Version is not (GameVersion.Any or >= GameVersion.Unknown))
|
||||
{
|
||||
var ls = GameData.GetLearnSource(enc.Version);
|
||||
var learn = ls.GetLearnset(enc.Species, enc.Form);
|
||||
|
|
Loading…
Reference in a new issue