mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-15 08:47:14 +00:00
Keep gen6 dex form flags
oops, forgot to include ...(+ i) ty @Ammako https://projectpokemon.org/home/forums/topic/55244-pokedex-displays-shiny-version-of-transfered-pokemon/?do=findComment&comment=249665 no need to set editing flag as I'm not changing anything have sav6xy use the sav6xy accessor interface instead of the main one
This commit is contained in:
parent
3b0fd81aae
commit
f77f0e8a4b
3 changed files with 26 additions and 23 deletions
|
@ -8,7 +8,7 @@ namespace PKHeX.Core
|
|||
/// Generation 6 <see cref="SaveFile"/> object for <see cref="GameVersion.XY"/>.
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="SAV6" />
|
||||
public sealed class SAV6XY : SAV6, ISaveBlock6Main
|
||||
public sealed class SAV6XY : SAV6, ISaveBlock6XY
|
||||
{
|
||||
public SAV6XY(byte[] data) : base(data, SaveBlockAccessorXY.boXY)
|
||||
{
|
||||
|
@ -76,6 +76,9 @@ namespace PKHeX.Core
|
|||
public MysteryBlock6 MysteryGift => Blocks.MysteryGift;
|
||||
public SuperTrainBlock SuperTrain => Blocks.SuperTrain;
|
||||
public MaisonBlock Maison => Blocks.Maison;
|
||||
public Zukan6XY Zukan => Blocks.Zukan;
|
||||
public Misc6XY Misc => Blocks.Misc;
|
||||
public Fashion6XY Fashion => Blocks.Fashion;
|
||||
#endregion
|
||||
|
||||
protected override void SetDex(PKM pkm) => Blocks.Zukan.SetDex(pkm);
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace PKHeX.WinForms
|
|||
InitializeComponent();
|
||||
WinFormsUtil.TranslateInterface(this, Main.CurrentLanguage);
|
||||
SAV = (SAV6AO)(Origin = sav).Clone();
|
||||
Zukan = (Zukan6AO)SAV.Zukan;
|
||||
Zukan = SAV.Zukan;
|
||||
CP = new[] { CHK_P1, CHK_P2, CHK_P3, CHK_P4, CHK_P5, CHK_P6, CHK_P7, CHK_P8, CHK_P9, };
|
||||
CL = new[] { CHK_L1, CHK_L2, CHK_L3, CHK_L4, CHK_L5, CHK_L6, CHK_L7, };
|
||||
|
||||
|
@ -173,17 +173,17 @@ namespace PKHeX.WinForms
|
|||
if (f < 0)
|
||||
return;
|
||||
|
||||
for (int i = 0; i < CLB_FormsSeen.Items.Count/2; i++) // Seen
|
||||
Zukan.SetFormFlag(f, 0, CLB_FormsSeen.GetItemChecked(i));
|
||||
for (int i = 0; i < CLB_FormsSeen.Items.Count/2; i++) // Seen Shiny
|
||||
Zukan.SetFormFlag(f, 1, CLB_FormsSeen.GetItemChecked(i + (CLB_FormsSeen.Items.Count/2)));
|
||||
var seen = CLB_FormsSeen;
|
||||
for (int i = 0; i < seen.Items.Count/2; i++) // Seen
|
||||
Zukan.SetFormFlag(f + i, 0, seen.GetItemChecked(i));
|
||||
for (int i = 0; i < seen.Items.Count/2; i++) // Seen Shiny
|
||||
Zukan.SetFormFlag(f + i, 1, seen.GetItemChecked(i + (seen.Items.Count/2)));
|
||||
|
||||
editing = true;
|
||||
for (int i = 0; i < CLB_FormDisplayed.Items.Count/2; i++) // Displayed
|
||||
Zukan.SetFormFlag(f, 2, CLB_FormDisplayed.GetItemChecked(i));
|
||||
for (int i = 0; i < CLB_FormDisplayed.Items.Count/2; i++) // Displayed Shiny
|
||||
Zukan.SetFormFlag(f, 3, CLB_FormDisplayed.GetItemChecked(i + (CLB_FormDisplayed.Items.Count/2)));
|
||||
editing = false;
|
||||
var display = CLB_FormDisplayed;
|
||||
for (int i = 0; i < display.Items.Count/2; i++) // Displayed
|
||||
Zukan.SetFormFlag(f + i, 2, display.GetItemChecked(i));
|
||||
for (int i = 0; i < display.Items.Count/2; i++) // Displayed Shiny
|
||||
Zukan.SetFormFlag(f + i, 3, display.GetItemChecked(i + (display.Items.Count/2)));
|
||||
}
|
||||
|
||||
private void B_Cancel_Click(object sender, EventArgs e)
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace PKHeX.WinForms
|
|||
InitializeComponent();
|
||||
WinFormsUtil.TranslateInterface(this, Main.CurrentLanguage);
|
||||
SAV = (SAV6XY)(Origin = sav).Clone();
|
||||
Zukan = SAV.Blocks.Zukan;
|
||||
Zukan = SAV.Zukan;
|
||||
CP = new[] { CHK_P1, CHK_P2, CHK_P3, CHK_P4, CHK_P5, CHK_P6, CHK_P7, CHK_P8, CHK_P9, };
|
||||
CL = new[] { CHK_L1, CHK_L2, CHK_L3, CHK_L4, CHK_L5, CHK_L6, CHK_L7, };
|
||||
|
||||
|
@ -182,17 +182,17 @@ namespace PKHeX.WinForms
|
|||
if (f < 0)
|
||||
return;
|
||||
|
||||
for (int i = 0; i < CLB_FormsSeen.Items.Count / 2; i++) // Seen
|
||||
Zukan.SetFormFlag(f, 0, CLB_FormsSeen.GetItemChecked(i));
|
||||
for (int i = 0; i < CLB_FormsSeen.Items.Count / 2; i++) // Seen Shiny
|
||||
Zukan.SetFormFlag(f, 1, CLB_FormsSeen.GetItemChecked(i + (CLB_FormsSeen.Items.Count / 2)));
|
||||
var seen = CLB_FormsSeen;
|
||||
for (int i = 0; i < seen.Items.Count / 2; i++) // Seen
|
||||
Zukan.SetFormFlag(f + i, 0, seen.GetItemChecked(i));
|
||||
for (int i = 0; i < seen.Items.Count / 2; i++) // Seen Shiny
|
||||
Zukan.SetFormFlag(f + i, 1, seen.GetItemChecked(i + (seen.Items.Count / 2)));
|
||||
|
||||
editing = true;
|
||||
for (int i = 0; i < CLB_FormDisplayed.Items.Count / 2; i++) // Displayed
|
||||
Zukan.SetFormFlag(f, 2, CLB_FormDisplayed.GetItemChecked(i));
|
||||
for (int i = 0; i < CLB_FormDisplayed.Items.Count / 2; i++) // Displayed Shiny
|
||||
Zukan.SetFormFlag(f, 3, CLB_FormDisplayed.GetItemChecked(i + (CLB_FormDisplayed.Items.Count / 2)));
|
||||
editing = false;
|
||||
var display = CLB_FormDisplayed;
|
||||
for (int i = 0; i < display.Items.Count / 2; i++) // Displayed
|
||||
Zukan.SetFormFlag(f + i, 2, display.GetItemChecked(i));
|
||||
for (int i = 0; i < display.Items.Count / 2; i++) // Displayed Shiny
|
||||
Zukan.SetFormFlag(f + i, 3, display.GetItemChecked(i + (display.Items.Count / 2)));
|
||||
}
|
||||
|
||||
private void B_Cancel_Click(object sender, EventArgs e)
|
||||
|
|
Loading…
Reference in a new issue