Add missing validity setters

Game checks for these region codes, if missing they won't appear in
party/box. just set to an arbitrary value
This commit is contained in:
Kurt 2016-12-26 21:26:45 -08:00
parent 53f8abc26c
commit e51daa3a4b
2 changed files with 16 additions and 0 deletions

View file

@ -274,6 +274,17 @@ namespace PKHeX
return data;
}
protected override void setPKM(PKM pkm)
{
var pk = pkm as CK3;
if (pk == null)
return;
if (pk.CurrentRegion == 0)
pk.CurrentRegion = 2; // NTSC-U
if (pk.OriginalRegion == 0)
pk.OriginalRegion = 2; // NTSC-U
}
protected override void setDex(PKM pkm)
{
// Dex Related

View file

@ -266,6 +266,11 @@ namespace PKHeX
if (pk == null)
return; // shouldn't ever hit
if (pk.CurrentRegion == 0)
pk.CurrentRegion = 2; // NTSC-U
if (pk.OriginalRegion == 0)
pk.OriginalRegion = 2; // NTSC-U
// Set Shadow Data back to save
if (pk.ShadowID <= 0 || pk.ShadowID >= ShadowInfo.Count)
return;