mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-08-22 06:57:42 -05:00
Disallow lang=2 for dp trades
DP English origin are Japanese language; since we 1=>2, we still needed to disallow 2.
This commit is contained in:
@@ -330,11 +330,18 @@ private static void VerifyTrade4(LegalityAnalysis data, EncounterTrade t)
|
||||
break;
|
||||
|
||||
default:
|
||||
if (lang == 1 && (pkm.Version is (int)GameVersion.D or (int)GameVersion.P))
|
||||
if (pkm.Version is (int)GameVersion.D or (int)GameVersion.P && t is EncounterTrade4PID) // mainline DP
|
||||
{
|
||||
// DP English origin are Japanese lang
|
||||
if (pkm.OT_Name != t.GetOT(1)) // not japanese
|
||||
lang = 2; // English
|
||||
// DP English origin are Japanese lang. Can't have LanguageID 2
|
||||
if (lang == 2)
|
||||
{
|
||||
data.AddLine(GetInvalid(string.Format(LOTLanguage, Japanese, English), CheckIdentifier.Language));
|
||||
break;
|
||||
}
|
||||
|
||||
// Since two locales (JPN/ENG) can have the same LanguageID, check which we should be validating with.
|
||||
if (lang == 1 && pkm.OT_Name != t.GetOT(1)) // not Japanese
|
||||
lang = 2; // verify strings with English locale instead.
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user