Fix form/nickname detection

Check for the form name in the inversion check
This commit is contained in:
Kurt 2015-07-21 18:17:10 -07:00
parent 76df492121
commit 8dfa356a77

View file

@ -2154,7 +2154,7 @@ namespace PKHeX
string n1 = spec.Substring(0, index - 1);
string n2 = spec.Substring(index).Replace("(", "").Replace(")", "").Replace(" ", "");
bool inverted = Array.IndexOf(species, n2.Replace(" ", "")) > -1;
bool inverted = Array.IndexOf(species, n2.Replace(" ", "")) > -1 || (Species = Array.IndexOf(species, n2.Split('-')[0])) > 0;
spec = inverted ? n2 : n1;
Nickname = inverted ? n1 : n2;
}
@ -2242,7 +2242,7 @@ namespace PKHeX
string n1 = spec.Substring(0, index - 1);
string n2 = spec.Substring(index).Replace("(", "").Replace(")", "").Replace(" ", "");
bool inverted = Array.IndexOf(species, n2.Replace(" ", "")) > -1;
bool inverted = Array.IndexOf(species, n2.Replace(" ", "")) > -1 || (Species = Array.IndexOf(species, n2.Split('-')[0])) > 0;
spec = inverted ? n2 : n1;
Nickname = inverted ? n1 : n2;
}