mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-26 22:10:21 +00:00
Add more nickname logic checks
Variant nicklang OT can nickname if it's the handler
This commit is contained in:
parent
cd286d6923
commit
33fc33a165
4 changed files with 8 additions and 0 deletions
|
@ -83,6 +83,9 @@ namespace PKHeX.Core
|
|||
return;
|
||||
}
|
||||
|
||||
if (n.CanHandleOT(pkm.Language))
|
||||
return;
|
||||
|
||||
if (pkm.IsNicknamed)
|
||||
data.AddLine(Get(LEncGiftNicknamed, Severity.Invalid));
|
||||
return;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -7,5 +7,6 @@
|
|||
|
||||
bool CanBeAnyLanguage();
|
||||
bool CanHaveLanguage(int language);
|
||||
bool CanHandleOT(int language);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue