diff --git a/PKHeX/MysteryGifts/WC6.cs b/PKHeX/MysteryGifts/WC6.cs index 0a07e96ee..82d0ef872 100644 --- a/PKHeX/MysteryGifts/WC6.cs +++ b/PKHeX/MysteryGifts/WC6.cs @@ -428,7 +428,8 @@ namespace PKHeX.Core pk.PID = (uint)(((TID ^ SID ^ (pk.PID & 0xFFFF)) << 16) + (pk.PID & 0xFFFF)); break; case 03: // Random Nonshiny - do { pk.PID = Util.rnd32(); } while ((uint)(((TID ^ SID ^ (pk.PID & 0xFFFF)) << 16) + (pk.PID & 0xFFFF)) < 16); + pk.PID = Util.rnd32(); + if ((uint)(((TID ^ SID ^ (pk.PID & 0xFFFF)) << 16) + (pk.PID & 0xFFFF)) < 16) pk.PID ^= 0x10000000; break; } diff --git a/PKHeX/MysteryGifts/WC7.cs b/PKHeX/MysteryGifts/WC7.cs index 18173f598..8d75b1e12 100644 --- a/PKHeX/MysteryGifts/WC7.cs +++ b/PKHeX/MysteryGifts/WC7.cs @@ -455,7 +455,8 @@ namespace PKHeX.Core pk.PID = (uint)(((TID ^ SID ^ (pk.PID & 0xFFFF)) << 16) + (pk.PID & 0xFFFF)); break; case 03: // Random Nonshiny - do { pk.PID = Util.rnd32(); } while ((uint)(((TID ^ SID ^ (pk.PID & 0xFFFF)) << 16) + (pk.PID & 0xFFFF)) < 16); + pk.PID = Util.rnd32(); + if ((uint)(((TID ^ SID ^ (pk.PID & 0xFFFF)) << 16) + (pk.PID & 0xFFFF)) < 16) pk.PID ^= 0x10000000; break; }