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
This commit is contained in:
Kurt 2017-11-21 15:22:33 -08:00
parent 05f2968c95
commit 486e5dc4fe
2 changed files with 6 additions and 6 deletions

View file

@ -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;

View file

@ -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))