diff --git a/MainWindow/Main.cs b/MainWindow/Main.cs index 546a41676..d9f6a1c08 100644 --- a/MainWindow/Main.cs +++ b/MainWindow/Main.cs @@ -3344,7 +3344,7 @@ private void pbBoxSlot_DragDrop(object sender, DragEventArgs e) return; string file = files[0]; FileInfo fi = new FileInfo(file); - if (!PKX.getIsPKM(fi.Length)) + if (!PKX.getIsPKM(fi.Length) && !MysteryGift.getIsMysteryGift(fi.Length)) { openQuick(file); return; } byte[] data = File.ReadAllBytes(file); diff --git a/MysteryGifts/MysteryGift.cs b/MysteryGifts/MysteryGift.cs index cff746126..e7a82211d 100644 --- a/MysteryGifts/MysteryGift.cs +++ b/MysteryGifts/MysteryGift.cs @@ -5,6 +5,10 @@ namespace PKHeX { public abstract class MysteryGift { + internal static bool getIsMysteryGift(long len) + { + return new[] { WC6.SizeFull, WC6.Size, PGF.Size, PGT.Size, PCD.Size }.Contains((int)len); + } internal static MysteryGift getMysteryGift(byte[] data, string ext) { if (data.Length == WC6.SizeFull && ext == ".wc6full")