Fix sav5 behavior

Closes #2356 ty @Ammako
This commit is contained in:
Kurt 2019-07-10 00:19:59 -07:00
parent ab735de2d9
commit c64ff5dd76
3 changed files with 7 additions and 7 deletions

View file

@ -92,8 +92,8 @@ namespace PKHeX.Core
public bool ORASDEMO => Data.Length == SaveUtil.SIZE_G6ORASDEMO;
public bool ORAS => Data.Length == SaveUtil.SIZE_G6ORAS;
public bool XY => Data.Length == SaveUtil.SIZE_G6XY;
public bool B2W2 => Version == GameVersion.B2W2;
public bool BW => Version == GameVersion.BW;
public bool B2W2 => this is SAV5B2W2;
public bool BW => this is SAV5BW;
public bool HGSS => Version == GameVersion.HGSS;
public bool Pt => Version == GameVersion.Pt;
public bool DP => Version == GameVersion.DP;

View file

@ -75,7 +75,7 @@ namespace PKHeX.Core
private void SetCaughtFlag(int bit) => SetFlag(OFS_CAUGHT, bit);
private int FormLen => SAV.B2W2 ? 0xB : 0x9;
private int FormDex => PokeDex + 0x8 + (BitSeenSize * 9);
private int FormDex => 0x8 + (BitSeenSize * 9);
private void SetFormFlags(PKM pkm)
{

View file

@ -180,15 +180,15 @@ namespace PKHeX.WinForms
return;
for (int i = 0; i < CLB_FormsSeen.Items.Count/2; i++) // Seen
Dex.SetFormFlag(f, 0, CLB_FormsSeen.GetItemChecked(i));
Dex.SetFormFlag(f + i, 0, CLB_FormsSeen.GetItemChecked(i));
for (int i = 0; i < CLB_FormsSeen.Items.Count/2; i++) // Seen Shiny
Dex.SetFormFlag(f, 1, CLB_FormsSeen.GetItemChecked(i + (CLB_FormsSeen.Items.Count/2)));
Dex.SetFormFlag(f + i, 1, CLB_FormsSeen.GetItemChecked(i + (CLB_FormsSeen.Items.Count/2)));
editing = true;
for (int i = 0; i < CLB_FormDisplayed.Items.Count/2; i++) // Displayed
Dex.SetFormFlag(f, 2, CLB_FormDisplayed.GetItemChecked(i));
Dex.SetFormFlag(f + i, 2, CLB_FormDisplayed.GetItemChecked(i));
for (int i = 0; i < CLB_FormDisplayed.Items.Count/2; i++) // Displayed Shiny
Dex.SetFormFlag(f, 3, CLB_FormDisplayed.GetItemChecked(i + (CLB_FormDisplayed.Items.Count/2)));
Dex.SetFormFlag(f + i, 3, CLB_FormDisplayed.GetItemChecked(i + (CLB_FormDisplayed.Items.Count/2)));
editing = false;
}