diff --git a/PKHeX.Core/Legality/Bulk/DuplicateTrainerChecker.cs b/PKHeX.Core/Legality/Bulk/DuplicateTrainerChecker.cs index d021226ab..6ba9690aa 100644 --- a/PKHeX.Core/Legality/Bulk/DuplicateTrainerChecker.cs +++ b/PKHeX.Core/Legality/Bulk/DuplicateTrainerChecker.cs @@ -49,9 +49,7 @@ private static void Verify(BulkAnalysis input, Dictionary enc switch + { + IFixedTrainer { IsFixedTrainer: true } => true, + MysteryGift { IsEgg: false } => true, + _ => false, + }; + private static bool IsSharedVersion(PKM pp, LegalityAnalysis pa, PKM cp, LegalityAnalysis ca) { if (pp.Version == cp.Version || pp.Version == 0 || cp.Version == 0) @@ -95,6 +100,7 @@ private static bool IsSharedVersion(PKM pp, LegalityAnalysis pa, PKM cp, Legalit static bool IsTradedEggVersionNoUpdate(PKM pk, LegalityAnalysis la) => la.Info.Generation switch { + 2 => true, // No version stored, just ignore. 3 => true, // No egg location, assume can be traded. Doesn't update version upon hatch. 4 => pk.WasTradedEgg, // Gen4 traded eggs do not update version upon hatch. _ => false, // Gen5+ eggs have an egg location, and update the version upon hatch. diff --git a/PKHeX.Core/Resources/legality/wild/Gen4/encounter_hg.pkl b/PKHeX.Core/Resources/legality/wild/Gen4/encounter_hg.pkl index 898477a41..e65823738 100644 Binary files a/PKHeX.Core/Resources/legality/wild/Gen4/encounter_hg.pkl and b/PKHeX.Core/Resources/legality/wild/Gen4/encounter_hg.pkl differ diff --git a/PKHeX.Core/Resources/legality/wild/Gen4/encounter_ss.pkl b/PKHeX.Core/Resources/legality/wild/Gen4/encounter_ss.pkl index 9670da2d1..a86532b0b 100644 Binary files a/PKHeX.Core/Resources/legality/wild/Gen4/encounter_ss.pkl and b/PKHeX.Core/Resources/legality/wild/Gen4/encounter_ss.pkl differ diff --git a/PKHeX.WinForms/Program.cs b/PKHeX.WinForms/Program.cs index c5f1b8e36..fc203f238 100644 --- a/PKHeX.WinForms/Program.cs +++ b/PKHeX.WinForms/Program.cs @@ -108,6 +108,14 @@ private static void CurrentDomain_UnhandledException(object sender, UnhandledExc private static void HandleReportingException(Exception? ex, Exception reportingException) { + try + { + EmergencyErrorLog(ex, reportingException); + } + catch (Exception) + { + // We've failed to even save the error details to a file. There's nothing else we can do. + } if (reportingException is FileNotFoundException x && x.FileName?.StartsWith("PKHeX.Core") == true) { Error("Could not locate PKHeX.Core.dll. Make sure you're running PKHeX together with its code library. Usually caused when all files are not extracted."); @@ -116,7 +124,6 @@ private static void HandleReportingException(Exception? ex, Exception reportingE try { Error("A fatal non-UI error has occurred in PKHeX, and there was a problem displaying the details. Please report this to the author."); - EmergencyErrorLog(ex, reportingException); } finally {