mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 20:43:07 +00:00
Fix Showdown Import with Null Forms
Fixes https://projectpokemon.org/forums/forums/topic/40047-error-when-importing-pokemon-from-showdown/
This commit is contained in:
parent
19dbae430c
commit
0be2bd4674
1 changed files with 22 additions and 15 deletions
|
@ -164,22 +164,29 @@ namespace PKHeX.Core
|
|||
|
||||
// Showdown Quirks
|
||||
string form = Form;
|
||||
switch (Species)
|
||||
if (!string.IsNullOrWhiteSpace(form))
|
||||
{
|
||||
case 658: // Greninja
|
||||
form = form.Replace("Ash", "");
|
||||
form = form.Replace("Active", "");
|
||||
break;
|
||||
case 718: // Zygarde
|
||||
form = form.Replace("-C", "");
|
||||
form = form.Replace("50%", "");
|
||||
form = form.Replace("100%", "Complete");
|
||||
break;
|
||||
case 774: // Minior
|
||||
if (string.IsNullOrWhiteSpace(form) || form.StartsWith("M-"))
|
||||
form = "Meteor";
|
||||
form = form.Replace("C-", "");
|
||||
break;
|
||||
switch (Species)
|
||||
{
|
||||
case 658: // Greninja
|
||||
form = form.Replace("Ash", "");
|
||||
form = form.Replace("Active", "");
|
||||
break;
|
||||
case 718: // Zygarde
|
||||
form = form.Replace("-C", "");
|
||||
form = form.Replace("50%", "");
|
||||
form = form.Replace("100%", "Complete");
|
||||
break;
|
||||
case 774: // Minior
|
||||
if (form.StartsWith("M-"))
|
||||
form = "Meteor";
|
||||
form = form.Replace("C-", "");
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (Species == 774) // Minior
|
||||
{
|
||||
form = "Meteor";
|
||||
}
|
||||
|
||||
// First Line: Name, Nickname, Gender, Item
|
||||
|
|
Loading…
Reference in a new issue