Relocate N OT logic

Make Legal.cs not care about encounter data :)
This commit is contained in:
Kurt 2020-10-06 20:09:14 -07:00
parent fe7a4df17e
commit 6616996905
3 changed files with 5 additions and 5 deletions

View file

@ -342,8 +342,6 @@ namespace PKHeX.Core
return pkm.Format == 5 && pkm.BW;
}
public static string GetG5OT_NSparkle(int lang) => lang == (int)LanguageID.Japanese ? "" : "N";
public static int GetMaxLengthOT(int gen, LanguageID lang)
{
switch (lang)

View file

@ -39,9 +39,11 @@
{
pk5.IV_HP = pk5.IV_ATK = pk5.IV_DEF = pk5.IV_SPA = pk5.IV_SPD = pk5.IV_SPE = 30;
pk5.NPokémon = NSparkle;
pk5.OT_Name = Legal.GetG5OT_NSparkle(lang);
pk5.OT_Name = GetOT(lang);
pk5.TID = 00002;
pk5.SID = 00000;
}
public static string GetOT(int lang) => lang == (int)LanguageID.Japanese ? "" : "N";
}
}
}

View file

@ -42,7 +42,7 @@ namespace PKHeX.Core
var ot = pkm.OT_Name;
if (ot.Length != 1)
return false;
var c = Legal.GetG5OT_NSparkle(pkm.Language);
var c = EncounterStatic5N.GetOT(pkm.Language);
return c == ot;
}
}