mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-27 14:30:56 +00:00
parent
75d700c171
commit
57c6de2825
2 changed files with 15 additions and 0 deletions
|
@ -75,6 +75,11 @@ namespace PKHeX.Core
|
|||
data.AddLine(GetInvalid(V222));
|
||||
return true;
|
||||
}
|
||||
if (nickname.Length > GetNicknameMaxLength(data.Info.Generation, (LanguageID)pkm.Language))
|
||||
{
|
||||
data.AddLine(GetInvalid(V1));
|
||||
return true;
|
||||
}
|
||||
data.AddLine(GetValid(V17));
|
||||
}
|
||||
else if (pkm.Format < 3)
|
||||
|
@ -412,5 +417,15 @@ namespace PKHeX.Core
|
|||
return true;
|
||||
return ((EncounterTrade)EncounterMatch).IsNicknamed;
|
||||
}
|
||||
|
||||
private static int GetNicknameMaxLength(int gen, LanguageID lang)
|
||||
{
|
||||
switch (lang)
|
||||
{
|
||||
case LanguageID.Korean:
|
||||
case LanguageID.Japanese: return gen >= 6 ? 6 : 5;
|
||||
default: return gen >= 6 ? 12 : 6;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue