From eff8855729cbd43b90e26c3af87937f3c03a0b0a Mon Sep 17 00:00:00 2001 From: Kurt Date: Tue, 5 Dec 2017 07:26:55 -0800 Subject: [PATCH] Allow throw type changes to be saved move SM/USUM branch inside the method closes #1695 --- PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Trainer7.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Trainer7.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Trainer7.cs index be73130b4..7fa9ef6d8 100644 --- a/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Trainer7.cs +++ b/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Trainer7.cs @@ -155,6 +155,8 @@ private void GetTextBoxes() CB_AlolaTime.Enabled = false; // alola time doesn't exist yet else CB_AlolaTime.SelectedValue = (int)time; + if (CB_AlolaTime.SelectedValue == null) + CB_AlolaTime.Enabled = false; NUD_M.Value = SAV.M; // Sanity Check Map Coordinates @@ -337,8 +339,7 @@ private void Save() SaveBattleTree(); SaveTrainerAppearance(); SAV.DaysFromRefreshed = (byte)NUD_DaysFromRefreshed.Value; - if (SAV.SM) - SaveThrowType(); + SaveThrowType(); SAV.FestivalPlazaName = TB_PlazaName.Text; @@ -440,6 +441,9 @@ private void SaveThrowType() if (CB_BallThrowType.SelectedIndex >= 0) SAV.BallThrowType = CB_BallThrowType.SelectedIndex; + if (!SAV.SM) // unlock flags are in flag editor instead + return; + const int unlockStart = 292; const int learnedStart = 3479; for (int i = 2; i < BattleStyles.Length; i++)