Apply OT mismatch deferral to gen2

Check the OT length for the deferral

other encounters are more permissive than trades, hence why we defer
unless we know for certain. Same OTs are possible, except for the
too-long ones!

Closes #2338 , thanks @WEERSOQUEER !
This commit is contained in:
Kurt 2019-06-27 21:38:24 -07:00
parent 4d08e21126
commit c8747d4ede
2 changed files with 2 additions and 1 deletions

View file

@ -147,7 +147,8 @@ namespace PKHeX.Core
var deferred = new List<IEncounterable>();
foreach (var t in GetValidEncounterTrades(pkm, vs, game))
{
if (pkm.Format >= 7 && (t.Generation == 2 || t.GetOT(pkm.Language) != pkm.OT_Name)) // ot length collision
// some OTs are longer than the keyboard entry; don't defer these
if (pkm.Format >= 7 && pkm.OT_Name.Length <= (pkm.Japanese || pkm.Korean ? 5 : 7))
{
deferred.Add(t);
continue;