From 66caee41b9c0bf33cb2057904ae2f4856a196432 Mon Sep 17 00:00:00 2001 From: Kurt Date: Wed, 26 Nov 2014 23:06:10 -0800 Subject: [PATCH 1/3] Fix item duplication issue with Inventory Editor --- PKX/f1-Main.cs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/PKX/f1-Main.cs b/PKX/f1-Main.cs index 18afbf6e8..d2edd4b44 100644 --- a/PKX/f1-Main.cs +++ b/PKX/f1-Main.cs @@ -6251,10 +6251,20 @@ namespace PKHeX abilitylist[0] = itemlist[0] = movelist[0] = "("+itemlist[0]+")"; // Fix Item Names (Duplicate entries) - itemlist[456] += " (OLD)"; - itemlist[629] += " (2)"; - itemlist[707] += " (2)"; - itemlist[713] += " (2)"; + itemlist[456] += " (OLD)"; // S.S. Ticket + itemlist[463] += " (OLD)"; // Storage Key + itemlist[478] += " (OLD)"; // Basement Key + itemlist[626] += " (2)"; // Xtransceiver + itemlist[629] += " (2)"; // DNA Splicers + itemlist[637] += " (2)"; // Dropped Item + itemlist[707] += " (2)"; // Travel Trunk + itemlist[713] += " (2)"; // Alt Bike + itemlist[714] += " (2)"; // Holo Caster + itemlist[729] += " (1)"; // Meteorite + itemlist[740] += " (2)"; // Contest Costume + itemlist[751] += " (2)"; // Meteorite + itemlist[771] += " (3)"; // Meteorite + itemlist[772] += " (4)"; // Meteorite // Get the Egg Name and then replace it with --- for the comboboxes. eggname = specieslist[0]; From 54c9d5c24daba7ca30f60c030271825eaedfbf6f Mon Sep 17 00:00:00 2001 From: Kurt Date: Wed, 26 Nov 2014 23:06:25 -0800 Subject: [PATCH 2/3] Add Volcanic Ash --- SAV/SAV_EventFlagsORAS.Designer.cs | 25 +++++++++++++++++++++++++ SAV/SAV_EventFlagsORAS.cs | 5 +++++ 2 files changed, 30 insertions(+) diff --git a/SAV/SAV_EventFlagsORAS.Designer.cs b/SAV/SAV_EventFlagsORAS.Designer.cs index ff7b07843..df109d1e4 100644 --- a/SAV/SAV_EventFlagsORAS.Designer.cs +++ b/SAV/SAV_EventFlagsORAS.Designer.cs @@ -110,6 +110,8 @@ this.flag_0289 = new System.Windows.Forms.CheckBox(); this.flag_0285 = new System.Windows.Forms.CheckBox(); this.flag_0284 = new System.Windows.Forms.CheckBox(); + this.MT_Ash = new System.Windows.Forms.MaskedTextBox(); + this.label2 = new System.Windows.Forms.Label(); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.nud)).BeginInit(); this.groupBox2.SuspendLayout(); @@ -1138,11 +1140,31 @@ this.flag_0284.UseVisualStyleBackColor = true; this.flag_0284.Click += new System.EventHandler(this.toggleFlag); // + // MT_Ash + // + this.MT_Ash.Location = new System.Drawing.Point(459, 454); + this.MT_Ash.Mask = "00000"; + this.MT_Ash.Name = "MT_Ash"; + this.MT_Ash.Size = new System.Drawing.Size(42, 20); + this.MT_Ash.TabIndex = 18; + this.MT_Ash.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(429, 438); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(72, 13); + this.label2.TabIndex = 19; + this.label2.Text = "Volcanic Ash:"; + // // SAV_EventFlagsORAS // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(594, 512); + this.Controls.Add(this.label2); + this.Controls.Add(this.MT_Ash); this.Controls.Add(this.GB_Misc); this.Controls.Add(this.GB_Rebattle); this.Controls.Add(this.groupBox2); @@ -1166,6 +1188,7 @@ this.GB_Misc.ResumeLayout(false); this.GB_Misc.PerformLayout(); this.ResumeLayout(false); + this.PerformLayout(); } @@ -1252,5 +1275,7 @@ private System.Windows.Forms.CheckBox flag_0260; private System.Windows.Forms.CheckBox checkBox3; private System.Windows.Forms.CheckBox checkBox4; + private System.Windows.Forms.MaskedTextBox MT_Ash; + private System.Windows.Forms.Label label2; } } \ No newline at end of file diff --git a/SAV/SAV_EventFlagsORAS.cs b/SAV/SAV_EventFlagsORAS.cs index 31eee3c49..3c0bb4b9e 100644 --- a/SAV/SAV_EventFlagsORAS.cs +++ b/SAV/SAV_EventFlagsORAS.cs @@ -22,6 +22,7 @@ namespace PKHeX Setup(); nud.Text = "0"; // Prompts an update for flag 0. + MT_Ash.Text = BitConverter.ToUInt16(m_parent.savefile, savshift + 0x14A78 + 0x5400).ToString(); } Form1 m_parent; public int savshift; @@ -45,6 +46,10 @@ namespace PKHeX data[i/8] |= (byte)(1 << i%8); Array.Copy(data, 0, m_parent.savefile, 0x1A0FC + savshift, 0x180); + + // Copy back Volcanic Ash counter + Array.Copy(BitConverter.GetBytes(Util.ToUInt32(MT_Ash)), 0, m_parent.savefile, 0x14A78 + 0x5400 + savshift, 2); + this.Close(); } private void Setup() From 16c71cbd8fe969ee15ff5a9ba3a714d8f3fb2097 Mon Sep 17 00:00:00 2001 From: Kurt Date: Wed, 26 Nov 2014 23:06:35 -0800 Subject: [PATCH 3/3] Fix Item wondercard viewing --- SAV/SAV_Wondercard.cs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/SAV/SAV_Wondercard.cs b/SAV/SAV_Wondercard.cs index 67aa78a22..f6cb0a751 100644 --- a/SAV/SAV_Wondercard.cs +++ b/SAV/SAV_Wondercard.cs @@ -65,19 +65,15 @@ namespace PKHeX } string cardname = Encoding.Unicode.GetString(wondercard_data, 0x2, 0x48); int cardtype = wondercard_data[0x51]; - - RTB.Text = - "Card #: " + cardID.ToString("0000") + "\r\n" - + cardname + "\r\n"; + RTB.Clear(); + RTB.AppendText("Card #: " + cardID.ToString("0000") + "\r\n" + cardname + "\r\n"); if (cardtype == 1) // Item { int item = BitConverter.ToUInt16(wondercard_data, 0x68); int qty = BitConverter.ToUInt16(wondercard_data, 0x70); - RTB.Text += - "Item: " + item.ToString() + "\r\n" - + "Quantity: " + qty.ToString(); + RTB.AppendText("\r\nItem: " + Form1.itemlist[item] + "\r\n" + "Quantity: " + qty.ToString()); } else if (cardtype == 0) // PKM {