Give All Pokedex Entries functionality

This commit is contained in:
Kurt 2014-08-17 11:30:46 -07:00
parent 920a5edb46
commit 3d29b74c83
3 changed files with 82 additions and 6 deletions

View file

@ -301,9 +301,15 @@ http://projectpokemon.org/forums/showthread.php?36986
- Fixed: Setting Pokemon outside of the Party will now add their entries to the Pokedex.
- Fixed: Kalos entries erroring out with the Pokedex editor.
08/16/14 - New Update:
08/16/14 - New Update: (720)
- Added: Clicking the OT name with a save file will load the Country/Region/3DS Region/Language settings, but not the game.
- Added: Import Database can now import past gen files too, as they will be converted to the new PKX format.
- Fixed: Importing past gen files with party data will no longer have 'invalid checksums' or fail to load.
- Fixed: Externally edited saves with bad data are handled more efficiently (items/sprites).
- Fixed: Users entering values above a certain limit (byte values are capped at 255).
- Fixed: Users entering values above a certain limit (byte values are capped at 255).
08/18/14 - New Update:
- Added: Import Database will now add the Pokedex entries for the data you load.
- Added: Pokedex Give All Entries added (Fill Dex gives everything, Give All gives all for the specific species).
- Fixed: Level 100 glitching fixed.
- Removed: Backup (.bak) saving when replacing the Cyber Save file "main".

View file

@ -306,13 +306,13 @@
//
// B_GiveAll
//
this.B_GiveAll.Enabled = false;
this.B_GiveAll.Location = new System.Drawing.Point(160, 11);
this.B_GiveAll.Name = "B_GiveAll";
this.B_GiveAll.Size = new System.Drawing.Size(80, 23);
this.B_GiveAll.TabIndex = 23;
this.B_GiveAll.Text = "Give All";
this.B_GiveAll.UseVisualStyleBackColor = true;
this.B_GiveAll.Click += new System.EventHandler(this.B_GiveAll_Click);
//
// B_Save
//
@ -326,13 +326,13 @@
//
// B_FillDex
//
this.B_FillDex.Enabled = false;
this.B_FillDex.Location = new System.Drawing.Point(287, 11);
this.B_FillDex.Name = "B_FillDex";
this.B_FillDex.Size = new System.Drawing.Size(80, 23);
this.B_FillDex.TabIndex = 25;
this.B_FillDex.Text = "Fill Dex";
this.B_FillDex.UseVisualStyleBackColor = true;
this.B_FillDex.Click += new System.EventHandler(this.B_FillDex_Click);
//
// GB_Language
//

View file

@ -32,8 +32,12 @@ namespace PKHeX
private void Setup()
{
// Clear Listbox and ComboBox
LB_Species.Items.Clear();
CB_Species.Items.Clear();
try
{
LB_Species.Items.Clear();
CB_Species.Items.Clear();
}
catch { }
// Fill List
#region Species
@ -224,5 +228,71 @@ namespace PKHeX
Array.Copy(sav, m_parent.savefile, sav.Length);
this.Close();
}
private void B_GiveAll_Click(object sender, EventArgs e)
{
CHK_L1.Checked =
CHK_L2.Checked =
CHK_L3.Checked =
CHK_L4.Checked =
CHK_L5.Checked =
CHK_L6.Checked =
CHK_L7.Checked =
CHK_P1.Checked =
CHK_P2.Checked =
CHK_P3.Checked =
CHK_P4.Checked =
CHK_P5.Checked =
CHK_P6.Checked =
CHK_P7.Checked =
CHK_P8.Checked =
CHK_P9.Checked =
CHK_P10.Checked = !(ModifierKeys == Keys.Control);
if (CHK_F1.Enabled)
{
CHK_F1.Checked = !(ModifierKeys == Keys.Control);
}
changePartitionBool(null, null);
changeLanguageBool(null, null);
}
private void B_FillDex_Click(object sender, EventArgs e)
{
{
byte[] sdata = new Byte[0x60];
for (int i = 0; i < 0x60; i++)
sdata[i] = 0xFF;
for (int p = 0; p < 10; p++) // FF out the partitions
Array.Copy(sdata, 0, sav, savshift + 0x1A408 + 0x60 * p, 0x60);
}
// Fill Foreign Obtained
{
byte[] foreigndata = new byte[0x52];
for (int i = 0; i < 0x52; i++)
foreigndata[i] = 0xFF;
foreigndata[0x51] = 1;
Array.Copy(foreigndata, 0, sav, savshift + 0x1AA4C, 0x52);
}
{
byte[] langdata = new Byte[0x280];
for (int i = 0; i < 630; i++)
langdata[i] = 0xFF;
langdata[630] = 0x7F;
Array.Copy(langdata, 0, sav, savshift + 0x1A7C8, 0x280);
}
editing = true;
Setup();
editing = false;
LB_Species.SelectedIndex = 0;
}
}
}