Add more nickname logic checks

Variant nicklang OT can nickname if it's the handler
This commit is contained in:
Kurt 2021-02-02 22:12:36 -08:00
parent cd286d6923
commit 33fc33a165
4 changed files with 8 additions and 0 deletions

View file

@ -83,6 +83,9 @@ namespace PKHeX.Core
return;
}
if (n.CanHandleOT(pkm.Language))
return;
if (pkm.IsNicknamed)
data.AddLine(Get(LEncGiftNicknamed, Severity.Invalid));
return;

View file

@ -483,6 +483,8 @@ namespace PKHeX.Core
return true;
}
public bool CanHandleOT(int language) => string.IsNullOrEmpty(GetOT(language));
public override bool IsMatchExact(PKM pkm, DexLevel evo)
{
if (pkm.Egg_Location == 0) // Not Egg

View file

@ -353,6 +353,8 @@ namespace PKHeX.Core
public bool IsHOMEGift => Location == Locations.HOME8 || GetOT(2) == "HOME";
public bool CanHandleOT(int language) => GetHasOT(language);
public override PKM ConvertToPKM(ITrainerInfo sav, EncounterCriteria criteria)
{
if (!IsPokémon)

View file

@ -7,5 +7,6 @@
bool CanBeAnyLanguage();
bool CanHaveLanguage(int language);
bool CanHandleOT(int language);
}
}