diff --git a/PKHeX.Core/MysteryGifts/WC9.cs b/PKHeX.Core/MysteryGifts/WC9.cs index 7c9abcefd..d119c36f5 100644 --- a/PKHeX.Core/MysteryGifts/WC9.cs +++ b/PKHeX.Core/MysteryGifts/WC9.cs @@ -34,10 +34,9 @@ public enum GiftType : byte public bool CanBeReceivedByVersion(PKM pk) => RestrictVersion switch { - 0 when !IsEntity => true, // Whatever, essentially unrestricted for SL/VL receipt. No Entity gifts are 0. 1 => pk.Version is GameVersion.SL || pk.MetLocation == LocationsHOME.SWSL, 2 => pk.Version is GameVersion.VL || pk.MetLocation == LocationsHOME.SHVL, - 3 => pk.Version is GameVersion.SL or GameVersion.VL || pk.MetLocation is LocationsHOME.SWSL or LocationsHOME.SHVL, + 0 or 3 => pk.Version is GameVersion.SL or GameVersion.VL || pk.MetLocation is LocationsHOME.SWSL or LocationsHOME.SHVL, _ => throw new ArgumentOutOfRangeException(nameof(RestrictVersion), RestrictVersion, null), }; diff --git a/PKHeX.Core/Util/FileUtil.cs b/PKHeX.Core/Util/FileUtil.cs index db387b8ce..112d26e45 100644 --- a/PKHeX.Core/Util/FileUtil.cs +++ b/PKHeX.Core/Util/FileUtil.cs @@ -289,7 +289,9 @@ public static bool TryGetBattleVideo(byte[] data, [NotNullWhen(true)] out IBattl /// True if file object reference is valid, false if none found. public static bool TryGetMysteryGift(byte[] data, [NotNullWhen(true)] out MysteryGift? mg, ReadOnlySpan ext) { - mg = MysteryGift.GetMysteryGift(data, ext); + mg = ext.Length == 0 + ? MysteryGift.GetMysteryGift(data) + : MysteryGift.GetMysteryGift(data, ext); return mg != null; }