CyberGadget updates.

Updated Item editing, simplified code generation, added writing to
party.
This commit is contained in:
Kurt 2014-07-26 14:56:06 -07:00
parent 8c32879a41
commit 38d7e96df8
11 changed files with 554 additions and 820 deletions

View file

@ -42,44 +42,49 @@
this.B_Load = new System.Windows.Forms.Button();
this.B_Add = new System.Windows.Forms.Button();
this.B_Clear = new System.Windows.Forms.Button();
this.B_Copy = new System.Windows.Forms.Button();
this.B_Diff = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// RTB_Code
//
this.RTB_Code.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.RTB_Code.Location = new System.Drawing.Point(12, 100);
this.RTB_Code.Location = new System.Drawing.Point(8, 43);
this.RTB_Code.Name = "RTB_Code";
this.RTB_Code.ReadOnly = true;
this.RTB_Code.Size = new System.Drawing.Size(210, 175);
this.RTB_Code.Size = new System.Drawing.Size(160, 200);
this.RTB_Code.TabIndex = 0;
this.RTB_Code.Text = "01234567 01234567 01234567 ";
this.RTB_Code.Text = "01234567 01234567 ";
//
// TB_Write
//
this.TB_Write.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.TB_Write.Location = new System.Drawing.Point(12, 24);
this.TB_Write.Location = new System.Drawing.Point(29, 105);
this.TB_Write.Name = "TB_Write";
this.TB_Write.Size = new System.Drawing.Size(65, 20);
this.TB_Write.TabIndex = 1;
this.TB_Write.Text = "01234567";
this.TB_Write.Visible = false;
//
// L_Write
//
this.L_Write.AutoSize = true;
this.L_Write.Location = new System.Drawing.Point(9, 8);
this.L_Write.Location = new System.Drawing.Point(26, 89);
this.L_Write.Name = "L_Write";
this.L_Write.Size = new System.Drawing.Size(66, 13);
this.L_Write.TabIndex = 2;
this.L_Write.Text = "Write Offset:";
this.L_Write.Visible = false;
//
// L_Source
//
this.L_Source.AutoSize = true;
this.L_Source.Location = new System.Drawing.Point(87, 8);
this.L_Source.Location = new System.Drawing.Point(26, 133);
this.L_Source.Name = "L_Source";
this.L_Source.Size = new System.Drawing.Size(70, 13);
this.L_Source.TabIndex = 5;
this.L_Source.Text = "Data Source:";
this.L_Source.Visible = false;
//
// CB_Source
//
@ -89,39 +94,42 @@
"Loaded EKX (Tabs)",
"Box EKX",
"Wondercard"});
this.CB_Source.Location = new System.Drawing.Point(90, 23);
this.CB_Source.Location = new System.Drawing.Point(29, 148);
this.CB_Source.Name = "CB_Source";
this.CB_Source.Size = new System.Drawing.Size(132, 21);
this.CB_Source.TabIndex = 6;
this.CB_Source.SelectedIndexChanged += new System.EventHandler(this.changeDataSource);
this.CB_Source.Visible = false;
//
// B_Save
//
this.B_Save.Location = new System.Drawing.Point(12, 71);
this.B_Save.Location = new System.Drawing.Point(91, 189);
this.B_Save.Name = "B_Save";
this.B_Save.Size = new System.Drawing.Size(69, 23);
this.B_Save.TabIndex = 9;
this.B_Save.Text = "Save Code";
this.B_Save.UseVisualStyleBackColor = true;
this.B_Save.Visible = false;
this.B_Save.Click += new System.EventHandler(this.B_Save_Click);
//
// L_Box
//
this.L_Box.AutoSize = true;
this.L_Box.Location = new System.Drawing.Point(87, 48);
this.L_Box.Location = new System.Drawing.Point(26, 173);
this.L_Box.Name = "L_Box";
this.L_Box.Size = new System.Drawing.Size(28, 13);
this.L_Box.TabIndex = 10;
this.L_Box.Text = "Box:";
this.L_Box.Visible = false;
//
// L_Slot
//
this.L_Slot.AutoSize = true;
this.L_Slot.Location = new System.Drawing.Point(156, 48);
this.L_Slot.Location = new System.Drawing.Point(95, 173);
this.L_Slot.Name = "L_Slot";
this.L_Slot.Size = new System.Drawing.Size(28, 13);
this.L_Slot.TabIndex = 11;
this.L_Slot.Text = "Slot:";
this.L_Slot.Visible = false;
//
// CB_Slot
//
@ -131,10 +139,11 @@
"Loaded EKX (Tabs)",
"Box EKX ",
"Wondercard"});
this.CB_Slot.Location = new System.Drawing.Point(187, 44);
this.CB_Slot.Location = new System.Drawing.Point(126, 169);
this.CB_Slot.Name = "CB_Slot";
this.CB_Slot.Size = new System.Drawing.Size(35, 21);
this.CB_Slot.TabIndex = 12;
this.CB_Slot.Visible = false;
//
// CB_Box
//
@ -172,46 +181,72 @@
"29",
"30",
"31"});
this.CB_Box.Location = new System.Drawing.Point(120, 44);
this.CB_Box.Location = new System.Drawing.Point(59, 169);
this.CB_Box.Name = "CB_Box";
this.CB_Box.Size = new System.Drawing.Size(35, 21);
this.CB_Box.TabIndex = 13;
this.CB_Box.Visible = false;
//
// B_Load
//
this.B_Load.Location = new System.Drawing.Point(12, 48);
this.B_Load.Location = new System.Drawing.Point(12, 191);
this.B_Load.Name = "B_Load";
this.B_Load.Size = new System.Drawing.Size(69, 23);
this.B_Load.TabIndex = 14;
this.B_Load.Text = "Load Code";
this.B_Load.UseVisualStyleBackColor = true;
this.B_Load.Visible = false;
this.B_Load.Click += new System.EventHandler(this.B_Load_Click);
//
// B_Add
//
this.B_Add.Location = new System.Drawing.Point(162, 71);
this.B_Add.Location = new System.Drawing.Point(100, 103);
this.B_Add.Name = "B_Add";
this.B_Add.Size = new System.Drawing.Size(60, 23);
this.B_Add.TabIndex = 15;
this.B_Add.Text = "Add ↓";
this.B_Add.UseVisualStyleBackColor = true;
this.B_Add.Visible = false;
this.B_Add.Click += new System.EventHandler(this.B_Add_Click);
//
// B_Clear
//
this.B_Clear.Location = new System.Drawing.Point(90, 71);
this.B_Clear.Location = new System.Drawing.Point(92, 128);
this.B_Clear.Name = "B_Clear";
this.B_Clear.Size = new System.Drawing.Size(60, 23);
this.B_Clear.Size = new System.Drawing.Size(69, 23);
this.B_Clear.TabIndex = 16;
this.B_Clear.Text = "Clear All";
this.B_Clear.UseVisualStyleBackColor = true;
this.B_Clear.Visible = false;
this.B_Clear.Click += new System.EventHandler(this.B_Clear_Click);
//
// B_Copy
//
this.B_Copy.Location = new System.Drawing.Point(97, 11);
this.B_Copy.Name = "B_Copy";
this.B_Copy.Size = new System.Drawing.Size(69, 23);
this.B_Copy.TabIndex = 17;
this.B_Copy.Text = "Copy";
this.B_Copy.UseVisualStyleBackColor = true;
this.B_Copy.Click += new System.EventHandler(this.B_Copy_Click);
//
// B_Diff
//
this.B_Diff.Location = new System.Drawing.Point(11, 11);
this.B_Diff.Name = "B_Diff";
this.B_Diff.Size = new System.Drawing.Size(69, 23);
this.B_Diff.TabIndex = 18;
this.B_Diff.Text = "Create Diff";
this.B_Diff.UseVisualStyleBackColor = true;
this.B_Diff.Click += new System.EventHandler(this.B_Diff_Click);
//
// CodeGenerator
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(230, 282);
this.ClientSize = new System.Drawing.Size(176, 249);
this.Controls.Add(this.B_Diff);
this.Controls.Add(this.B_Copy);
this.Controls.Add(this.B_Clear);
this.Controls.Add(this.B_Add);
this.Controls.Add(this.B_Load);
@ -252,5 +287,7 @@
private System.Windows.Forms.Button B_Load;
private System.Windows.Forms.Button B_Add;
private System.Windows.Forms.Button B_Clear;
private System.Windows.Forms.Button B_Copy;
private System.Windows.Forms.Button B_Diff;
}
}

View file

@ -92,7 +92,7 @@ namespace PKHeX
L_Box.Visible = false;
CB_Slot.Visible = false;
L_Slot.Visible = false;
TB_Write.Text = (0x27A00 - 0x5400).ToString("X8"); // Box 1, Slot 1
}
else if (sourceindex == 1)
@ -162,6 +162,7 @@ namespace PKHeX
string str = RemoveTroublesomeCharacters(tb);
return UInt32.Parse(str, NumberStyles.HexNumber);
}
private void B_Add_Click(object sender, EventArgs e)
{
// Add the new code to the textbox.
@ -256,5 +257,28 @@ namespace PKHeX
File.WriteAllBytes(path, ncf);
}
}
private void B_Copy_Click(object sender, EventArgs e)
{
Clipboard.SetText(RTB_Code.Text);
}
private void B_Diff_Click(object sender, EventArgs e)
{
RTB_Code.Clear();
byte[] cybersav = m_parent.cyberSAV;
byte[] editedsav = m_parent.savefile;
byte[] newcyber = new Byte[0x65600];
Array.Copy(editedsav, 0x5400, newcyber, 0, 0x65600);
for (int i = 0; i < 0x65400; i += 4)
{
if (BitConverter.ToUInt32(cybersav, i) != BitConverter.ToUInt32(newcyber, i))
{
RTB_Code.AppendText((0x20000000 + i).ToString("X8") + " ");
RTB_Code.AppendText(BitConverter.ToUInt32(newcyber, i).ToString("X8") + "\n");
}
}
}
}
}

View file

@ -117,33 +117,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="TB_Write.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="L_Write.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="L_Source.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CB_Source.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="L_Box.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="L_Slot.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CB_Slot.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CB_Box.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>

View file

@ -44,577 +44,87 @@ namespace PKHeX
// Initialize String Tables
private void getListItems()
{
item_val = new string[] { "(None)", "0",
"Abomasite", "674",
"Absolite", "677",
"Absorb Bulb", "545",
"Adamant Orb", "135",
"Aerodactylite", "672",
"Aggronite", "667",
"Air Balloon", "541",
"Alakazite", "679",
"Amaze Mulch", "655",
"Ampharosite", "658",
"Amulet Coin", "223",
"Armor Fossil", "104",
"Assault Vest", "640",
"Balm Mushroom", "580",
"Banettite", "668",
"Big Mushroom", "87",
"Big Nugget", "581",
"Big Pearl", "89",
"Big Root", "296",
"Binding Band", "544",
"Black Belt", "241",
"Black Flute", "68",
"Black Glasses", "240",
"Black Sludge", "281",
"Blastoisinite", "661",
"Blazikenite", "664",
"Blue Flute", "65",
"Blue Scarf", "261",
"Blue Shard", "73",
"Boost Mulch", "654",
"Bright Powder", "213",
"Bug Gem", "558",
"Burn Drive", "118",
"Cell Battery", "546",
"Charcoal", "249",
"Charizardite X", "660",
"Charizardite Y", "678",
"Cherish Ball", "16",
"Chill Drive", "119",
"Choice Band", "220",
"Choice Scarf", "287",
"Choice Specs", "297",
"Claw Fossil", "100",
"Cleanse Tag", "224",
"Comet Shard", "583",
"Cover Fossil", "572",
"Damp Rock", "285",
"Dark Gem", "562",
"Dawn Stone", "109",
"Deep Sea Scale", "227",
"Deep Sea Tooth", "226",
"Destiny Knot", "280",
"Dire Hit", "56",
"Discount Coupon", "699",
"Dive Ball", "7",
"Dome Fossil", "102",
"Douse Drive", "116",
"Draco Plate", "311",
"Dragon Fang", "250",
"Dragon Gem", "561",
"Dragon Scale", "235",
"Dread Plate", "312",
"Dream Ball", "576",
"Dubious Disc", "324",
"Dusk Ball", "13",
"Dusk Stone", "108",
"Earth Plate", "305",
"Eject Button", "547",
"Electirizer", "322",
"Electric Gem", "550",
"Escape Rope", "78",
"Everstone", "229",
"Eviolite", "538",
"Expert Belt", "268",
"Fairy Gem", "715",
"Fast Ball", "492",
"Fighting Gem", "553",
"Fire Gem", "548",
"Fire Stone", "82",
"Fist Plate", "303",
"Flame Orb", "273",
"Flame Plate", "298",
"Float Stone", "539",
"Fluffy Tail", "64",
"Flying Gem", "556",
"Focus Band", "230",
"Focus Sash", "275",
"Friend Ball", "497",
"Full Incense", "316",
"Garchompite", "683",
"Gardevoirite", "657",
"Gengarite", "656",
"Ghost Gem", "560",
"Grass Gem", "551",
"Great Ball", "3",
"Green Scarf", "263",
"Green Shard", "75",
"Grip Claw", "286",
"Griseous Orb", "112",
"Ground Gem", "555",
"Guard Spec.", "55",
"Gyaradosite", "676",
"Hard Stone", "238",
"Heal Ball", "14",
"Heart Scale", "93",
"Heat Rock", "284",
"Heavy Ball", "495",
"Helix Fossil", "101",
"Heracronite", "680",
"Honey", "94",
"Houndoominite", "666",
"Ice Gem", "552",
"Icicle Plate", "302",
"Icy Rock", "282",
"Insect Plate", "308",
"Iron Ball", "278",
"Iron Plate", "313",
"Jaw Fossil", "710",
"Kangaskhanite", "675",
"King's Rock", "221",
"Lagging Tail", "279",
"Latiasite", "684",
"Latiosite", "685",
"Lax Incense", "255",
"Leaf Stone", "85",
"Leftovers", "234",
"Level Ball", "493",
"Life Orb", "270",
"Light Ball", "236",
"Light Clay", "269",
"Love Ball", "496",
"Lucarionite", "673",
"Luck Incense", "319",
"Lucky Egg", "231",
"Lucky Punch", "256",
"Luminous Moss", "648",
"Lure Ball", "494",
"Lustrous Orb", "136",
"Luxury Ball", "11",
"Macho Brace", "215",
"Magmarizer", "323",
"Magnet", "242",
"Manectite", "682",
"Master Ball", "1",
"Mawilite", "681",
"Max Repel", "77",
"Meadow Plate", "301",
"Medichamite", "665",
"Mental Herb", "219",
"Metal Coat", "233",
"Metal Powder", "257",
"Metronome", "277",
"Mewtwonite X", "662",
"Mewtwonite Y", "663",
"Mind Plate", "307",
"Miracle Seed", "239",
"Moon Ball", "498",
"Moon Stone", "81",
"Muscle Band", "266",
"Mystic Water", "243",
"Nest Ball", "8",
"Net Ball", "6",
"Never-Melt Ice", "246",
"Normal Gem", "564",
"Nugget", "92",
"Odd Incense", "314",
"Old Amber", "103",
"Oval Stone", "110",
"Park Ball", "500",
"Pearl String", "582",
"Pearl", "88",
"Pink Scarf", "262",
"Pinsirite", "671",
"Pixie Plate", "644",
"Plume Fossil", "573",
"Poison Barb", "245",
"Poison Gem", "554",
"Poké Ball", "4",
"Poké Doll", "63",
"Poké Toy", "577",
"Power Anklet", "293",
"Power Band", "292",
"Power Belt", "290",
"Power Bracer", "289",
"Power Herb", "271",
"Power Lens", "291",
"Power Weight", "294",
"Premier Ball", "12",
"Pretty Wing", "571",
"Prism Scale", "537",
"Protector", "321",
"Psychic Gem", "557",
"Pure Incense", "320",
"Quick Ball", "15",
"Quick Claw", "217",
"Quick Powder", "274",
"Rare Bone", "106",
"Razor Claw", "326",
"Razor Fang", "327",
"Reaper Cloth", "325",
"Red Card", "542",
"Red Flute", "67",
"Red Scarf", "260",
"Red Shard", "72",
"Relic Band", "588",
"Relic Copper", "584",
"Relic Crown", "590",
"Relic Gold", "586",
"Relic Silver", "585",
"Relic Statue", "589",
"Relic Vase", "587",
"Repeat Ball", "9",
"Repel", "79",
"Rich Mulch", "652",
"Ring Target", "543",
"Rock Gem", "559",
"Rock Incense", "315",
"Rocky Helmet", "540",
"Root Fossil", "99",
"Rose Incense", "318",
"Sachet", "647",
"Safari Ball", "5",
"Safety Goggles", "650",
"Sail Fossil", "711",
"Scizorite", "670",
"Scope Lens", "232",
"Sea Incense", "254",
"Sharp Beak", "244",
"Shed Shell", "295",
"Shell Bell", "253",
"Shiny Stone", "107",
"Shoal Salt", "70",
"Shoal Shell", "71",
"Shock Drive", "117",
"Silk Scarf", "251",
"Silver Powder", "222",
"Skull Fossil", "105",
"Sky Plate", "306",
"Smoke Ball", "228",
"Smooth Rock", "283",
"Snowball", "649",
"Soft Sand", "237",
"Soothe Bell", "218",
"Soul Dew", "225",
"Spell Tag", "247",
"Splash Plate", "299",
"Spooky Plate", "310",
"Sport Ball", "499",
"Star Piece", "91",
"Stardust", "90",
"Steel Gem", "563",
"Stick", "259",
"Sticky Barb", "288",
"Stone Plate", "309",
"Strange Souvenir", "704",
"Sun Stone", "80",
"Super Repel", "76",
"Surprise Mulch", "653",
"Thick Club", "258",
"Thunder Stone", "83",
"Timer Ball", "10",
"Tiny Mushroom", "86",
"Toxic Orb", "272",
"Toxic Plate", "304",
"Twisted Spoon", "248",
"Tyranitarite", "669",
"Ultra Ball", "2",
"Up-Grade", "252",
"Venusaurite", "659",
"Water Gem", "549",
"Water Stone", "84",
"Wave Incense", "317",
"Weakness Policy", "639",
"Whipped Dream", "646",
"White Flute", "69",
"White Herb", "214",
"Wide Lens", "265",
"Wise Glasses", "267",
"X Accuracy", "60",
"X Attack", "57",
"X Defense", "58",
"X Sp. Atk", "61",
"X Sp. Def", "62",
"X Speed", "59",
"Yellow Flute", "66",
"Yellow Scarf", "264",
"Yellow Shard", "74",
"Zap Plate", "300",
"Zoom Lens", "276",
int[] itemlist = new int[] {
000,001,002,003,004,005,006,007,008,009,010,011,012,013,014,015,016,055,056,
057,058,059,060,061,062,063,064,065,066,067,068,069,070,071,072,073,074,075,
076,077,078,079,080,081,082,083,084,085,086,087,088,089,090,091,092,093,094,
099,100,101,102,103,104,105,106,107,108,109,110,112,116,117,118,119,135,136,
213,214,215,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,
233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,
252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,
271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,
290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,
309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,
492,493,494,495,496,497,498,499,500,537,538,539,540,541,542,543,544,545,546,
547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,571,
572,573,576,577,580,581,582,583,584,585,586,587,588,589,590,639,640,644,646,
647,648,649,650,652,653,654,655,656,657,658,659,660,661,662,663,664,665,666,
667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,
699,704,710,711,715,
};
item_val = new string[itemlist.Length];
for (int i = 0; i < itemlist.Length; i++)
item_val[i] = m_parent.itemlist[itemlist[i]];
Array.Sort(item_val);
}
private void getListKeyItems()
{
keyitem_val = new string[] { "(None)", "0",
"Adventure Rules", "703",
"Bicycle (Green)", "450",
"Bicycle (Yellow)", "713",
"Common Stone", "698",
"DNA Splicers (Fuse)","628",
"DNA Splicers (Split)","629",
"Dowsing MCHN", "471",
"Elevator Key", "700",
"Exp. Share", "216",
"Good Rod", "446",
"Gracidea", "466",
"Holo Caster (M)", "641",
"Holo Caster (F)", "714",
"Honor of Kalos", "702",
"Intriguing Stone", "697",
"Lens Case", "705",
"Looker Ticket", "712",
"Mega Ring", "696",
"Old Rod", "445",
"Oval Charm", "631",
"Poké Radar", "431",
"Power Plant Pass", "695",
"Prof's Letter", "642",
"Reveal Glass", "638",
"Roller Skates", "643",
"Shiny Charm", "632",
"Sprinklotad", "689",
"Super Rod", "447",
"TMV Pass", "701",
"Town Map", "442",
"Travel Trunk (Silver)","706",
"Travel Trunk (Gold)","707",
"Vs. Recorder", "465",
};
int[] itemlist = new int[] {
000,216,431,442,445,446,447,450,465,466,471,628,
629,631,632,638,641,642,643,689,695,696,697,698,
700,701,702,703,705,706,707,712,713,714,
};
keyitem_val = new string[itemlist.Length];
for (int i = 0; i < itemlist.Length; i++)
keyitem_val[i] = m_parent.itemlist[itemlist[i]];
Array.Sort(keyitem_val);
}
private void getListTHMH()
{
tmhm_val = new string[] { "(None)", "0",
"TM01", "328",
"TM02", "329",
"TM03", "330",
"TM04", "331",
"TM05", "332",
"TM06", "333",
"TM07", "334",
"TM08", "335",
"TM09", "336",
"TM10", "337",
"TM11", "338",
"TM12", "339",
"TM13", "340",
"TM14", "341",
"TM15", "342",
"TM16", "343",
"TM17", "344",
"TM18", "345",
"TM19", "346",
"TM20", "347",
"TM21", "348",
"TM22", "349",
"TM23", "350",
"TM24", "351",
"TM25", "352",
"TM26", "353",
"TM27", "354",
"TM28", "355",
"TM29", "356",
"TM30", "357",
"TM31", "358",
"TM32", "359",
"TM33", "360",
"TM34", "361",
"TM35", "362",
"TM36", "363",
"TM37", "364",
"TM38", "365",
"TM39", "366",
"TM40", "367",
"TM41", "368",
"TM42", "369",
"TM43", "370",
"TM44", "371",
"TM45", "372",
"TM46", "373",
"TM47", "374",
"TM48", "375",
"TM49", "376",
"TM50", "377",
"TM51", "378",
"TM52", "379",
"TM53", "380",
"TM54", "381",
"TM55", "382",
"TM56", "383",
"TM57", "384",
"TM58", "385",
"TM59", "386",
"TM60", "387",
"TM61", "388",
"TM62", "389",
"TM63", "390",
"TM64", "391",
"TM65", "392",
"TM66", "393",
"TM67", "394",
"TM68", "395",
"TM69", "396",
"TM70", "397",
"TM71", "398",
"TM72", "399",
"TM73", "400",
"TM74", "401",
"TM75", "402",
"TM76", "403",
"TM77", "404",
"TM78", "405",
"TM79", "406",
"TM80", "407",
"TM81", "408",
"TM82", "409",
"TM83", "410",
"TM84", "411",
"TM85", "412",
"TM86", "413",
"TM87", "414",
"TM88", "415",
"TM89", "416",
"TM90", "417",
"TM91", "418",
"TM92", "419",
"TM93", "618",
"TM94", "619",
"TM95", "620",
"TM96", "690",
"TM97", "691",
"TM98", "692",
"TM99", "693",
"TM100","694",
"HM01", "420",
"HM02", "421",
"HM03", "422",
"HM04", "423",
"HM05", "424",
};
int[] itemlist = new int[] {
0,
328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,
346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,
364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,
382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,
400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,
418,419,618,619,620,690,691,692,693,694,
420,421,422,423,424,
};
tmhm_val = new string[itemlist.Length];
for (int i = 0; i < itemlist.Length; i++)
tmhm_val[i] = m_parent.itemlist[itemlist[i]];
// Array.Sort(tmhm_val); Already sorted, keep HMs last.
}
private void getListMedicine()
{
medicine_val = new string[] { "(None)", "0",
"Ability Capsule", "645",
"Antidote", "18",
"Awakening", "21",
"Berry Juice", "43",
"Burn Heal", "19",
"Calcium", "49",
"Carbos", "48",
"Casteliacone", "591",
"Clever Wing", "569",
"Elixir", "40",
"Energy Powder", "34",
"Energy Root", "35",
"Ether", "38",
"Fresh Water", "30",
"Full Heal", "27",
"Full Restore", "23",
"Genius Wing", "568",
"Heal Powder", "36",
"Health Wing", "565",
"HP Up", "45",
"Hyper Potion", "25",
"Ice Heal", "20",
"Iron", "47",
"Lava Cookie", "42",
"Lemonade", "32",
"Lumiose Galette", "708",
"Max Elixir", "41",
"Max Ether", "39",
"Max Potion", "24",
"Max Revive", "29",
"Moomoo Milk", "33",
"Muscle Wing", "566",
"Old Gateau", "54",
"Paralyze Heal", "22",
"Potion", "17",
"PP Max", "53",
"PP Up", "51",
"Protein", "46",
"Pretty Wing", "571",
"Rage Candy Bar", "504",
"Rare Candy", "50",
"Resist Wing", "567",
"Revival Herb", "37",
"Revive", "28",
"Sacred Ash", "44",
"Shalour Sable", "709",
"Soda Pop", "31",
"Super Potion", "26",
"Sweet Heart", "134",
"Swift Wing", "570",
"Zinc", "52",
};
int[] itemlist = new int[] {
000,017,018,019,020,021,022,023,024,025,026,027,028,029,030,031,032,033,
034,035,036,037,038,039,040,041,042,043,044,045,046,047,048,049,050,051,
052,053,054,134,504,565,566,567,568,569,570,571,591,645,708,709,
};
medicine_val = new string[itemlist.Length];
for (int i = 0; i < itemlist.Length; i++)
medicine_val[i] = m_parent.itemlist[itemlist[i]];
Array.Sort(medicine_val);
}
private void getListBerries()
{
berries_val = new string[] { "(None)", "0",
"Aguav Berry", "162",
"Apicot Berry", "205",
"Aspear Berry", "153",
"Babiri Berry", "199",
"Belue Berry", "183",
"Bluk Berry", "165",
"Charti Berry", "195",
"Cheri Berry", "149",
"Chesto Berry", "150",
"Chilan Berry", "200",
"Chople Berry", "189",
"Coba Berry", "192",
"Colbur Berry", "198",
"Cornn Berry", "175",
"Custap Berry", "210",
"Durin Berry", "182",
"Enigma Berry", "208",
"Figy Berry", "159",
"Ganlon Berry", "202",
"Grepa Berry", "173",
"Haban Berry", "197",
"Hondew Berry", "172",
"Iapapa Berry", "163",
"Jaboca Berry", "211",
"Kasib Berry", "196",
"Kebia Berry", "190",
"Kee Berry", "687",
"Kelpsy Berry", "170",
"Lansat Berry", "206",
"Leppa Berry", "154",
"Liechi Berry", "201",
"Lum Berry", "157",
"Mago Berry", "161",
"Magost Berry", "176",
"Maranga Berry","688",
"Micle Berry", "209",
"Nanab Berry", "166",
"Nomel Berry", "178",
"Occa Berry", "184",
"Oran Berry", "155",
"Pamtre Berry", "180",
"Passho Berry", "185",
"Payapa Berry", "193",
"Pecha Berry", "151",
"Persim Berry", "156",
"Petaya Berry", "204",
"Pinap Berry", "168",
"Pomeg Berry", "169",
"Qualot Berry", "171",
"Rabuta Berry", "177",
"Rawst Berry", "152",
"Razz Berry", "164",
"Rindo Berry", "187",
"Roseli Berry", "686",
"Rowap Berry", "212",
"Salac Berry", "203",
"Shuca Berry", "191",
"Sitrus Berry", "158",
"Spelon Berry", "179",
"Starf Berry", "207",
"Tamato Berry", "174",
"Tanga Berry", "194",
"Wacan Berry", "186",
"Watmel Berry", "181",
"Wepear Berry", "167",
"Wiki Berry", "160",
"Yache Berry", "188",
};
int[] itemlist = new int[] {
0,149,150,151,152,153,154,155,156,157,158,159,160,161,162,
163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,
178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,
193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
208,209,210,211,212,686,687,688,
};
berries_val = new string[itemlist.Length];
for (int i = 0; i < itemlist.Length; i++)
berries_val[i] = m_parent.itemlist[itemlist[i]];
Array.Sort(berries_val);
}
// Populate DataGrid
private void popItems()
{
@ -657,9 +167,9 @@ namespace PKHeX
DataGridViewComboBoxColumn dgvItemVal = new DataGridViewComboBoxColumn();
dgvItemVal.DisplayStyle = DataGridViewComboBoxDisplayStyle.Nothing;
{
for (int i = 0; i < itemarr.Length/2; i++)
for (int i = 0; i < itemarr.Length; i++)
{
dgvItemVal.Items.Add(itemarr[i*2]); // add only the Item Names, not Values
dgvItemVal.Items.Add(itemarr[i]); // add only the Item Names
}
dgvItemVal.DisplayIndex = 0;
dgvItemVal.Width = 135;
@ -674,17 +184,16 @@ namespace PKHeX
for (int i = 0; i < itemcount; i++)
{
int itemvalue = BitConverter.ToUInt16(sav, offset + i*4);
int itemposition = Array.IndexOf(itemarr, itemvalue.ToString());
try
{
itemname = itemarr[itemposition - 1];
itemname = m_parent.itemlist[itemvalue];
}
catch
{
MessageBox.Show("Unknown item detected.\r\n\r\nItem ID: " + itemvalue + "\r\n" + "Item is after: " + itemname, "Error");
continue;
}
int itemarrayval = itemposition - 1;
int itemarrayval = Array.IndexOf(itemarr,itemname);
dataGridView1.Rows[i].Cells[0].Value = itemarr[itemarrayval];
dataGridView1.Rows[i].Cells[1].Value = BitConverter.ToUInt16(sav, offset + i * 4 + 2);
}
@ -733,15 +242,24 @@ namespace PKHeX
for (int i = 0; i < itemcount; i++)
{
string item = dataGridView1.Rows[i].Cells[0].Value.ToString();
string itemindexstr = itemstrarr[Array.IndexOf(itemstrarr, item) + 1];
int itemindex = Convert.ToUInt16(itemindexstr);
int itemcnt = Convert.ToUInt16(dataGridView1.Rows[i].Cells[1].Value.ToString());
int itemindex = Array.IndexOf(m_parent.itemlist, item);
int itemcnt = 0;
try {
itemcnt = Convert.ToUInt16(dataGridView1.Rows[i].Cells[1].Value.ToString());
}
catch {
itemcnt = 0;
}
if (itemindex == 0) // Compression of Empty Slots
{
emptyslots++;
continue;
}
else if (itemcnt == 0)
itemcnt++; // No 0 count of items
else if (itemcnt > 995)
itemcnt = 995;
// Write Data into Save File
Array.Copy(BitConverter.GetBytes(itemindex), 0, sav, offset + 4 * (i - emptyslots), 2);

223
SAV_Trainer.Designer.cs generated
View file

@ -123,6 +123,11 @@
this.label18 = new System.Windows.Forms.Label();
this.label19 = new System.Windows.Forms.Label();
this.label20 = new System.Windows.Forms.Label();
this.GB_Currency = new System.Windows.Forms.GroupBox();
this.TB_BP = new System.Windows.Forms.MaskedTextBox();
this.TB_PM = new System.Windows.Forms.MaskedTextBox();
this.L_BP = new System.Windows.Forms.Label();
this.L_PM = new System.Windows.Forms.Label();
this.GB_Badges.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pb8)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pb6)).BeginInit();
@ -136,13 +141,14 @@
this.GB_Overview.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox1.SuspendLayout();
this.GB_Currency.SuspendLayout();
this.SuspendLayout();
//
// B_Cancel
//
this.B_Cancel.Location = new System.Drawing.Point(551, 308);
this.B_Cancel.Name = "B_Cancel";
this.B_Cancel.Size = new System.Drawing.Size(85, 23);
this.B_Cancel.Size = new System.Drawing.Size(65, 23);
this.B_Cancel.TabIndex = 0;
this.B_Cancel.Text = "Cancel";
this.B_Cancel.UseVisualStyleBackColor = true;
@ -152,7 +158,7 @@
//
this.B_Save.Location = new System.Drawing.Point(551, 284);
this.B_Save.Name = "B_Save";
this.B_Save.Size = new System.Drawing.Size(85, 23);
this.B_Save.Size = new System.Drawing.Size(65, 23);
this.B_Save.TabIndex = 1;
this.B_Save.Text = "Save";
this.B_Save.UseVisualStyleBackColor = true;
@ -199,21 +205,21 @@
//
// L_TID
//
this.L_TID.AutoSize = true;
this.L_TID.Location = new System.Drawing.Point(22, 42);
this.L_TID.Location = new System.Drawing.Point(12, 42);
this.L_TID.Name = "L_TID";
this.L_TID.Size = new System.Drawing.Size(28, 13);
this.L_TID.Size = new System.Drawing.Size(38, 13);
this.L_TID.TabIndex = 6;
this.L_TID.Text = "TID:";
this.L_TID.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// L_SID
//
this.L_SID.AutoSize = true;
this.L_SID.Location = new System.Drawing.Point(22, 65);
this.L_SID.Location = new System.Drawing.Point(12, 65);
this.L_SID.Name = "L_SID";
this.L_SID.Size = new System.Drawing.Size(28, 13);
this.L_SID.Size = new System.Drawing.Size(38, 13);
this.L_SID.TabIndex = 7;
this.L_SID.Text = "SID:";
this.L_SID.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// MT_TID
//
@ -240,90 +246,90 @@
// cb1
//
this.cb1.AutoSize = true;
this.cb1.Enabled = false;
this.cb1.Location = new System.Drawing.Point(236, 32);
this.cb1.Name = "cb1";
this.cb1.Size = new System.Drawing.Size(60, 17);
this.cb1.TabIndex = 10;
this.cb1.Text = "1 - Bug";
this.cb1.UseVisualStyleBackColor = true;
this.cb1.CheckedChanged += new System.EventHandler(this.changeBadge);
//
// cb2
//
this.cb2.AutoSize = true;
this.cb2.Enabled = false;
this.cb2.Location = new System.Drawing.Point(236, 55);
this.cb2.Name = "cb2";
this.cb2.Size = new System.Drawing.Size(58, 17);
this.cb2.TabIndex = 11;
this.cb2.Text = "2 - Cliff";
this.cb2.UseVisualStyleBackColor = true;
this.cb2.CheckedChanged += new System.EventHandler(this.changeBadge);
//
// cb3
//
this.cb3.AutoSize = true;
this.cb3.Enabled = false;
this.cb3.Location = new System.Drawing.Point(236, 78);
this.cb3.Name = "cb3";
this.cb3.Size = new System.Drawing.Size(77, 17);
this.cb3.TabIndex = 12;
this.cb3.Text = "3 - Rumble";
this.cb3.UseVisualStyleBackColor = true;
this.cb3.CheckedChanged += new System.EventHandler(this.changeBadge);
//
// cb4
//
this.cb4.AutoSize = true;
this.cb4.Enabled = false;
this.cb4.Location = new System.Drawing.Point(236, 101);
this.cb4.Name = "cb4";
this.cb4.Size = new System.Drawing.Size(65, 17);
this.cb4.TabIndex = 13;
this.cb4.Text = "4 - Plant";
this.cb4.UseVisualStyleBackColor = true;
this.cb4.CheckedChanged += new System.EventHandler(this.changeBadge);
//
// cb5
//
this.cb5.AutoSize = true;
this.cb5.Enabled = false;
this.cb5.Location = new System.Drawing.Point(312, 32);
this.cb5.Name = "cb5";
this.cb5.Size = new System.Drawing.Size(77, 17);
this.cb5.TabIndex = 14;
this.cb5.Text = "5 - Voltage";
this.cb5.UseVisualStyleBackColor = true;
this.cb5.CheckedChanged += new System.EventHandler(this.changeBadge);
//
// cb6
//
this.cb6.AutoSize = true;
this.cb6.Enabled = false;
this.cb6.Location = new System.Drawing.Point(312, 55);
this.cb6.Name = "cb6";
this.cb6.Size = new System.Drawing.Size(63, 17);
this.cb6.TabIndex = 15;
this.cb6.Text = "6 - Fairy";
this.cb6.UseVisualStyleBackColor = true;
this.cb6.CheckedChanged += new System.EventHandler(this.changeBadge);
//
// cb7
//
this.cb7.AutoSize = true;
this.cb7.Enabled = false;
this.cb7.Location = new System.Drawing.Point(312, 78);
this.cb7.Name = "cb7";
this.cb7.Size = new System.Drawing.Size(78, 17);
this.cb7.TabIndex = 16;
this.cb7.Text = "7 - Psychic";
this.cb7.UseVisualStyleBackColor = true;
this.cb7.CheckedChanged += new System.EventHandler(this.changeBadge);
//
// cb8
//
this.cb8.AutoSize = true;
this.cb8.Enabled = false;
this.cb8.Location = new System.Drawing.Point(312, 101);
this.cb8.Name = "cb8";
this.cb8.Size = new System.Drawing.Size(77, 17);
this.cb8.TabIndex = 17;
this.cb8.Text = "8 - Iceberg";
this.cb8.UseVisualStyleBackColor = true;
this.cb8.CheckedChanged += new System.EventHandler(this.changeBadge);
//
// GB_Badges
//
@ -436,7 +442,7 @@
this.GB_Sayings.Controls.Add(this.TB_Saying1);
this.GB_Sayings.Location = new System.Drawing.Point(235, 12);
this.GB_Sayings.Name = "GB_Sayings";
this.GB_Sayings.Size = new System.Drawing.Size(175, 183);
this.GB_Sayings.Size = new System.Drawing.Size(175, 128);
this.GB_Sayings.TabIndex = 27;
this.GB_Sayings.TabStop = false;
this.GB_Sayings.Text = "Saved Sayings";
@ -444,7 +450,7 @@
// L_Saying5
//
this.L_Saying5.AutoSize = true;
this.L_Saying5.Location = new System.Drawing.Point(13, 158);
this.L_Saying5.Location = new System.Drawing.Point(13, 104);
this.L_Saying5.Name = "L_Saying5";
this.L_Saying5.Size = new System.Drawing.Size(16, 13);
this.L_Saying5.TabIndex = 9;
@ -453,7 +459,7 @@
// L_Saying4
//
this.L_Saying4.AutoSize = true;
this.L_Saying4.Location = new System.Drawing.Point(13, 124);
this.L_Saying4.Location = new System.Drawing.Point(13, 84);
this.L_Saying4.Name = "L_Saying4";
this.L_Saying4.Size = new System.Drawing.Size(16, 13);
this.L_Saying4.TabIndex = 8;
@ -462,7 +468,7 @@
// L_Saying3
//
this.L_Saying3.AutoSize = true;
this.L_Saying3.Location = new System.Drawing.Point(13, 90);
this.L_Saying3.Location = new System.Drawing.Point(13, 64);
this.L_Saying3.Name = "L_Saying3";
this.L_Saying3.Size = new System.Drawing.Size(16, 13);
this.L_Saying3.TabIndex = 7;
@ -471,7 +477,7 @@
// L_Saying2
//
this.L_Saying2.AutoSize = true;
this.L_Saying2.Location = new System.Drawing.Point(13, 56);
this.L_Saying2.Location = new System.Drawing.Point(13, 44);
this.L_Saying2.Name = "L_Saying2";
this.L_Saying2.Size = new System.Drawing.Size(16, 13);
this.L_Saying2.TabIndex = 6;
@ -480,7 +486,7 @@
// L_Saying1
//
this.L_Saying1.AutoSize = true;
this.L_Saying1.Location = new System.Drawing.Point(13, 22);
this.L_Saying1.Location = new System.Drawing.Point(13, 24);
this.L_Saying1.Name = "L_Saying1";
this.L_Saying1.Size = new System.Drawing.Size(16, 13);
this.L_Saying1.TabIndex = 5;
@ -489,7 +495,7 @@
// TB_Saying5
//
this.TB_Saying5.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.TB_Saying5.Location = new System.Drawing.Point(35, 155);
this.TB_Saying5.Location = new System.Drawing.Point(35, 101);
this.TB_Saying5.MaxLength = 16;
this.TB_Saying5.Name = "TB_Saying5";
this.TB_Saying5.Size = new System.Drawing.Size(126, 20);
@ -500,7 +506,7 @@
// TB_Saying4
//
this.TB_Saying4.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.TB_Saying4.Location = new System.Drawing.Point(35, 121);
this.TB_Saying4.Location = new System.Drawing.Point(35, 81);
this.TB_Saying4.MaxLength = 16;
this.TB_Saying4.Name = "TB_Saying4";
this.TB_Saying4.Size = new System.Drawing.Size(126, 20);
@ -511,7 +517,7 @@
// TB_Saying3
//
this.TB_Saying3.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.TB_Saying3.Location = new System.Drawing.Point(35, 87);
this.TB_Saying3.Location = new System.Drawing.Point(35, 61);
this.TB_Saying3.MaxLength = 16;
this.TB_Saying3.Name = "TB_Saying3";
this.TB_Saying3.Size = new System.Drawing.Size(126, 20);
@ -522,7 +528,7 @@
// TB_Saying2
//
this.TB_Saying2.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.TB_Saying2.Location = new System.Drawing.Point(35, 53);
this.TB_Saying2.Location = new System.Drawing.Point(35, 41);
this.TB_Saying2.MaxLength = 16;
this.TB_Saying2.Name = "TB_Saying2";
this.TB_Saying2.Size = new System.Drawing.Size(126, 20);
@ -533,7 +539,7 @@
// TB_Saying1
//
this.TB_Saying1.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.TB_Saying1.Location = new System.Drawing.Point(35, 19);
this.TB_Saying1.Location = new System.Drawing.Point(35, 21);
this.TB_Saying1.MaxLength = 16;
this.TB_Saying1.Name = "TB_Saying1";
this.TB_Saying1.Size = new System.Drawing.Size(126, 20);
@ -571,30 +577,30 @@
//
// L_Language
//
this.L_Language.AutoSize = true;
this.L_Language.Location = new System.Drawing.Point(22, 88);
this.L_Language.Location = new System.Drawing.Point(17, 88);
this.L_Language.Name = "L_Language";
this.L_Language.Size = new System.Drawing.Size(58, 13);
this.L_Language.Size = new System.Drawing.Size(80, 13);
this.L_Language.TabIndex = 21;
this.L_Language.Text = "Language:";
this.L_Language.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// L_Region
//
this.L_Region.AutoSize = true;
this.L_Region.Location = new System.Drawing.Point(22, 134);
this.L_Region.Location = new System.Drawing.Point(17, 134);
this.L_Region.Name = "L_Region";
this.L_Region.Size = new System.Drawing.Size(44, 13);
this.L_Region.Size = new System.Drawing.Size(80, 13);
this.L_Region.TabIndex = 20;
this.L_Region.Text = "Region:";
this.L_Region.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// L_Country
//
this.L_Country.AutoSize = true;
this.L_Country.Location = new System.Drawing.Point(22, 111);
this.L_Country.Location = new System.Drawing.Point(17, 111);
this.L_Country.Name = "L_Country";
this.L_Country.Size = new System.Drawing.Size(46, 13);
this.L_Country.Size = new System.Drawing.Size(80, 13);
this.L_Country.TabIndex = 19;
this.L_Country.Text = "Country:";
this.L_Country.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// CB_Region
//
@ -644,12 +650,12 @@
//
// L_3DSReg
//
this.L_3DSReg.AutoSize = true;
this.L_3DSReg.Location = new System.Drawing.Point(22, 157);
this.L_3DSReg.Location = new System.Drawing.Point(17, 157);
this.L_3DSReg.Name = "L_3DSReg";
this.L_3DSReg.Size = new System.Drawing.Size(68, 13);
this.L_3DSReg.Size = new System.Drawing.Size(80, 13);
this.L_3DSReg.TabIndex = 10;
this.L_3DSReg.Text = "3DS Region:";
this.L_3DSReg.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// CB_Game
//
@ -696,7 +702,7 @@
this.groupBox2.Controls.Add(this.TB_MBSN);
this.groupBox2.Location = new System.Drawing.Point(416, 148);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(220, 134);
this.groupBox2.Size = new System.Drawing.Size(200, 134);
this.groupBox2.TabIndex = 40;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Maison Streaks (Best)";
@ -704,7 +710,7 @@
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(159, 17);
this.label9.Location = new System.Drawing.Point(144, 17);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(35, 13);
this.label9.TabIndex = 45;
@ -767,80 +773,80 @@
// TB_MBMN
//
this.TB_MBMN.Location = new System.Drawing.Point(58, 106);
this.TB_MBMN.MaxLength = 4;
this.TB_MBMN.Name = "TB_MBMN";
this.TB_MBMN.ReadOnly = true;
this.TB_MBMN.Size = new System.Drawing.Size(59, 20);
this.TB_MBMN.TabIndex = 33;
//
// TB_MBMS
//
this.TB_MBMS.Location = new System.Drawing.Point(147, 106);
this.TB_MBMS.Location = new System.Drawing.Point(132, 106);
this.TB_MBMS.MaxLength = 4;
this.TB_MBMS.Name = "TB_MBMS";
this.TB_MBMS.ReadOnly = true;
this.TB_MBMS.Size = new System.Drawing.Size(59, 20);
this.TB_MBMS.TabIndex = 38;
//
// TB_MBRS
//
this.TB_MBRS.Location = new System.Drawing.Point(147, 87);
this.TB_MBRS.Location = new System.Drawing.Point(132, 87);
this.TB_MBRS.MaxLength = 4;
this.TB_MBRS.Name = "TB_MBRS";
this.TB_MBRS.ReadOnly = true;
this.TB_MBRS.Size = new System.Drawing.Size(59, 20);
this.TB_MBRS.TabIndex = 37;
//
// TB_MBRN
//
this.TB_MBRN.Location = new System.Drawing.Point(58, 87);
this.TB_MBRN.MaxLength = 4;
this.TB_MBRN.Name = "TB_MBRN";
this.TB_MBRN.ReadOnly = true;
this.TB_MBRN.Size = new System.Drawing.Size(59, 20);
this.TB_MBRN.TabIndex = 32;
//
// TB_MBTS
//
this.TB_MBTS.Location = new System.Drawing.Point(147, 69);
this.TB_MBTS.Location = new System.Drawing.Point(132, 69);
this.TB_MBTS.MaxLength = 4;
this.TB_MBTS.Name = "TB_MBTS";
this.TB_MBTS.ReadOnly = true;
this.TB_MBTS.Size = new System.Drawing.Size(59, 20);
this.TB_MBTS.TabIndex = 36;
//
// TB_MBTN
//
this.TB_MBTN.Location = new System.Drawing.Point(58, 69);
this.TB_MBTN.MaxLength = 4;
this.TB_MBTN.Name = "TB_MBTN";
this.TB_MBTN.ReadOnly = true;
this.TB_MBTN.Size = new System.Drawing.Size(59, 20);
this.TB_MBTN.TabIndex = 31;
//
// TB_MBDS
//
this.TB_MBDS.Location = new System.Drawing.Point(147, 50);
this.TB_MBDS.Location = new System.Drawing.Point(132, 50);
this.TB_MBDS.MaxLength = 4;
this.TB_MBDS.Name = "TB_MBDS";
this.TB_MBDS.ReadOnly = true;
this.TB_MBDS.Size = new System.Drawing.Size(59, 20);
this.TB_MBDS.TabIndex = 35;
//
// TB_MBDN
//
this.TB_MBDN.Location = new System.Drawing.Point(58, 50);
this.TB_MBDN.MaxLength = 4;
this.TB_MBDN.Name = "TB_MBDN";
this.TB_MBDN.ReadOnly = true;
this.TB_MBDN.Size = new System.Drawing.Size(59, 20);
this.TB_MBDN.TabIndex = 30;
//
// TB_MBSS
//
this.TB_MBSS.Location = new System.Drawing.Point(147, 31);
this.TB_MBSS.Location = new System.Drawing.Point(132, 31);
this.TB_MBSS.MaxLength = 4;
this.TB_MBSS.Name = "TB_MBSS";
this.TB_MBSS.ReadOnly = true;
this.TB_MBSS.Size = new System.Drawing.Size(59, 20);
this.TB_MBSS.TabIndex = 34;
//
// TB_MBSN
//
this.TB_MBSN.Location = new System.Drawing.Point(58, 31);
this.TB_MBSN.MaxLength = 4;
this.TB_MBSN.Name = "TB_MBSN";
this.TB_MBSN.ReadOnly = true;
this.TB_MBSN.Size = new System.Drawing.Size(59, 20);
this.TB_MBSN.TabIndex = 29;
//
@ -865,7 +871,7 @@
this.groupBox1.Controls.Add(this.TB_MCSN);
this.groupBox1.Location = new System.Drawing.Point(416, 12);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(220, 134);
this.groupBox1.Size = new System.Drawing.Size(200, 134);
this.groupBox1.TabIndex = 41;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Maison Streaks (Current)";
@ -873,7 +879,7 @@
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(159, 17);
this.label10.Location = new System.Drawing.Point(144, 16);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(35, 13);
this.label10.TabIndex = 45;
@ -936,112 +942,112 @@
// TB_MCMN
//
this.TB_MCMN.Location = new System.Drawing.Point(58, 106);
this.TB_MCMN.MaxLength = 4;
this.TB_MCMN.Name = "TB_MCMN";
this.TB_MCMN.ReadOnly = true;
this.TB_MCMN.Size = new System.Drawing.Size(59, 20);
this.TB_MCMN.TabIndex = 33;
//
// TB_MCMS
//
this.TB_MCMS.Location = new System.Drawing.Point(147, 106);
this.TB_MCMS.Location = new System.Drawing.Point(132, 105);
this.TB_MCMS.MaxLength = 4;
this.TB_MCMS.Name = "TB_MCMS";
this.TB_MCMS.ReadOnly = true;
this.TB_MCMS.Size = new System.Drawing.Size(59, 20);
this.TB_MCMS.TabIndex = 38;
//
// TB_MCRS
//
this.TB_MCRS.Location = new System.Drawing.Point(147, 87);
this.TB_MCRS.Location = new System.Drawing.Point(132, 86);
this.TB_MCRS.MaxLength = 4;
this.TB_MCRS.Name = "TB_MCRS";
this.TB_MCRS.ReadOnly = true;
this.TB_MCRS.Size = new System.Drawing.Size(59, 20);
this.TB_MCRS.TabIndex = 37;
//
// TB_MCRN
//
this.TB_MCRN.Location = new System.Drawing.Point(58, 87);
this.TB_MCRN.MaxLength = 4;
this.TB_MCRN.Name = "TB_MCRN";
this.TB_MCRN.ReadOnly = true;
this.TB_MCRN.Size = new System.Drawing.Size(59, 20);
this.TB_MCRN.TabIndex = 32;
//
// TB_MCTS
//
this.TB_MCTS.Location = new System.Drawing.Point(147, 69);
this.TB_MCTS.Location = new System.Drawing.Point(132, 68);
this.TB_MCTS.MaxLength = 4;
this.TB_MCTS.Name = "TB_MCTS";
this.TB_MCTS.ReadOnly = true;
this.TB_MCTS.Size = new System.Drawing.Size(59, 20);
this.TB_MCTS.TabIndex = 36;
//
// TB_MCTN
//
this.TB_MCTN.Location = new System.Drawing.Point(58, 69);
this.TB_MCTN.MaxLength = 4;
this.TB_MCTN.Name = "TB_MCTN";
this.TB_MCTN.ReadOnly = true;
this.TB_MCTN.Size = new System.Drawing.Size(59, 20);
this.TB_MCTN.TabIndex = 31;
//
// TB_MCDS
//
this.TB_MCDS.Location = new System.Drawing.Point(147, 50);
this.TB_MCDS.Location = new System.Drawing.Point(132, 49);
this.TB_MCDS.MaxLength = 4;
this.TB_MCDS.Name = "TB_MCDS";
this.TB_MCDS.ReadOnly = true;
this.TB_MCDS.Size = new System.Drawing.Size(59, 20);
this.TB_MCDS.TabIndex = 35;
//
// TB_MCDN
//
this.TB_MCDN.Location = new System.Drawing.Point(58, 50);
this.TB_MCDN.MaxLength = 4;
this.TB_MCDN.Name = "TB_MCDN";
this.TB_MCDN.ReadOnly = true;
this.TB_MCDN.Size = new System.Drawing.Size(59, 20);
this.TB_MCDN.TabIndex = 30;
//
// TB_MCSS
//
this.TB_MCSS.Location = new System.Drawing.Point(147, 31);
this.TB_MCSS.Location = new System.Drawing.Point(132, 30);
this.TB_MCSS.MaxLength = 4;
this.TB_MCSS.Name = "TB_MCSS";
this.TB_MCSS.ReadOnly = true;
this.TB_MCSS.Size = new System.Drawing.Size(59, 20);
this.TB_MCSS.TabIndex = 34;
//
// TB_MCSN
//
this.TB_MCSN.Location = new System.Drawing.Point(58, 31);
this.TB_MCSN.MaxLength = 4;
this.TB_MCSN.Name = "TB_MCSN";
this.TB_MCSN.ReadOnly = true;
this.TB_MCSN.Size = new System.Drawing.Size(59, 20);
this.TB_MCSN.TabIndex = 29;
//
// TB_CoordZ
//
this.TB_CoordZ.Location = new System.Drawing.Point(500, 286);
this.TB_CoordZ.MaxLength = 6;
this.TB_CoordZ.Name = "TB_CoordZ";
this.TB_CoordZ.ReadOnly = true;
this.TB_CoordZ.Size = new System.Drawing.Size(46, 20);
this.TB_CoordZ.TabIndex = 42;
//
// TB_CoordY
//
this.TB_CoordY.Location = new System.Drawing.Point(500, 310);
this.TB_CoordY.MaxLength = 6;
this.TB_CoordY.Name = "TB_CoordY";
this.TB_CoordY.ReadOnly = true;
this.TB_CoordY.Size = new System.Drawing.Size(46, 20);
this.TB_CoordY.TabIndex = 43;
//
// TB_CoordX
//
this.TB_CoordX.Location = new System.Drawing.Point(436, 310);
this.TB_CoordX.MaxLength = 6;
this.TB_CoordX.Name = "TB_CoordX";
this.TB_CoordX.ReadOnly = true;
this.TB_CoordX.Size = new System.Drawing.Size(46, 20);
this.TB_CoordX.TabIndex = 45;
//
// TB_CoordM
//
this.TB_CoordM.Location = new System.Drawing.Point(436, 286);
this.TB_CoordM.MaxLength = 4;
this.TB_CoordM.Name = "TB_CoordM";
this.TB_CoordM.ReadOnly = true;
this.TB_CoordM.Size = new System.Drawing.Size(46, 20);
this.TB_CoordM.TabIndex = 44;
//
@ -1081,11 +1087,65 @@
this.label20.TabIndex = 48;
this.label20.Text = "Z";
//
// GB_Currency
//
this.GB_Currency.Controls.Add(this.TB_BP);
this.GB_Currency.Controls.Add(this.TB_PM);
this.GB_Currency.Controls.Add(this.L_BP);
this.GB_Currency.Controls.Add(this.L_PM);
this.GB_Currency.Location = new System.Drawing.Point(235, 139);
this.GB_Currency.Name = "GB_Currency";
this.GB_Currency.Size = new System.Drawing.Size(175, 56);
this.GB_Currency.TabIndex = 50;
this.GB_Currency.TabStop = false;
this.GB_Currency.Text = "Currency";
//
// TB_BP
//
this.TB_BP.Location = new System.Drawing.Point(96, 32);
this.TB_BP.Mask = "0000";
this.TB_BP.Name = "TB_BP";
this.TB_BP.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
this.TB_BP.Size = new System.Drawing.Size(37, 20);
this.TB_BP.TabIndex = 6;
this.TB_BP.Text = "1234";
this.TB_BP.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// TB_PM
//
this.TB_PM.Location = new System.Drawing.Point(96, 12);
this.TB_PM.Mask = "0000000";
this.TB_PM.Name = "TB_PM";
this.TB_PM.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
this.TB_PM.Size = new System.Drawing.Size(56, 20);
this.TB_PM.TabIndex = 5;
this.TB_PM.Text = "1234567";
this.TB_PM.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// L_BP
//
this.L_BP.Location = new System.Drawing.Point(9, 35);
this.L_BP.Name = "L_BP";
this.L_BP.Size = new System.Drawing.Size(80, 13);
this.L_BP.TabIndex = 1;
this.L_BP.Text = "BP:";
this.L_BP.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// L_PM
//
this.L_PM.Location = new System.Drawing.Point(9, 15);
this.L_PM.Name = "L_PM";
this.L_PM.Size = new System.Drawing.Size(80, 13);
this.L_PM.TabIndex = 0;
this.L_PM.Text = "PokeMiles:";
this.L_PM.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// SAV_Trainer
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(644, 337);
this.ClientSize = new System.Drawing.Size(624, 337);
this.Controls.Add(this.GB_Currency);
this.Controls.Add(this.label19);
this.Controls.Add(this.label20);
this.Controls.Add(this.label18);
@ -1126,6 +1186,8 @@
this.groupBox2.PerformLayout();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.GB_Currency.ResumeLayout(false);
this.GB_Currency.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
@ -1227,5 +1289,10 @@
private System.Windows.Forms.Label label18;
private System.Windows.Forms.Label label19;
private System.Windows.Forms.Label label20;
private System.Windows.Forms.GroupBox GB_Currency;
private System.Windows.Forms.MaskedTextBox TB_BP;
private System.Windows.Forms.MaskedTextBox TB_PM;
private System.Windows.Forms.Label L_BP;
private System.Windows.Forms.Label L_PM;
}
}

View file

@ -20,14 +20,15 @@ namespace PKHeX
Array.Copy(m_parent.savefile, sav, 0x100000);
savindex = m_parent.savindex;
getComboBoxes();
getBadges();
getTextBoxes();
getBadges();
}
string Game;
Form1 m_parent;
public byte[] sav = new Byte[0x100000];
public int savindex;
public bool editing = false;
public byte badgeval = 0;
public ToolTip Tip1 = new ToolTip();
public ToolTip Tip2 = new ToolTip();
@ -35,7 +36,11 @@ namespace PKHeX
{
if (String.IsNullOrEmpty(value))
return 0;
return UInt32.Parse(value);
try
{
return UInt32.Parse(value);
}
catch { return 0; }
}
private void getComboBoxes()
{
@ -186,30 +191,29 @@ namespace PKHeX
CheckBox[] cba = {cb1, cb2, cb3, cb4, cb5, cb6, cb7, cb8,};
PictureBox[] pba = {pb1, pb2, pb3, pb4, pb5, pb6, pb7, pb8,};
byte badgeval = sav[0x960C + savindex * 0x7F000];
for (int i = 0; i < 8; i++)
{
if ((badgeval & (1 << i)) == 0)
if (!cba[i].Checked)
{
pba[i].Image = ImageTransparency.ChangeOpacity(bma[i], 0.1);
cba[i].Checked = false;
}
else
{
pba[i].Image = ImageTransparency.ChangeOpacity(bma[i], 1);
cba[i].Checked = true;
}
}
}
private void getTextBoxes()
{
int savshift = savindex * 0x7F000;
byte badgeval = sav[0x960C + savindex * 0x7F000];
CheckBox[] cba = { cb1, cb2, cb3, cb4, cb5, cb6, cb7, cb8, };
for (int i = 0; i < 8; i++)
cba[i].Checked = !((badgeval & (1 << i)) == 0);
// Get Data
string OT_NAME = Encoding.Unicode.GetString(sav, 0x19448 + savshift, 0x1A);
string RIV_NAME = Encoding.Unicode.GetString(sav, 0x9610 + savshift, 0x1A);
CB_Game.SelectedIndex = sav[0x19404 + savshift]-0x18;
CB_Gender.SelectedIndex = sav[0x19405 + savshift];
@ -284,6 +288,10 @@ namespace PKHeX
TB_CoordX.Text = BitConverter.ToSingle(sav, savshift + 0x6810).ToString("0.0");
TB_CoordZ.Text = BitConverter.ToSingle(sav, savshift + 0x6814).ToString("0.0");
TB_CoordY.Text = BitConverter.ToSingle(sav, savshift + 0x6818).ToString("0.0");
// Load BP and PokeMiles
TB_BP.Text = BitConverter.ToUInt32(sav, savshift + 0x963C).ToString();
TB_PM.Text = BitConverter.ToUInt32(sav, savshift + 0x238FC).ToString();
}
private void save()
{
@ -340,6 +348,41 @@ namespace PKHeX
byte[] s5 = Encoding.Unicode.GetBytes(saying5);
Array.Resize(ref s5, 0x22);
Array.Copy(s5, 0, sav, 0x19504 + savshift, 0x22);
// New stuff.
// Copy Maison Data in
TextBox[] tba = new TextBox[] {
TB_MCSN,TB_MCSS,TB_MBSN,TB_MBSS,
TB_MCDN,TB_MCDS,TB_MBDN,TB_MBDS,
TB_MCTN,TB_MCTS,TB_MBTN,TB_MBTS,
TB_MCRN,TB_MCRS,TB_MBRN,TB_MBRS,
TB_MCMN,TB_MCMS,TB_MBMN,TB_MBMS,
};
for (int i = 0; i < tba.Length; i++)
{
byte[] streak = BitConverter.GetBytes(ToUInt32(tba[i].Text));
Array.Resize(ref streak, 2);
Array.Copy(streak, 0, sav, 0x205C0 + 2 * i + savshift, 2);
}
// Copy Position
byte[] m = BitConverter.GetBytes( Int16.Parse(TB_CoordM.Text)); Array.Resize(ref m, 2); Array.Copy(m,0,sav, savshift + 0x6802,2);
byte[] x = BitConverter.GetBytes(Single.Parse(TB_CoordX.Text)); Array.Resize(ref x, 4); Array.Copy(x,0,sav, savshift + 0x6810,4);
byte[] z = BitConverter.GetBytes(Single.Parse(TB_CoordZ.Text)); Array.Resize(ref z, 4); Array.Copy(z,0,sav, savshift + 0x6814,4);
byte[] y = BitConverter.GetBytes(Single.Parse(TB_CoordY.Text)); Array.Resize(ref y, 4); Array.Copy(y,0,sav, savshift + 0x6818,4);
TB_BP.Text = BitConverter.ToUInt32(sav, savshift + 0x963C).ToString();
TB_PM.Text = BitConverter.ToUInt32(sav, savshift + 0x238FC).ToString();
byte[] bp = BitConverter.GetBytes(ToUInt32(TB_BP.Text)); Array.Resize(ref bp, 2); Array.Copy(bp, 0, sav, savshift + 0x963C, 2);
byte[] pm = BitConverter.GetBytes(ToUInt32(TB_PM.Text)); Array.Resize(ref pm, 4); Array.Copy(pm, 0, sav, savshift + 0x238FC, 4); Array.Copy(pm, 0, sav, savshift + 0x23900, 4);
// Copy Badges
badgeval = 0;
CheckBox[] cba = { cb1, cb2, cb3, cb4, cb5, cb6, cb7, cb8, };
for (int i = 0; i < 8; i++)
{
badgeval |= (byte)(Convert.ToByte(cba[i].Checked) << i);
}
sav[0x960C + savindex * 0x7F000] = badgeval;
}
private void showTSV(object sender, EventArgs e)
@ -367,6 +410,11 @@ namespace PKHeX
MT_Money.Text = "9,999,999";
}
private void changeBadge(object sender, EventArgs e)
{
getBadges();
}
}

View file

@ -198,51 +198,9 @@
<metadata name="pb1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="GB_Sayings.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="L_Saying5.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="L_Saying4.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="L_Saying3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="L_Saying2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="L_Saying1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_Saying5.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_Saying4.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_Saying3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_Saying2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_Saying1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="GB_Overview.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="L_Language.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="L_Region.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="L_Country.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CB_Region.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@ -258,9 +216,6 @@
<metadata name="CB_Language.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="L_3DSReg.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CB_Game.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@ -270,9 +225,6 @@
<metadata name="groupBox2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label9.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label8.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@ -294,39 +246,21 @@
<metadata name="TB_MBMN.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_MBMS.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_MBRS.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_MBRN.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_MBTS.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_MBTN.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_MBDS.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_MBDN.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_MBSS.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_MBSN.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="groupBox1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label10.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label11.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@ -348,30 +282,15 @@
<metadata name="TB_MCMN.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_MCMS.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_MCRS.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_MCRN.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_MCTS.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_MCTN.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_MCDS.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_MCDN.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_MCSS.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TB_MCSN.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>

28
f1-Main.Designer.cs generated
View file

@ -29,6 +29,7 @@
public void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
this.tabMain = new System.Windows.Forms.TabControl();
this.Tab_Main = new System.Windows.Forms.TabPage();
@ -213,8 +214,8 @@
this.Menu_Tools = new System.Windows.Forms.ToolStripMenuItem();
this.Menu_OpenBoxUI = 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();
this.codeGeneratorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.Menu_Options = new System.Windows.Forms.ToolStripMenuItem();
this.Menu_Language = new System.Windows.Forms.ToolStripMenuItem();
this.CB_MainLanguage = new System.Windows.Forms.ToolStripComboBox();
@ -321,6 +322,7 @@
this.B_OpenPokedex = new System.Windows.Forms.Button();
this.GB_SAVtools = new System.Windows.Forms.GroupBox();
this.L_SAVINDEX = new System.Windows.Forms.Label();
this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
this.tabMain.SuspendLayout();
this.Tab_Main.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.Label_IsShiny)).BeginInit();
@ -2560,13 +2562,6 @@
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(182, 22);
this.codeGeneratorToolStripMenuItem.Text = "Code Generator";
this.codeGeneratorToolStripMenuItem.Click += new System.EventHandler(this.codeGeneratorToolStripMenuItem_Click);
//
// reportToolStripMenuItem
//
this.reportToolStripMenuItem.Name = "reportToolStripMenuItem";
@ -2574,6 +2569,13 @@
this.reportToolStripMenuItem.Text = "Box Data Report";
this.reportToolStripMenuItem.Click += new System.EventHandler(this.reportToolStripMenuItem_Click);
//
// codeGeneratorToolStripMenuItem
//
this.codeGeneratorToolStripMenuItem.Name = "codeGeneratorToolStripMenuItem";
this.codeGeneratorToolStripMenuItem.Size = new System.Drawing.Size(182, 22);
this.codeGeneratorToolStripMenuItem.Text = "Code Generator";
this.codeGeneratorToolStripMenuItem.Click += new System.EventHandler(this.codeGeneratorToolStripMenuItem_Click);
//
// Menu_Options
//
this.Menu_Options.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -3123,11 +3125,11 @@
// L_ReadOnlyPBB
//
this.L_ReadOnlyPBB.ForeColor = System.Drawing.Color.Red;
this.L_ReadOnlyPBB.Location = new System.Drawing.Point(3, 93);
this.L_ReadOnlyPBB.Location = new System.Drawing.Point(3, 173);
this.L_ReadOnlyPBB.Name = "L_ReadOnlyPBB";
this.L_ReadOnlyPBB.Size = new System.Drawing.Size(250, 13);
this.L_ReadOnlyPBB.TabIndex = 15;
this.L_ReadOnlyPBB.Text = "This tab is read only.";
this.L_ReadOnlyPBB.Text = "This is read only.";
this.L_ReadOnlyPBB.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// L_BattleBox
@ -3788,6 +3790,11 @@
this.L_SAVINDEX.TabIndex = 16;
this.L_SAVINDEX.Text = "0";
//
// notifyIcon1
//
this.notifyIcon1.Text = "notifyIcon1";
this.notifyIcon1.Visible = true;
//
// Form1
//
this.AllowDrop = true;
@ -4206,6 +4213,7 @@
private System.Windows.Forms.TextBox TB_PP1;
private System.Windows.Forms.ToolStripMenuItem codeGeneratorToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem reportToolStripMenuItem;
private System.Windows.Forms.NotifyIcon notifyIcon1;
}
}

View file

@ -83,6 +83,8 @@ namespace PKHeX
bpkx13,bpkx14,bpkx15,bpkx16,bpkx17,bpkx18,
bpkx19,bpkx20,bpkx21,bpkx22,bpkx23,bpkx24,
bpkx25,bpkx26,bpkx27,bpkx28,bpkx29,bpkx30,
ppkx1, ppkx2, ppkx3, ppkx4, ppkx5, ppkx6,
};
ContextMenuStrip mnu = new ContextMenuStrip();
ToolStripMenuItem mnuView = new ToolStripMenuItem("View");
@ -101,7 +103,6 @@ namespace PKHeX
}
// Add ContextMenus to the PictureBoxes that are read only
PictureBox[] pba2 = {
ppkx1, ppkx2, ppkx3, ppkx4, ppkx5, ppkx6,
bbpkx1,bbpkx2,bbpkx3,bbpkx4,bbpkx5,bbpkx6,
dcpkx1, dcpkx2, gtspkx, fusedpkx,subepkx1,subepkx2,subepkx3,
@ -166,6 +167,8 @@ namespace PKHeX
#region Global Variables: Always Visible!
public byte[] buff = new Byte[260];
public byte[] savefile = new Byte[0x100000];
public byte[] cyberSAV = new Byte[0x65600];
public bool cybergadget = false;
public int gt = 258;
public int genderflag, species;
public int savindex;
@ -6025,7 +6028,7 @@ namespace PKHeX
// Main Menu Subfunctions //
private void openfile(byte[] input, string path, string ext)
{
// Trade Packets
if ((input.Length == 363) && (input[0x6B] == 0) && (input[0x6C] == 00))
{
// EAD Packet of 363 length
@ -6040,7 +6043,42 @@ namespace PKHeX
Array.Copy(input, 0x93, c, 0, 260);
input = c;
}
else if ((input.Length == 0x65600) && BitConverter.ToUInt32(input,0x65410) == 0x42454546)
{
// Load CyberGadget
this.savindex = 0;
this.savefile = new Byte[0x100000];
this.cyberSAV = input;
cybergadget = true;
B_ExportSAV.Enabled = true;
Array.Copy(input, 0, savefile, 0x5400, input.Length);
SaveGame = new SaveGames.SaveStruct("XY");
GB_SAVtools.Enabled =
B_JPEG.Enabled =
B_BoxIO.Enabled =
B_OUTPasserby.Enabled =
B_VerifyCHK.Enabled =
B_OUTHallofFame.Enabled = true;
B_VerifySHA.Enabled = false;
reportToolStripMenuItem.Enabled = true;
B_SwitchSAV.Enabled = false;
tabBoxMulti.Enabled = true;
C_BoxSelect.SelectedIndex = 0;
tabBoxMulti.SelectedIndex = 0;
L_Save.Text = "SAV: " + Path.GetFileName(path);
getBoxNames(); // Display the Box Names
getPKXBoxes(); // Reload all of the PKX Windows
getSAVLabel(); // Reload the label indicating current save
if (Width < Height) // SAV Interface Not Open
{
int newwidth = (this.Width * (54000 / 260)) / 100 + 2;
this.Width = newwidth;
}
return;
}
// Verify the Data Input Size is Proper
#region SAVE FILE LOADING
if (input.Length == 0x100000)
@ -6185,7 +6223,7 @@ namespace PKHeX
C_BoxSelect.SelectedIndex = 0;
tabBoxMulti.SelectedIndex = 0;
getBoxNames(); // Display the Box Names
getBoxNames(); // Display the Box Names
getPKXBoxes(); // Reload all of the PKX Windows
getSAVLabel(); // Reload the label indicating current save
@ -6304,7 +6342,8 @@ namespace PKHeX
}
public byte[] decryptArray(byte[] ekx)
{
byte[] pkx = ekx;
byte[] pkx = new Byte[0x104];
Array.Copy(ekx,pkx,ekx.Length);
uint pv = BitConverter.ToUInt32(pkx, 0);
uint sv = (((pv & 0x3E000) >> 0xD) % 24);
@ -6680,9 +6719,7 @@ namespace PKHeX
Array.Copy(BitConverter.GetBytes(0), 0, pkx, 0x4, 4); // 0 CHK for now
//
// Block A
//
Array.Copy(BitConverter.GetBytes(getSpecies()), 0, pkx, 0x08, 2); // Species
Array.Copy(BitConverter.GetBytes(getIndex(CB_HeldItem)), 0, pkx, 0x0A, 2); // Held Item
Array.Copy(BitConverter.GetBytes(ToUInt32(TB_TID.Text)), 0, pkx, 0x0C, 2); // TID
@ -6731,29 +6768,23 @@ namespace PKHeX
// 0x3A, 0x3B
// 0x3C, 0x3D, 0x3E, 0x3F
//
// Block B
//
// Block B
// Convert Nickname field back to bytes
string nicknamestr = TB_Nickname.Text;
if (!CHK_Nicknamed.Checked) // get the correct private use gender sign
{
if (nicknamestr.Contains((char)0x2640))
{
nicknamestr = Regex.Replace(nicknamestr, "\u2640", "\uE08F");
}
else if (nicknamestr.Contains((char)0x2642))
{
nicknamestr = Regex.Replace(nicknamestr, "\u2642", "\uE08E");
}
}
byte[] nicknamebytes = Encoding.Unicode.GetBytes(nicknamestr);
Array.Resize(ref nicknamebytes, 24);
Array.Copy(nicknamebytes, 0, pkx, 0x40, nicknamebytes.Length);
// 0x58, 0x59
// 0x58, 0x59 unused
Array.Copy(BitConverter.GetBytes(getIndex(CB_Move1)), 0, pkx, 0x5A, 2); // Move 1
Array.Copy(BitConverter.GetBytes(getIndex(CB_Move2)), 0, pkx, 0x5C, 2); // Move 2
Array.Copy(BitConverter.GetBytes(getIndex(CB_Move3)), 0, pkx, 0x5E, 2); // Move 3
@ -6764,7 +6795,7 @@ namespace PKHeX
pkx[0x64] = (byte)(ToInt32(TB_PP3.Text) & 0xFF);
pkx[0x65] = (byte)(ToInt32(TB_PP4.Text) & 0xFF);
pkx[0x66] = (byte)(CB_PPu1.SelectedIndex); // PP Ups
pkx[0x66] = (byte)(CB_PPu1.SelectedIndex); // PP Ups
pkx[0x67] = (byte)(CB_PPu2.SelectedIndex);
pkx[0x68] = (byte)(CB_PPu3.SelectedIndex);
pkx[0x69] = (byte)(CB_PPu4.SelectedIndex);
@ -6791,10 +6822,8 @@ namespace PKHeX
pkx[0x76] = (byte)((IV32 >> 16) & 0xFF);
pkx[0x77] = (byte)((IV32 >> 24) & 0xFF);
//
// Block C
//
// Block C
// Convert OTT2 field back to bytes
byte[] OT2 = Encoding.Unicode.GetBytes(TB_OTt2.Text);
Array.Resize(ref OT2, 24);
@ -6804,23 +6833,17 @@ namespace PKHeX
pkx[0x92] = Convert.ToByte(Label_CTGender.Text == "♀");
//Plus more, set by MemoryAmie (already in buff)
//
// Block D
//
// Block D
// Convert OT field back to bytes
byte[] OT = Encoding.Unicode.GetBytes(TB_OT.Text);
Array.Resize(ref OT, 24);
Array.Copy(OT, 0, pkx, 0xB0, OT.Length);
if (pkx[0x93] == 0)
{
pkx[0xCA] = (byte)(ToInt32(TB_Friendship.Text) & 0xFF);
}
else //1
{
else // 1
pkx[0xA2] = (byte)(ToInt32(TB_Friendship.Text) & 0xFF);
}
int egg_year = 2000; // Dates
int egg_month = 0;
@ -7596,6 +7619,37 @@ namespace PKHeX
// File Integrity has been restored as well as it can. Export!
// Write the active save index
editedsav[0x168] = (byte)(savindex^1);
// If CyberGadget
if (BitConverter.ToUInt32(editedsav, 0x100) != 0x41534944)
{
byte[] cybersav = new Byte[0x65600];
Array.Copy(editedsav, 0x5400, cybersav, 0, 0x65600);
SaveFileDialog cySAV = new SaveFileDialog();
cySAV.Filter = "Cyber SAV|*.*";
cySAV.FileName = Regex.Split(L_Save.Text, ": ")[1];
DialogResult sdr = cySAV.ShowDialog();
if (sdr == DialogResult.OK)
{
string path = cySAV.FileName;
string ext = Path.GetExtension(path);
if (File.Exists(path))
{
// File already exists, save a .bak
byte[] backupfile = File.ReadAllBytes(path);
File.WriteAllBytes(path + ".bak", backupfile);
}
File.WriteAllBytes(path, cybersav);
MessageBox.Show("Saved Cyber SAV.", "Alert");
}
return;
}
// Save Save File
SaveFileDialog savesav = new SaveFileDialog();
savesav.Filter = "SAV|*.bin;*.sav";
@ -7697,21 +7751,75 @@ namespace PKHeX
if (!verifiedpkx()) { return; }
int slot = getSlot(sender);
int offset = SaveGame.Box + 0x7F000 * savindex + C_BoxSelect.SelectedIndex * (0xE8 * 30) + slot * 0xE8;
byte[] pkxdata = preparepkx(buff);
byte[] ekxdata = encryptArray(pkxdata);
Array.Copy(ekxdata, 0, savefile, offset, 0xE8);
if (slot >= 30 && slot < 36) // Party
{
if (slot == 30 && CB_Species.SelectedIndex == 0) { MessageBox.Show("Can't have empty first slot.", "Alert"); return; }
offset = SaveGame.Party + 0x7F000 * savindex + (slot - 30) * (0x104);
byte[] pkxdata = preparepkx(buff);
byte[] ekxdata = encryptArray(pkxdata);
Array.Copy(ekxdata, 0, savefile, offset, 0x104);
fixparty();
}
else
{
byte[] pkxdata = preparepkx(buff);
byte[] ekxdata = encryptArray(pkxdata);
Array.Copy(ekxdata, 0, savefile, offset, 0xE8);
}
getPKXBoxes();
savedited = true;
getSlotColor(slot, Color.Honeydew);
}
private void fixparty()
{
byte partymembers = 0;
int offset = SaveGame.Party + 0x7F000 * savindex;
for (int i = 0; i < 6; i++)
{
// Gather all the species
byte[] data = new Byte[0x104];
Array.Copy(savefile, offset + i * 0x104, data, 0, 0x104);
byte[] decdata = decryptArray(data);
int species = BitConverter.ToInt16(decdata,8);
if ((species != 0) && (species < 722))
{
partymembers++; // Copy in our party member
Array.Copy(data, 0, savefile, offset + (partymembers-1) * 0x104, 0x104);
}
}
// Write in the current party count
savefile[0x19C18 + savindex * 0x7F000] = partymembers;
// Zero out the party slots that are empty.
for (int i = 0; i < 6; i++)
{
if (i >= partymembers)
{
Array.Copy(encryptArray(new Byte[0x104]), 0, savefile, offset + (i * 0x104), 0x104);
}
}
}
private void rcmDelete_Click(object sender, EventArgs e)
{
int slot = getSlot(sender);
int offset = SaveGame.Box + 0x7F000 * savindex + C_BoxSelect.SelectedIndex * (0xE8 * 30) + slot * 0xE8;
byte[] pkxdata = new Byte[0xE8];
byte[] ekxdata = encryptArray(pkxdata);
Array.Copy(ekxdata, 0, savefile, offset, 0xE8);
if (slot >= 30 && slot < 36) // Party
{
if (slot == 30) { MessageBox.Show("Can't delete first slot.", "Alert"); return; }
offset = SaveGame.Party + 0x7F000 * savindex + (slot - 30) * (0x104);
byte[] pkxdata = new Byte[0x104];
byte[] ekxdata = encryptArray(pkxdata);
Array.Copy(ekxdata, 0, savefile, offset, 0x104);
fixparty();
}
else
{
byte[] pkxdata = new Byte[0xE8];
byte[] ekxdata = encryptArray(pkxdata);
Array.Copy(ekxdata, 0, savefile, offset, 0xE8);
}
getPKXBoxes();
savedited = true;

View file

@ -813,6 +813,9 @@
<metadata name="L_SAVINDEX.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="notifyIcon1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>328, 19</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>

View file

@ -152,7 +152,7 @@ namespace PKHeX
Array.Copy(SaveData, offset, slotdata, 0, 0xE8);
byte[] dslotdata = decryptArray(slotdata);
PKX pkm = new PKX(dslotdata);
if ((pkm.EC == "00000000") && (pkm.Checksum == 0)) continue;
if ((pkm.EC == "00000000") && (pkm.Species == "---")) continue;
PL.Add(pkm);
}
}
@ -170,6 +170,7 @@ namespace PKHeX
public class PKX
{
#region Define
private Image pksprite;
private uint mEC, mPID, mIV32,
mexp,
@ -205,6 +206,7 @@ namespace PKHeX
mgamevers, mcountryID, mregionID, mdsregID, motlang;
#endregion
public Image pkimg { get { return pksprite; } }
public string Nickname { get { return mnicknamestr; } }
public string Species { get { return mSpeciesName; } }
public string Nature { get { return mNatureName; } }
@ -419,6 +421,33 @@ namespace PKHeX
mnicknamestr = Regex.Replace(mnicknamestr, "\uE08E", "\u2642");
}
}
{
int species = BitConverter.ToInt16(pkx, 0x08); // Get Species
uint isegg = (BitConverter.ToUInt32(pkx, 0x74) >> 30) & 1;
int altforms = (pkx[0x1D] >> 3);
int gender = (pkx[0x1D] >> 1) & 0x3;
string file;
if (isegg == 1)
{ file = "egg"; }
else
{
file = "_" + species.ToString();
if (altforms > 0) // Alt Form Handling
{
file = file + "_" + altforms.ToString();
}
else if ((species == 521) && (gender == 1)) // Unfezant
{
file = file = "_" + species.ToString() + "f";
}
}
if (species == 0)
file = "_0";
pksprite = (Image)Properties.Resources.ResourceManager.GetObject(file);
}
try
{
mSpeciesName = m_parent.specieslist[mspecies];