mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-22 12:03:10 +00:00
Bugfixes
Illegal TIDSID prevention, fixed shiny detection (button clicking)
This commit is contained in:
parent
cf72d42016
commit
71275142f8
2 changed files with 14 additions and 25 deletions
26
f1-Main.Designer.cs
generated
26
f1-Main.Designer.cs
generated
|
@ -212,7 +212,6 @@
|
|||
this.Menu_Exit = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.Menu_Tools = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.Menu_OpenBoxUI = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.Menu_ImportGen5 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.Menu_BoxIO = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.codeGeneratorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.reportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
|
@ -2540,10 +2539,9 @@
|
|||
//
|
||||
this.Menu_Tools.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.Menu_OpenBoxUI,
|
||||
this.Menu_ImportGen5,
|
||||
this.Menu_BoxIO,
|
||||
this.codeGeneratorToolStripMenuItem,
|
||||
this.reportToolStripMenuItem});
|
||||
this.reportToolStripMenuItem,
|
||||
this.codeGeneratorToolStripMenuItem});
|
||||
this.Menu_Tools.Name = "Menu_Tools";
|
||||
this.Menu_Tools.Size = new System.Drawing.Size(48, 20);
|
||||
this.Menu_Tools.Text = "Tools";
|
||||
|
@ -2551,37 +2549,28 @@
|
|||
// Menu_OpenBoxUI
|
||||
//
|
||||
this.Menu_OpenBoxUI.Name = "Menu_OpenBoxUI";
|
||||
this.Menu_OpenBoxUI.Size = new System.Drawing.Size(174, 22);
|
||||
this.Menu_OpenBoxUI.Text = "Open Box Interface";
|
||||
this.Menu_OpenBoxUI.Size = new System.Drawing.Size(182, 22);
|
||||
this.Menu_OpenBoxUI.Text = "Toggle Box Interface";
|
||||
this.Menu_OpenBoxUI.Click += new System.EventHandler(this.mainmenuWiden);
|
||||
//
|
||||
// Menu_ImportGen5
|
||||
//
|
||||
this.Menu_ImportGen5.Name = "Menu_ImportGen5";
|
||||
this.Menu_ImportGen5.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.I)));
|
||||
this.Menu_ImportGen5.ShowShortcutKeys = false;
|
||||
this.Menu_ImportGen5.Size = new System.Drawing.Size(174, 22);
|
||||
this.Menu_ImportGen5.Text = "&Import Gen5 PKM";
|
||||
this.Menu_ImportGen5.Click += new System.EventHandler(this.mainmenug5pkm);
|
||||
//
|
||||
// Menu_BoxIO
|
||||
//
|
||||
this.Menu_BoxIO.Name = "Menu_BoxIO";
|
||||
this.Menu_BoxIO.Size = new System.Drawing.Size(174, 22);
|
||||
this.Menu_BoxIO.Size = new System.Drawing.Size(182, 22);
|
||||
this.Menu_BoxIO.Text = "Load/Dump Boxes";
|
||||
this.Menu_BoxIO.Click += new System.EventHandler(this.Menu_DumpLoadBoxes_Click);
|
||||
//
|
||||
// codeGeneratorToolStripMenuItem
|
||||
//
|
||||
this.codeGeneratorToolStripMenuItem.Name = "codeGeneratorToolStripMenuItem";
|
||||
this.codeGeneratorToolStripMenuItem.Size = new System.Drawing.Size(174, 22);
|
||||
this.codeGeneratorToolStripMenuItem.Size = new System.Drawing.Size(182, 22);
|
||||
this.codeGeneratorToolStripMenuItem.Text = "Code Generator";
|
||||
this.codeGeneratorToolStripMenuItem.Click += new System.EventHandler(this.codeGeneratorToolStripMenuItem_Click);
|
||||
//
|
||||
// reportToolStripMenuItem
|
||||
//
|
||||
this.reportToolStripMenuItem.Name = "reportToolStripMenuItem";
|
||||
this.reportToolStripMenuItem.Size = new System.Drawing.Size(174, 22);
|
||||
this.reportToolStripMenuItem.Size = new System.Drawing.Size(182, 22);
|
||||
this.reportToolStripMenuItem.Text = "Box Data Report";
|
||||
this.reportToolStripMenuItem.Click += new System.EventHandler(this.reportToolStripMenuItem_Click);
|
||||
//
|
||||
|
@ -4189,7 +4178,6 @@
|
|||
private System.Windows.Forms.Label Label_CharacteristicPrefix;
|
||||
private System.Windows.Forms.ToolStripMenuItem Menu_Tools;
|
||||
private System.Windows.Forms.ToolStripMenuItem Menu_OpenBoxUI;
|
||||
private System.Windows.Forms.ToolStripMenuItem Menu_ImportGen5;
|
||||
private System.Windows.Forms.ToolStripMenuItem Menu_Options;
|
||||
private System.Windows.Forms.ToolStripMenuItem Menu_Language;
|
||||
private System.Windows.Forms.ToolStripComboBox CB_MainLanguage;
|
||||
|
|
13
f1-Main.cs
13
f1-Main.cs
|
@ -5678,7 +5678,7 @@ namespace PKHeX
|
|||
uint XOR = TSV ^ PSV;
|
||||
|
||||
// Check to see if we actually did it right...
|
||||
if (((XOR > 8) && (CB_GameOrigin.SelectedIndex < 24)) || ((XOR > 16) && (CB_GameOrigin.SelectedIndex > 24)))
|
||||
if (((XOR > 8) && (CB_GameOrigin.SelectedIndex < 24)) || ((XOR > 16) && (CB_GameOrigin.SelectedIndex >= 24)))
|
||||
{
|
||||
TB_PID.Text = ((UID ^ XOR) * 0x10000 + LID).ToString("X8");
|
||||
}
|
||||
|
@ -5689,6 +5689,11 @@ namespace PKHeX
|
|||
// Trim out nonhex characters
|
||||
RemoveTroublesomeCharacters(TB_PID);
|
||||
RemoveTroublesomeCharacters(TB_EC);
|
||||
|
||||
if (ToUInt32(TB_TID.Text) > 0xFFFF)
|
||||
TB_TID.Text = TB_TID.Text.Remove(TB_TID.Text.Length - 1);
|
||||
if (ToUInt32(TB_TID.Text) > 0xFFFF)
|
||||
TB_SID.Text = TB_SID.Text.Remove(TB_SID.Text.Length - 1);
|
||||
|
||||
getIsShiny();
|
||||
UpdateIVs(sender, e); // If the PID is changed, PID%6 (Characteristic) might be changed.
|
||||
|
@ -6002,10 +6007,6 @@ namespace PKHeX
|
|||
string message = "PKHeX - By Kaphotics.\n\nUI Inspiried by Codr's PokeGen.\n\nThanks to all the researchers!";
|
||||
MessageBox.Show(message, caption);
|
||||
}
|
||||
private void mainmenug5pkm(object sender, EventArgs e)
|
||||
{
|
||||
openg5pkm();
|
||||
}
|
||||
private void mainmenuWiden(object sender, EventArgs e)
|
||||
{
|
||||
int newwidth;
|
||||
|
@ -8178,7 +8179,7 @@ namespace PKHeX
|
|||
uint PSV = UID ^ LID;
|
||||
uint TSV = ToUInt32(TB_TID.Text) ^ ToUInt32(TB_SID.Text);
|
||||
uint XOR = TSV ^ PSV;
|
||||
if (((XOR < 8) && (gamevers < 24)) || ((XOR < 16) && (gamevers > 24)))
|
||||
if (((XOR < 8) && (gamevers < 24)) || ((XOR < 16) && (gamevers >= 24)))
|
||||
{ // Is Shiny
|
||||
isshiny = " ★";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue