mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-15 00:37:11 +00:00
Fix form/nickname detection
Check for the form name in the inversion check
This commit is contained in:
parent
76df492121
commit
8dfa356a77
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue