From 6f64c9be8e03f530dcc97e0a42238384f700c76e Mon Sep 17 00:00:00 2001 From: Kurt Date: Mon, 15 May 2017 08:27:19 -0700 Subject: [PATCH] Fix update check url version txt was in core project prior to refactor Also restrict 3IV randomization to gen6+ (sub)legends. Closes #1131 --- PKHeX.WinForms/MainWindow/Main.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/PKHeX.WinForms/MainWindow/Main.cs b/PKHeX.WinForms/MainWindow/Main.cs index d5ef61811..67cfb6595 100644 --- a/PKHeX.WinForms/MainWindow/Main.cs +++ b/PKHeX.WinForms/MainWindow/Main.cs @@ -273,7 +273,7 @@ namespace PKHeX.WinForms private static string BackupPath => Path.Combine(WorkingDirectory, "bak"); private static string TemplatePath => Path.Combine(WorkingDirectory, "template"); private const string ThreadPath = @"https://projectpokemon.org/PKHeX/"; - private const string VersionPath = @"https://raw.githubusercontent.com/kwsch/PKHeX/master/PKHeX/Resources/text/version.txt"; + private const string VersionPath = @"https://raw.githubusercontent.com/kwsch/PKHeX/master/PKHeX.WinForms/Resources/text/version.txt"; #endregion @@ -2285,15 +2285,17 @@ namespace PKHeX.WinForms } else { - bool IV3 = Legal.Legends.Contains(pkm.Species) || Legal.SubLegends.Contains(pkm.Species); - int[] IVs = new int[6]; for (int i = 0; i < 6; i++) IVs[i] = (int)(Util.rnd32() & SAV.MaxIV); + + bool IV3 = pkm.GenNumber >= 6 && (Legal.Legends.Contains(pkm.Species) || Legal.SubLegends.Contains(pkm.Species)); if (IV3) + { for (int i = 0; i < 3; i++) IVs[i] = SAV.MaxIV; - Util.Shuffle(IVs); // Randomize IV order + Util.Shuffle(IVs); // Randomize IV order + } var IVBoxes = new[] {TB_HPIV, TB_ATKIV, TB_DEFIV, TB_SPAIV, TB_SPDIV, TB_SPEIV}; for (int i = 0; i < 6; i++)