From 486e5dc4fe42c82daf17938bd69bd54a7a8e3428 Mon Sep 17 00:00:00 2001 From: Kurt Date: Tue, 21 Nov 2017 15:22:33 -0800 Subject: [PATCH] Move forme check after species check compatibility message of 803-807 dex pkm on S/M needs to say species first rather than checking forme first Closes #1643 --- PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Trainer7.cs | 4 ++-- PKHeX.WinForms/Util/SAVUtil.cs | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Trainer7.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Trainer7.cs index 864a972a7..553bc5164 100644 --- a/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Trainer7.cs +++ b/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Trainer7.cs @@ -32,7 +32,7 @@ namespace PKHeX.WinForms for (int i = 0; i < 200; i++) { if (!RecordList.TryGetValue(i, out string name)) - name = i.ToString("D3"); + name = $"{i:D3}"; CB_Stats.Items.Add(name); } @@ -543,7 +543,7 @@ namespace PKHeX.WinForms } private void B_Fashion_Click(object sender, EventArgs e) { - var prompt = WinFormsUtil.Prompt(MessageBoxButtons.YesNo, "Modifying Fashion Items will clear existing data", "Continue?"); + var prompt = WinFormsUtil.Prompt(MessageBoxButtons.YesNo, "Modifying Fashion Items will clear existing fashion unlock data.", "Continue?"); if (DialogResult.Yes != prompt) return; diff --git a/PKHeX.WinForms/Util/SAVUtil.cs b/PKHeX.WinForms/Util/SAVUtil.cs index 914f7e6c3..c8efdc86b 100644 --- a/PKHeX.WinForms/Util/SAVUtil.cs +++ b/PKHeX.WinForms/Util/SAVUtil.cs @@ -165,15 +165,15 @@ namespace PKHeX.WinForms errata.Add($"Game can't hold item: {GameInfo.Strings.itemlist[held]}"); } - int count = SAV.Personal[pkm.Species].FormeCount; - if (pkm.AltForm >= SAV.Personal[pkm.Species].FormeCount && !FormConverter.IsValidOutOfBoundsForme(pkm.Species, pkm.AltForm, pkm.GenNumber)) - errata.Add(string.Format(LegalityCheckStrings.V304, count-1, pkm.AltForm)); - if (pkm.Species > GameInfo.Strings.specieslist.Length) errata.Add($"Species Index beyond range: {pkm.Species}"); else if (SAV.MaxSpeciesID < pkm.Species) errata.Add($"Game can't obtain species: {GameInfo.Strings.specieslist[pkm.Species]}"); + int count = SAV.Personal[pkm.Species].FormeCount; + if (pkm.AltForm >= SAV.Personal[pkm.Species].FormeCount && !FormConverter.IsValidOutOfBoundsForme(pkm.Species, pkm.AltForm, pkm.GenNumber)) + errata.Add(string.Format(LegalityCheckStrings.V304, count - 1, pkm.AltForm)); + if (pkm.Moves.Any(m => m > GameInfo.Strings.movelist.Length)) errata.Add($"Item Index beyond range: {string.Join(", ", pkm.Moves.Where(m => m > GameInfo.Strings.movelist.Length).Select(m => m.ToString()))}"); else if (pkm.Moves.Any(m => m > SAV.MaxMoveID))