Upgrade with NationalDexMode (#960)

Just edit dex. Events unchanged.
This commit is contained in:
pokecal 2017-03-21 12:14:37 +09:00 committed by Kurt
parent f7b3820e57
commit e3b501d2ee
3 changed files with 25 additions and 2 deletions

View file

@ -51,6 +51,7 @@
this.mnuCaughtNone = new System.Windows.Forms.ToolStripMenuItem();
this.mnuCaughtAll = new System.Windows.Forms.ToolStripMenuItem();
this.mnuComplete = new System.Windows.Forms.ToolStripMenuItem();
this.mnuUpgraded = new System.Windows.Forms.ToolStripMenuItem();
this.CHK_Seen = new System.Windows.Forms.CheckBox();
this.LB_Gender = new System.Windows.Forms.ListBox();
this.B_GUp = new System.Windows.Forms.Button();
@ -241,7 +242,8 @@
this.mnuSeenAll,
this.mnuCaughtNone,
this.mnuCaughtAll,
this.mnuComplete});
this.mnuComplete,
this.mnuUpgraded});
this.modifyMenu.Name = "modifyMenu";
this.modifyMenu.Size = new System.Drawing.Size(149, 114);
//
@ -280,6 +282,14 @@
this.mnuComplete.Text = "Complete Dex";
this.mnuComplete.Click += new System.EventHandler(this.modifyAll);
//
// mnuUpgraded
//
this.mnuUpgraded.CheckOnClick = true;
this.mnuUpgraded.Name = "mnuUpgraded";
this.mnuUpgraded.Size = new System.Drawing.Size(148, 22);
this.mnuUpgraded.Text = "National Dex";
this.mnuUpgraded.Click += new System.EventHandler(this.mnuUpgraded_Click);
//
// CHK_Seen
//
this.CHK_Seen.AutoSize = true;
@ -488,6 +498,7 @@
private System.Windows.Forms.ToolStripMenuItem mnuCaughtNone;
private System.Windows.Forms.ToolStripMenuItem mnuCaughtAll;
private System.Windows.Forms.ToolStripMenuItem mnuComplete;
private System.Windows.Forms.ToolStripMenuItem mnuUpgraded;
private System.Windows.Forms.CheckBox CHK_Seen;
private System.Windows.Forms.ListBox LB_Gender;
private System.Windows.Forms.Button B_GUp;
@ -504,4 +515,4 @@
private System.Windows.Forms.Label L_Seen;
private System.Windows.Forms.Label L_NotSeen;
}
}
}

View file

@ -27,6 +27,8 @@ namespace PKHeX.WinForms
for (int i = 1; i < SAV.MaxSpeciesID + 1; i++)
LB_Species.Items.Add(i.ToString("000") + " - " + GameInfo.Strings.specieslist[i]);
mnuUpgraded.Checked = SAV.DexUpgraded;
editing = false;
LB_Species.SelectedIndex = 0;
}
@ -426,5 +428,10 @@ namespace PKHeX.WinForms
lb.Items.Insert(newIndex, item);
lb.SelectedIndex = newIndex;
}
private void mnuUpgraded_Click(object sender, EventArgs e)
{
SAV.DexUpgraded ^= true;
mnuUpgraded.Checked = SAV.DexUpgraded;
}
}
}

View file

@ -1020,5 +1020,10 @@ namespace PKHeX.Core
Forms[n1] = FormNum;
return true;
}
public bool DexUpgraded
{
get{ return (Data[0x1415 + GBO] & 1) != 0; }
set{ Data[0x1415 + GBO] = (byte)((Data[0x1415 + GBO] & 0xFE) | (value ? 1 : 0)); }
}
}
}