From 203271fa8073c90511db2f90efee4b98fde03bab Mon Sep 17 00:00:00 2001 From: Kurt Date: Sun, 14 Dec 2014 11:06:17 -0800 Subject: [PATCH] Continued cleanup --- Misc/Legal.cs | 141 +++++++++++++++++++++++++++---- PKX/f1-Main.Designer.cs | 44 +++++----- PKX/f1-Main.cs | 152 +++++++++++++++++----------------- SAV/SAV_Inventory.Designer.cs | 5 ++ SAV/SAV_Inventory.cs | 135 ++++-------------------------- 5 files changed, 242 insertions(+), 235 deletions(-) diff --git a/Misc/Legal.cs b/Misc/Legal.cs index 2fc1bd544..41ae92c58 100644 --- a/Misc/Legal.cs +++ b/Misc/Legal.cs @@ -8,28 +8,31 @@ namespace PKHeX class Legal { // PKHeX Valid Array Storage + #region Items internal static readonly int[] Items_Held = { - 000,001,002,003,004,005,006,007,008,009,010,011,012,013,014,015,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,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,134,135,136,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,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,504,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,565,566,567,568,569,570,571,572,573,577,580,581,582,583,584,585,586,587,588,589,590,591,639,640,644,645,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,686,687,688,699,704,708,709,710,711,715, + 000,001,002,003,004,005,006,007,008,009,010,011,012,013,014,015,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,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,134,135,136,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,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,504,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,565,566,567,568,569,570,571,572,573,577,580,581,582,583,584,585,586,587,588,589,590,591,639,640,644,645,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,686,687,688,699,704,708,709,710,711,715, - // Appended ORAS Items (Orbs & Mega Stones) - 534,535, - 752,753,754,755,756,757,758,759,760,761,762,763,764,767,768,769,770, - }; + // Appended ORAS Items (Orbs & Mega Stones) + 534,535, + 752,753,754,755,756,757,758,759,760,761,762,763,764,767,768,769,770, + }; internal static readonly int[] Items_Ball = { 4, 3, 2, 7, 576, 13, 492, 497, 14, 495, 493, 496, 494, 11, 498, 8, 6, 12, 15, 9, 5, 499, 10, 1, 16 }; internal static readonly int[] Items_CommonBall = { 4, 3, 2 }; internal static readonly int[] Items_UncommonBall = { 7, 576, 13, 492, 497, 14, 495, 493, 496, 494, 11, 498, 8, 6, 12, 15, 9, 5, 499, 10, 1, 16 }; + #endregion internal static readonly int[] Gen4EncounterTypes = { 0, 2, 4, 9, 10, 24 }; + #region Games internal static readonly int[] Games_6xy = { 24, 25 }; internal static readonly int[] Games_6oras = { 26, 27 }; internal static readonly int[] Games_5 = { 20, 21, 22, 23 }; @@ -40,6 +43,8 @@ namespace PKHeX internal static readonly int[] Games_3e = { 3 }; internal static readonly int[] Games_3r = { 4, 5 }; internal static readonly int[] Games_3s = { 15 }; + #endregion + #region Met Locations internal static readonly int[] Met_BW2c = { 0, 60002, 30003 }; internal static readonly int[] Met_BW2_0 = { 1,2,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153, }; internal static readonly int[] Met_BW2_3 = { 30001,30002,30004,30005,30006,30007,30008,30010,30011,30012,30013,30014,30015, }; @@ -53,5 +58,109 @@ namespace PKHeX internal static readonly int[] Met_HGSS_0 = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,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,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,}; internal static readonly int[] Met_HGSS_2 = {2000,2001,2002,2003,2004,2005,2006,2008,2009,2010,2011,2012,2013,2014,}; internal static readonly int[] Met_HGSS_3 = {3000,3001,3002,3003,3004,3005,3006,3007,3008,3009,3010,3011,3012,3013,3014,3015,3016,3017,3018,3019,3020,3021,3022,3023,3024,3025,3026,3027,3028,3029,3030,3031,3032,3033,3034,3035,3036,3037,3038,3039,3040,3041,3042,3043,3044,3045,3046,3047,3048,3049,3050,3051,3052,3053,3054,3055,3056,3057,3058,3059,3060,3061,3062,3063,3064,3065,3066,3067,3068,3069,3070,3071,3072,3073,3074,3075,3076}; + #endregion + #region Inventory Pouch + internal static readonly ushort[] Pouch_Items_XY = { + 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, + }; + internal static readonly ushort[] Pouch_Items_ORAS = { + 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, + + // ORAS + 534,535, + 752,753,754,755,756,757,758,759,760,761,762,763,764,767,768,769,770, + }; + internal static readonly ushort[] Pouch_Key_XY = { + 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, + + // Illegal + 716,717, // For the cheaters who want useless items... + }; + internal static readonly ushort[] Pouch_Key_ORAS = { + 000,216, 445,446,447, 465,466,471,628, + 629,631,632,638, 697, + + // Illegal + 716,717,745,746,747,748,749,750, // For the cheaters who want useless items... + + // ORAS + 457,474,503, + + 718,719, + 720,721,722,723,724,725,726,727,728,729, + 730,731,732,733,734,735,736, 738,739, + 740,741,742,743,744, + 751,765,766,771,772,774,775, + }; + internal static readonly ushort[] Pouch_TMHM_XY = { + 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, + }; + internal static readonly ushort[] Pouch_TMHM_ORAS = { + 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, + + // ORAS + 425,737, + }; + internal static readonly ushort[] Pouch_Medicine_XY = { + 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, + }; + internal static readonly ushort[] Pouch_Berry_XY = { + 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, + }; + #endregion } } diff --git a/PKX/f1-Main.Designer.cs b/PKX/f1-Main.Designer.cs index 21826484f..d99e34ca0 100644 --- a/PKX/f1-Main.Designer.cs +++ b/PKX/f1-Main.Designer.cs @@ -559,7 +559,7 @@ this.Label_Gender.TabIndex = 55; this.Label_Gender.Text = "-"; this.Label_Gender.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.Label_Gender.Click += new System.EventHandler(this.Label_Gender_Click); + this.Label_Gender.Click += new System.EventHandler(this.clickGender); // // CB_Form // @@ -849,7 +849,7 @@ this.Label_Friendship.TabIndex = 9; this.Label_Friendship.Text = "Friendship:"; this.Label_Friendship.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - this.Label_Friendship.Click += new System.EventHandler(this.Label_Friendship_Click); + this.Label_Friendship.Click += new System.EventHandler(this.clickFriendship); // // Label_Nature // @@ -1922,7 +1922,7 @@ this.Label_PPups.TabIndex = 12; this.Label_PPups.Text = "PP Ups"; this.Label_PPups.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.Label_PPups.Click += new System.EventHandler(this.Label_PPups_Click); + this.Label_PPups.Click += new System.EventHandler(this.clickPPUps); // // TB_PP4 // @@ -2183,7 +2183,7 @@ this.Label_CTGender.TabIndex = 57; this.Label_CTGender.Text = "G"; this.Label_CTGender.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.Label_CTGender.Click += new System.EventHandler(this.Label_TrainerGender_Click); + this.Label_CTGender.Click += new System.EventHandler(this.clickTRGender); // // TB_OTt2 // @@ -2205,7 +2205,7 @@ this.Label_PrevOT.TabIndex = 42; this.Label_PrevOT.Text = "OT:"; this.Label_PrevOT.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - this.Label_PrevOT.Click += new System.EventHandler(this.Label_CT_Click); + this.Label_PrevOT.Click += new System.EventHandler(this.clickCT); // // CHK_Triangle // @@ -2324,7 +2324,7 @@ this.PB_Mark6.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; this.PB_Mark6.TabIndex = 5; this.PB_Mark6.TabStop = false; - this.PB_Mark6.Click += new System.EventHandler(this.Label_Marking_Click); + this.PB_Mark6.Click += new System.EventHandler(this.clickMarking); // // PB_Mark5 // @@ -2336,7 +2336,7 @@ this.PB_Mark5.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; this.PB_Mark5.TabIndex = 4; this.PB_Mark5.TabStop = false; - this.PB_Mark5.Click += new System.EventHandler(this.Label_Marking_Click); + this.PB_Mark5.Click += new System.EventHandler(this.clickMarking); // // PB_Mark4 // @@ -2348,7 +2348,7 @@ this.PB_Mark4.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; this.PB_Mark4.TabIndex = 3; this.PB_Mark4.TabStop = false; - this.PB_Mark4.Click += new System.EventHandler(this.Label_Marking_Click); + this.PB_Mark4.Click += new System.EventHandler(this.clickMarking); // // PB_Mark3 // @@ -2360,7 +2360,7 @@ this.PB_Mark3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; this.PB_Mark3.TabIndex = 2; this.PB_Mark3.TabStop = false; - this.PB_Mark3.Click += new System.EventHandler(this.Label_Marking_Click); + this.PB_Mark3.Click += new System.EventHandler(this.clickMarking); // // PB_Mark2 // @@ -2372,7 +2372,7 @@ this.PB_Mark2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; this.PB_Mark2.TabIndex = 1; this.PB_Mark2.TabStop = false; - this.PB_Mark2.Click += new System.EventHandler(this.Label_Marking_Click); + this.PB_Mark2.Click += new System.EventHandler(this.clickMarking); // // PB_Mark1 // @@ -2384,7 +2384,7 @@ this.PB_Mark1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; this.PB_Mark1.TabIndex = 0; this.PB_Mark1.TabStop = false; - this.PB_Mark1.Click += new System.EventHandler(this.Label_Marking_Click); + this.PB_Mark1.Click += new System.EventHandler(this.clickMarking); // // GB_ExtraBytes // @@ -2472,7 +2472,7 @@ this.Label_OTGender.TabIndex = 56; this.Label_OTGender.Text = "G"; this.Label_OTGender.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.Label_OTGender.Click += new System.EventHandler(this.Label_TrainerGender_Click); + this.Label_OTGender.Click += new System.EventHandler(this.clickTRGender); // // TB_OT // @@ -2515,7 +2515,7 @@ this.Label_OT.TabIndex = 5; this.Label_OT.Text = "OT:"; this.Label_OT.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - this.Label_OT.Click += new System.EventHandler(this.Label_OT_Click); + this.Label_OT.Click += new System.EventHandler(this.clickOT); // // Label_SID // @@ -2637,7 +2637,7 @@ this.Menu_BoxIO.Name = "Menu_BoxIO"; 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); + this.Menu_BoxIO.Click += new System.EventHandler(this.mainMenuBoxDumpLoad); // // reportToolStripMenuItem // @@ -2730,7 +2730,7 @@ this.L_Save.Size = new System.Drawing.Size(54, 13); this.L_Save.TabIndex = 4; this.L_Save.Text = "SAV: N/A"; - this.L_Save.Click += new System.EventHandler(this.L_Save_Click); + this.L_Save.Click += new System.EventHandler(this.clickSaveFileName); // // tabBoxMulti // @@ -3227,7 +3227,7 @@ this.B_BoxRight.TabIndex = 61; this.B_BoxRight.Text = ">>"; this.B_BoxRight.UseVisualStyleBackColor = true; - this.B_BoxRight.Click += new System.EventHandler(this.B_BoxRight_Click); + this.B_BoxRight.Click += new System.EventHandler(this.clickBoxRight); // // B_BoxLeft // @@ -3238,7 +3238,7 @@ this.B_BoxLeft.TabIndex = 60; this.B_BoxLeft.Text = "<<"; this.B_BoxLeft.UseVisualStyleBackColor = true; - this.B_BoxLeft.Click += new System.EventHandler(this.B_BoxLeft_Click); + this.B_BoxLeft.Click += new System.EventHandler(this.clickBoxLeft); // // C_BoxSelect // @@ -3757,7 +3757,7 @@ this.B_3DSSETemp.TabIndex = 7; this.B_3DSSETemp.Text = "Open Temp 3DSSE "; this.B_3DSSETemp.UseVisualStyleBackColor = true; - this.B_3DSSETemp.Click += new System.EventHandler(this.B_OpenTemp_Click); + this.B_3DSSETemp.Click += new System.EventHandler(this.clickOpenTempFolder); // // B_BoxIO // @@ -3825,7 +3825,7 @@ this.B_SwitchSAV.TabIndex = 6; this.B_SwitchSAV.Text = "Switch SAV"; this.B_SwitchSAV.UseVisualStyleBackColor = true; - this.B_SwitchSAV.Click += new System.EventHandler(this.B_SwitchSAV_Click); + this.B_SwitchSAV.Click += new System.EventHandler(this.clickSwitchSAV); // // B_VerifyCHK // @@ -3836,7 +3836,7 @@ this.B_VerifyCHK.TabIndex = 2; this.B_VerifyCHK.Text = "Checksums"; this.B_VerifyCHK.UseVisualStyleBackColor = true; - this.B_VerifyCHK.Click += new System.EventHandler(this.B_VerifyCHK_Click); + this.B_VerifyCHK.Click += new System.EventHandler(this.clickVerifyCHK); // // L_IntegrityCheck // @@ -3856,7 +3856,7 @@ this.B_VerifySHA.TabIndex = 1; this.B_VerifySHA.Text = "Hashes"; this.B_VerifySHA.UseVisualStyleBackColor = true; - this.B_VerifySHA.Click += new System.EventHandler(this.B_VerifySHA_Click); + this.B_VerifySHA.Click += new System.EventHandler(this.clickVerifySHA); // // B_ExportSAV // @@ -3867,7 +3867,7 @@ this.B_ExportSAV.TabIndex = 4; this.B_ExportSAV.Text = "Export SAV"; this.B_ExportSAV.UseVisualStyleBackColor = true; - this.B_ExportSAV.Click += new System.EventHandler(this.exportSAV); + this.B_ExportSAV.Click += new System.EventHandler(this.clickExportSAV); // // RTB_S // diff --git a/PKX/f1-Main.cs b/PKX/f1-Main.cs index bbd479528..4ffae51e3 100644 --- a/PKX/f1-Main.cs +++ b/PKX/f1-Main.cs @@ -85,9 +85,9 @@ namespace PKHeX ToolStripMenuItem mnuSet = new ToolStripMenuItem("Set"); ToolStripMenuItem mnuDelete = new ToolStripMenuItem("Delete"); // Assign event handlers - mnuView.Click += new EventHandler(rcmView_Click); - mnuSet.Click += new EventHandler(rcmSet_Click); - mnuDelete.Click += new EventHandler(rcmDelete_Click); + mnuView.Click += new EventHandler(clickView); + mnuSet.Click += new EventHandler(clickSet); + mnuDelete.Click += new EventHandler(clickDelete); // Add to main context menu mnu.Items.AddRange(new ToolStripItem[] { mnuView, mnuSet, mnuDelete }); @@ -107,7 +107,7 @@ namespace PKHeX ToolStripMenuItem mnu2View = new ToolStripMenuItem("View"); // Assign event handlers - mnu2View.Click += new EventHandler(rcmView_Click); + mnu2View.Click += new EventHandler(clickView); // Add to main context menu mnu2.Items.AddRange(new ToolStripItem[] { mnu2View }); @@ -1384,7 +1384,7 @@ namespace PKHeX PB_MarkPentagon.Image = Util.ChangeOpacity(PB_MarkPentagon.InitialImage, (float)(Convert.ToUInt16(gameindex == 24 || gameindex == 25 || gameindex == 26 || gameindex == 27)) * 0.9 + 0.1); } // Label Shortcut Tweaks - private void Label_Friendship_Click(object sender, EventArgs e) + private void clickFriendship(object sender, EventArgs e) { if (ModifierKeys == Keys.Control) // prompt to reset { @@ -1399,7 +1399,7 @@ namespace PKHeX else // not reset, not maxed, so max TB_Friendship.Text = "255"; } - private void Label_Gender_Click(object sender, EventArgs e) + private void clickGender(object sender, EventArgs e) { // Get Gender Threshold species = Util.getIndex(CB_Species); @@ -1417,14 +1417,14 @@ namespace PKHeX CB_Form.SelectedIndex = PKX.getGender(Label_Gender.Text); } } - private void Label_PPups_Click(object sender, EventArgs e) + private void clickPPUps(object sender, EventArgs e) { CB_PPu1.SelectedIndex = (ModifierKeys != Keys.Control && Util.getIndex(CB_Move1) > 0) ? 3 : 0; CB_PPu2.SelectedIndex = (ModifierKeys != Keys.Control && Util.getIndex(CB_Move2) > 0) ? 3 : 0; CB_PPu3.SelectedIndex = (ModifierKeys != Keys.Control && Util.getIndex(CB_Move3) > 0) ? 3 : 0; CB_PPu4.SelectedIndex = (ModifierKeys != Keys.Control && Util.getIndex(CB_Move4) > 0) ? 3 : 0; } - private void Label_Marking_Click(object sender, EventArgs e) + private void clickMarking(object sender, EventArgs e) { PictureBox[] pba = { PB_Mark1, PB_Mark2, PB_Mark3, PB_Mark4, PB_Mark5, PB_Mark6 }; CheckBox[] cba = { CHK_Circle, CHK_Triangle, CHK_Square, CHK_Heart, CHK_Star, CHK_Diamond }; @@ -1433,7 +1433,7 @@ namespace PKHeX cb.Checked = !cb.Checked; setMarkings(); } - private void Label_OT_Click(object sender, EventArgs e) + private void clickOT(object sender, EventArgs e) { string OT = Util.TrimFromZero(Encoding.Unicode.GetString(savefile, SaveGame.TrainerCard + 0x48 + savindex * 0x7F000, 0x1A)); if (OT.Length > 0) @@ -1465,11 +1465,11 @@ namespace PKHeX updateNickname(null, null); } } - private void Label_CT_Click(object sender, EventArgs e) + private void clickCT(object sender, EventArgs e) { Label_CTGender.Text = gendersymbols[savefile[0x19405 + savindex * 0x7F000]]; } - private void Label_TrainerGender_Click(object sender, EventArgs e) + private void clickTRGender(object sender, EventArgs e) { Label lbl = sender as Label; if (lbl.Text == "") @@ -2575,7 +2575,7 @@ namespace PKHeX #region //// SAVE FILE FUNCTIONS //// // Integrity Checks // - private void B_VerifyCHK_Click(object sender, EventArgs e) + private void clickVerifyCHK(object sender, EventArgs e) { if (savedited) { @@ -2635,7 +2635,7 @@ namespace PKHeX if (invalid1 + invalid2 == (start.Length * 2)) RTB_S.Text = "No checksums are valid."; } - private void B_VerifySHA_Click(object sender, EventArgs e) + private void clickVerifySHA(object sender, EventArgs e) { if (savedited) { @@ -2853,7 +2853,7 @@ namespace PKHeX RTB_S.Text += "ERROR: NO ACTIVE DIFI HASH MATCH"; } } - private void exportSAV(object sender, EventArgs e) + private void clickExportSAV(object sender, EventArgs e) { // Create another version of the save file. byte[] editedsav = new byte[0x100000]; @@ -3171,19 +3171,19 @@ namespace PKHeX } } // Box/SAV Functions // - private void B_BoxRight_Click(object sender, EventArgs e) + private void clickBoxRight(object sender, EventArgs e) { if (C_BoxSelect.SelectedIndex < 30) C_BoxSelect.SelectedIndex++; else C_BoxSelect.SelectedIndex = 0; } - private void B_BoxLeft_Click(object sender, EventArgs e) + private void clickBoxLeft(object sender, EventArgs e) { if (C_BoxSelect.SelectedIndex > 0) C_BoxSelect.SelectedIndex--; else C_BoxSelect.SelectedIndex = 30; } - private void rcmView_Click(object sender, EventArgs e) + private void clickView(object sender, EventArgs e) { int slot = getSlot(sender); int offset = getPKXOffset(slot); @@ -3242,7 +3242,7 @@ namespace PKHeX else System.Media.SystemSounds.Exclamation.Play(); } - private void rcmSet_Click(object sender, EventArgs e) + private void clickSet(object sender, EventArgs e) { if (!verifiedpkx()) { return; } int slot = getSlot(sender); @@ -3288,7 +3288,7 @@ namespace PKHeX getSlotColor(slot, Properties.Resources.slotSet); } - private void rcmDelete_Click(object sender, EventArgs e) + private void clickDelete(object sender, EventArgs e) { byte partycount = setParty(); int slot = getSlot(sender); @@ -3310,7 +3310,7 @@ namespace PKHeX getSlotColor(slot, Properties.Resources.slotDel); } - private void cloneBox(object sender, EventArgs e) + private void clickClone(object sender, EventArgs e) { if (!verifiedpkx()) { return; } // don't copy garbage to the box if (getSlot(sender) > 30) return; // only perform action if cloning to boxes @@ -3414,13 +3414,13 @@ namespace PKHeX private void slotModifier_Click(object sender, EventArgs e) { if (ModifierKeys == (Keys.Control | Keys.Alt)) - cloneBox(sender, e); + clickClone(sender, e); else if (ModifierKeys == Keys.Control) - rcmView_Click(sender, e); + clickView(sender, e); else if (ModifierKeys == Keys.Shift) - rcmSet_Click(sender, e); + clickSet(sender, e); else if (ModifierKeys == Keys.Alt) - rcmDelete_Click(sender, e); + clickDelete(sender, e); } // Subfunctions // private int getPKXOffset(int slot) @@ -3712,7 +3712,7 @@ namespace PKHeX uint psv = PKX.getPSV(Util.getHEXval(TB_PID)); Tip3.SetToolTip(this.TB_PID, "PSV: " + psv.ToString("0000")); } - private void Menu_DumpLoadBoxes_Click(object sender, EventArgs e) + private void mainMenuBoxDumpLoad(object sender, EventArgs e) { DialogResult dr = Util.Prompt(MessageBoxButtons.YesNoCancel, "Press Yes to Import All from Folder." + Environment.NewLine + "Press No to Dump All to Folder.", "Press Cancel to Abort."); if (dr != DialogResult.Cancel) @@ -3911,7 +3911,7 @@ namespace PKHeX Util.Alert(result); } } - // Subfunction Save Buttons // + // Subfunction Save Buttons // private void B_OpenWondercards_Click(object sender, EventArgs e) { // Open Wondercard Menu @@ -4095,56 +4095,6 @@ namespace PKHeX // Open Secret Base Menu new SAV_SecretBase(this).ShowDialog();; } - - private void L_Save_Click(object sender, EventArgs e) - { - // Get latest SaveDataFiler save location - SDFLoc = Util.GetSDFLocation(); - string path = null; - - if (SDFLoc != null && ModifierKeys != Keys.Control) // if we have a result - path = Path.Combine(SDFLoc, "main"); - else if (File.Exists(Util.NormalizePath(Path.Combine(Util.GetTempFolder(), "root" + Path.DirectorySeparatorChar + "main")))) // else if cgse exists - path = Util.NormalizePath(Path.Combine(Util.GetTempFolder(), "root" + Path.DirectorySeparatorChar + "main")); - - if (path != null) - { - if (Util.Prompt(MessageBoxButtons.YesNo, "Open save file from the following location?", path) == DialogResult.Yes) - openQuick(path); // load save - } - } - private void B_OpenTemp_Click(object sender, EventArgs e) - { - string path; - if (ModifierKeys == Keys.Control) - { - path = Util.GetCacheFolder(); - if (Directory.Exists(path)) - System.Diagnostics.Process.Start("explorer.exe", @path); - else - Util.Alert("Can't find the cache folder."); - } - else - { - path = Util.GetTempFolder(); - if (Directory.Exists(Path.Combine(path, "root"))) - System.Diagnostics.Process.Start("explorer.exe", @Path.Combine(path, "root")); - else if (Directory.Exists(path)) - System.Diagnostics.Process.Start("explorer.exe", @path); - else { Util.Error("Can't find the temporary file.", "Make sure the Cyber Gadget software is paused."); } - } - } - private void B_SwitchSAV_Click(object sender, EventArgs e) - { - DialogResult switchsav = Util.Prompt(MessageBoxButtons.YesNo, String.Format("Current Savefile is Save {0}.",(savindex + 1)),String.Format("Would you like to switch to Save {0}?", ((savindex + 1) % 2 + 1))); - if (switchsav == DialogResult.Yes) - { - savindex = (savindex + 1) % 2; - setBoxNames(); - setPKXBoxes(); - setSAVLabel(); - } - } private void B_JPEG_Click(object sender, EventArgs e) { int offset = 0x7F000 * savindex + SaveGame.JPEG; @@ -4182,6 +4132,56 @@ namespace PKHeX new PKHeX.SAV_BoxIO(this, SaveGame.Box, SaveGame.PCLayout).ShowDialog(); } + private void clickSaveFileName(object sender, EventArgs e) + { + // Get latest SaveDataFiler save location + SDFLoc = Util.GetSDFLocation(); + string path = null; + + if (SDFLoc != null && ModifierKeys != Keys.Control) // if we have a result + path = Path.Combine(SDFLoc, "main"); + else if (File.Exists(Util.NormalizePath(Path.Combine(Util.GetTempFolder(), "root" + Path.DirectorySeparatorChar + "main")))) // else if cgse exists + path = Util.NormalizePath(Path.Combine(Util.GetTempFolder(), "root" + Path.DirectorySeparatorChar + "main")); + + if (path != null) + { + if (Util.Prompt(MessageBoxButtons.YesNo, "Open save file from the following location?", path) == DialogResult.Yes) + openQuick(path); // load save + } + } + private void clickOpenTempFolder(object sender, EventArgs e) + { + string path; + if (ModifierKeys == Keys.Control) + { + path = Util.GetCacheFolder(); + if (Directory.Exists(path)) + System.Diagnostics.Process.Start("explorer.exe", @path); + else + Util.Alert("Can't find the cache folder."); + } + else + { + path = Util.GetTempFolder(); + if (Directory.Exists(Path.Combine(path, "root"))) + System.Diagnostics.Process.Start("explorer.exe", @Path.Combine(path, "root")); + else if (Directory.Exists(path)) + System.Diagnostics.Process.Start("explorer.exe", @path); + else { Util.Error("Can't find the temporary file.", "Make sure the Cyber Gadget software is paused."); } + } + } + private void clickSwitchSAV(object sender, EventArgs e) + { + DialogResult switchsav = Util.Prompt(MessageBoxButtons.YesNo, String.Format("Current Savefile is Save {0}.",(savindex + 1)),String.Format("Would you like to switch to Save {0}?", ((savindex + 1) % 2 + 1))); + if (switchsav == DialogResult.Yes) + { + savindex = (savindex + 1) % 2; + setBoxNames(); + setPKXBoxes(); + setSAVLabel(); + } + } + // Drag & Drop within Box private void pbBoxSlot_MouseDown(object sender, MouseEventArgs e) { diff --git a/SAV/SAV_Inventory.Designer.cs b/SAV/SAV_Inventory.Designer.cs index d9714d42a..89d1a5c6c 100644 --- a/SAV/SAV_Inventory.Designer.cs +++ b/SAV/SAV_Inventory.Designer.cs @@ -108,6 +108,7 @@ this.B_DisplayBerries.Size = new System.Drawing.Size(75, 23); this.B_DisplayBerries.TabIndex = 4; this.B_DisplayBerries.Text = "Berry"; + this.B_DisplayBerries.UseMnemonic = false; this.B_DisplayBerries.UseVisualStyleBackColor = true; this.B_DisplayBerries.Click += new System.EventHandler(this.B_DisplayBerries_Click); // @@ -118,6 +119,7 @@ this.B_DisplayMedicine.Size = new System.Drawing.Size(75, 23); this.B_DisplayMedicine.TabIndex = 3; this.B_DisplayMedicine.Text = "Medicine"; + this.B_DisplayMedicine.UseMnemonic = false; this.B_DisplayMedicine.UseVisualStyleBackColor = true; this.B_DisplayMedicine.Click += new System.EventHandler(this.B_DisplayMedicine_Click); // @@ -128,6 +130,7 @@ this.B_DisplayTMHM.Size = new System.Drawing.Size(75, 23); this.B_DisplayTMHM.TabIndex = 2; this.B_DisplayTMHM.Text = "TM/HM"; + this.B_DisplayTMHM.UseMnemonic = false; this.B_DisplayTMHM.UseVisualStyleBackColor = true; this.B_DisplayTMHM.Click += new System.EventHandler(this.B_DisplayTMHM_Click); // @@ -138,6 +141,7 @@ this.B_DisplayKeyItems.Size = new System.Drawing.Size(75, 23); this.B_DisplayKeyItems.TabIndex = 1; this.B_DisplayKeyItems.Text = "Key Items"; + this.B_DisplayKeyItems.UseMnemonic = false; this.B_DisplayKeyItems.UseVisualStyleBackColor = true; this.B_DisplayKeyItems.Click += new System.EventHandler(this.B_DisplayKeyItems_Click); // @@ -148,6 +152,7 @@ this.B_DisplayItems.Size = new System.Drawing.Size(75, 23); this.B_DisplayItems.TabIndex = 0; this.B_DisplayItems.Text = "Items"; + this.B_DisplayItems.UseMnemonic = false; this.B_DisplayItems.UseVisualStyleBackColor = true; this.B_DisplayItems.Click += new System.EventHandler(this.B_DisplayItems_Click); // diff --git a/SAV/SAV_Inventory.cs b/SAV/SAV_Inventory.cs index a2ce7a7ae..15c70ed8a 100644 --- a/SAV/SAV_Inventory.cs +++ b/SAV/SAV_Inventory.cs @@ -18,7 +18,6 @@ namespace PKHeX Array.Copy(m_parent.savefile, sav, 0x100000); savindex = m_parent.savindex; shiftval = savindex * 0x7F000; - if (m_parent.savegame_oras) { bagoffsets = new int[] @@ -69,49 +68,7 @@ namespace PKHeX // Initialize String Tables private void getListItems() { - 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, - }; - if (m_parent.savegame_oras) - { - 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, - - // ORAS - 534,535, - 752,753,754,755,756,757,758,759,760,761,762,763,764,767,768,769,770, - }; - } + ushort[] itemlist = (m_parent.savegame_oras) ? Legal.Pouch_Items_ORAS : Legal.Pouch_Items_XY; item_val = new string[itemlist.Length]; for (int i = 0; i < itemlist.Length; i++) item_val[i] = Form1.itemlist[itemlist[i]]; @@ -119,33 +76,7 @@ namespace PKHeX } private void getListKeyItems() { - 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, - - // Illegal - 716,717, // For the cheaters who want useless items... - }; - if (m_parent.savegame_oras) - { - itemlist = new int[] { - 000,216, 445,446,447, 465,466,471,628, - 629,631,632,638, 697, - - // Illegal - 716,717,745,746,747,748,749,750, // For the cheaters who want useless items... - - // ORAS - 457,474,503, - - 718,719, - 720,721,722,723,724,725,726,727,728,729, - 730,731,732,733,734,735,736, 738,739, - 740,741,742,743,744, - 751,765,766,771,772,774,775, - }; - } + ushort[] itemlist = (m_parent.savegame_oras) ? Legal.Pouch_Key_ORAS : Legal.Pouch_Key_XY; keyitem_val = new string[itemlist.Length]; for (int i = 0; i < itemlist.Length; i++) keyitem_val[i] = Form1.itemlist[itemlist[i]]; @@ -153,34 +84,7 @@ namespace PKHeX } private void getListTMHM() { - 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, - }; - if (m_parent.savegame_oras) - { - 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, - - // ORAS - 425,737, - }; - } + ushort[] itemlist = (m_parent.savegame_oras) ? Legal.Pouch_TMHM_ORAS : Legal.Pouch_TMHM_XY; tmhm_val = new string[itemlist.Length]; for (int i = 0; i < itemlist.Length; i++) tmhm_val[i] = Form1.itemlist[itemlist[i]]; @@ -188,11 +92,7 @@ namespace PKHeX } private void getListMedicine() { - 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, - }; + ushort[] itemlist = Legal.Pouch_Medicine_XY; medicine_val = new string[itemlist.Length]; for (int i = 0; i < itemlist.Length; i++) medicine_val[i] = Form1.itemlist[itemlist[i]]; @@ -200,13 +100,7 @@ namespace PKHeX } private void getListBerries() { - 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, - }; + ushort[] itemlist = Legal.Pouch_Berry_XY; berries_val = new string[itemlist.Length]; for (int i = 0; i < itemlist.Length; i++) berries_val[i] = Form1.itemlist[itemlist[i]]; @@ -217,27 +111,27 @@ namespace PKHeX private void popItems() { int offset = bagoffsets[0] + shiftval; - populateList(item_val, offset, 308); // max 400 + populateList(item_val, offset, item_val.Length - 1); // max 400 } private void popKeyItems() { int offset = bagoffsets[1] + shiftval; - populateList(keyitem_val, offset, 60); // max 96 + populateList(keyitem_val, offset, keyitem_val.Length - 1); // max 96 } private void popTMHM() { int offset = bagoffsets[2] + shiftval; - populateList(tmhm_val, offset, 105 + 3*Convert.ToInt16(m_parent.savegame_oras)); // 106 total tho + populateList(tmhm_val, offset, tmhm_val.Length - 1); } private void popMedicine() { int offset = bagoffsets[3] + shiftval; - populateList(medicine_val, offset, 60); // 64 total slots + populateList(medicine_val, offset, medicine_val.Length - 1); // 64 total slots } private void popBerries() { int offset = bagoffsets[4] + shiftval; - populateList(berries_val, offset, 70); // 102 slots + populateList(berries_val, offset, berries_val.Length - 1); // 102 slots } private void populateList(string[] itemarr, int offset, int itemcount) @@ -396,17 +290,16 @@ namespace PKHeX // Store Current Items back to the save file saveBag(sender); popKeyItems(); - if (ModifierKeys == Keys.Alt && m_parent.HaX) - giveAll(keyitem_val,1); + if (ModifierKeys == Keys.Alt && Util.Prompt(MessageBoxButtons.YesNo, String.Format("Warning: Adding all {0} is dangerous.", B_DisplayKeyItems.Text), "Continue?") == DialogResult.Yes) + giveAll(keyitem_val, 1); } private void B_DisplayTMHM_Click(object sender, EventArgs e) { // Store Current Items back to the save file saveBag(sender); popTMHM(); - - if (ModifierKeys == Keys.Alt && m_parent.HaX) - giveAll(tmhm_val,1); + if (ModifierKeys == Keys.Alt && Util.Prompt(MessageBoxButtons.YesNo, String.Format("Warning: Adding all {0} is dangerous.", B_DisplayTMHM.Text), "Continue?") == DialogResult.Yes) + giveAll(tmhm_val, 1); } private void B_DisplayMedicine_Click(object sender, EventArgs e) {