From 4594b0d879cbb3e51d5b25017570376f73e7b9e4 Mon Sep 17 00:00:00 2001 From: Kurt Date: Wed, 18 Sep 2024 16:52:12 -0500 Subject: [PATCH] Update default version fetch for Gift3 rsbox Gen3 save file without trainer in database fetching a Gen3 gift -> Gen3/RS -> version fails to determine just return the RS fallback; add EFL --- .../Encounters/Templates/Gen3/Gifts/EncounterGift3.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen3/Gifts/EncounterGift3.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen3/Gifts/EncounterGift3.cs index 7064ef2ad..f7768ae47 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen3/Gifts/EncounterGift3.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen3/Gifts/EncounterGift3.cs @@ -211,8 +211,8 @@ public sealed class EncounterGift3 : IEncounterable, IEncounterMatch, IMoveset, return version switch { GameVersion.FRLG => Util.Rand.Next(2) == 0 ? GameVersion.FR : GameVersion.LG, - GameVersion.RS or GameVersion.RSE => Util.Rand.Next(2) == 0 ? GameVersion.R : GameVersion.S, - _ => throw new Exception($"Unknown GameVersion: {version}"), + GameVersion.EFL => GameVersion.E, + _ => Util.Rand.Next(2) == 0 ? GameVersion.R : GameVersion.S, }; }