Added Wondercard Code Generation

This commit is contained in:
Kurt 2014-07-20 00:09:08 -07:00
parent 89a4696c43
commit 3b7aec7f2e
2 changed files with 9 additions and 2 deletions

View file

@ -87,7 +87,8 @@
this.CB_Source.FormattingEnabled = true;
this.CB_Source.Items.AddRange(new object[] {
"Loaded EKX (Tabs)",
"Box EKX "});
"Box EKX",
"Wondercard"});
this.CB_Source.Location = new System.Drawing.Point(90, 23);
this.CB_Source.Name = "CB_Source";
this.CB_Source.Size = new System.Drawing.Size(132, 21);

View file

@ -64,7 +64,13 @@ namespace PKHeX
// Wondercard #
int wcn = CB_Slot.SelectedIndex;
// copy from save, the chosen wondercard offset, to new data
Array.Copy(m_parent.savefile, SaveGame.Wondercard + wcn * 0x108, newdata, 0, 0x108);
Array.Copy(m_parent.savefile, SaveGame.Wondercard + wcn * 0x108 + 0x100, newdata, 0, 0x108);
byte[] zerodata = new Byte[0x108];
if (newdata.SequenceEqual(zerodata))
{
System.Media.SystemSounds.Exclamation.Play();
return false;
}
}
return true;
}