From 67e3bd407f79d40c150fbc3f22ec12dcd376b9fd Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Sun, 13 Nov 2016 08:07:08 -0800 Subject: [PATCH] Fix Sun Time (Gamefreak, why :() --- PKHeX/Subforms/Save Editors/Gen7/SAV_Trainer7.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/PKHeX/Subforms/Save Editors/Gen7/SAV_Trainer7.cs b/PKHeX/Subforms/Save Editors/Gen7/SAV_Trainer7.cs index e04607a68..1083d380e 100644 --- a/PKHeX/Subforms/Save Editors/Gen7/SAV_Trainer7.cs +++ b/PKHeX/Subforms/Save Editors/Gen7/SAV_Trainer7.cs @@ -48,7 +48,7 @@ private void getComboBoxes() new { Text = "CHT", Value = 10}, }; - var alolatime_list = new[] { new { Text = "Sun Time", Value = 0 } }; + var alolatime_list = new[] { new { Text = "Sun Time", Value = 24*60*60 } }; Array.Resize(ref alolatime_list, 24); for (int i = 1; i < 24; i++) alolatime_list[i] = new {Text = $"+{i.ToString("00")} Hours", Value = i*60*60}; @@ -89,6 +89,10 @@ private void getTextBoxes() CB_Region.SelectedValue = SAV.SubRegion; CB_3DSReg.SelectedValue = SAV.ConsoleRegion; CB_Language.SelectedValue = SAV.Language; + if (SAV.AlolaTime == 0) + { + SAV.AlolaTime = 24 * 60 * 60; // Patch up any bad times from previous program versions. + } CB_AlolaTime.SelectedValue = (int)SAV.AlolaTime; NUD_M.Value = SAV.M;