Add "AlolaTime not existing yet" handling

Savedata::GameTime::IsAlolaOffsetExists
This commit is contained in:
Kurt 2017-11-12 16:02:14 -08:00
parent fffd051665
commit 7bc316d79c

View File

@ -137,11 +137,13 @@ 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;
var time = SAV.AlolaTime;
if (time == 0)
time = 24 * 60 * 60; // Patch up any bad times from previous program versions.
if (time == 9_999_999)
CB_AlolaTime.Enabled = false; // alola time doesn't exist yet
else
CB_AlolaTime.SelectedValue = (int)time;
NUD_M.Value = SAV.M;
// Sanity Check Map Coordinates