@@ -21,13 +21,19 @@ public partial class LegalityAnalysis
|
||||
public string Report => getLegalityReport();
|
||||
public string VerboseReport => getVerboseLegalityReport();
|
||||
|
||||
public LegalityAnalysis(PK6 pk)
|
||||
public LegalityAnalysis(PKM pk)
|
||||
{
|
||||
pk6 = pk;
|
||||
updateRelearnLegality();
|
||||
updateMoveLegality();
|
||||
updateChecks();
|
||||
getLegalityReport();
|
||||
if (!(pk is PK6))
|
||||
return;
|
||||
pk6 = pk as PK6;
|
||||
try
|
||||
{
|
||||
updateRelearnLegality();
|
||||
updateMoveLegality();
|
||||
updateChecks();
|
||||
getLegalityReport();
|
||||
}
|
||||
catch { Valid = false; }
|
||||
}
|
||||
|
||||
public void updateRelearnLegality()
|
||||
@@ -66,7 +72,7 @@ private void updateChecks()
|
||||
}
|
||||
private string getLegalityReport()
|
||||
{
|
||||
if (!pk6.Gen6)
|
||||
if (pk6 == null || !pk6.Gen6)
|
||||
return "Analysis only available for Pokémon that originate from X/Y & OR/AS.";
|
||||
|
||||
var chks = Checks;
|
||||
@@ -91,6 +97,8 @@ private string getLegalityReport()
|
||||
private string getVerboseLegalityReport()
|
||||
{
|
||||
string r = getLegalityReport() + Environment.NewLine;
|
||||
if (pk6 == null)
|
||||
return r;
|
||||
r += "===" + Environment.NewLine + Environment.NewLine;
|
||||
int rl = r.Length;
|
||||
|
||||
@@ -105,7 +113,7 @@ private string getVerboseLegalityReport()
|
||||
r += Environment.NewLine;
|
||||
|
||||
var chks = Checks;
|
||||
r += chks.Where(chk => chk.Valid && chk.Comment != "Valid").OrderBy(chk => chk.Judgement) // Fishy sorted to top
|
||||
r += chks.Where(chk => chk != null && chk.Valid && chk.Comment != "Valid").OrderBy(chk => chk.Judgement) // Fishy sorted to top
|
||||
.Aggregate("", (current, chk) => current + $"{chk.Judgement}: {chk.Comment}{Environment.NewLine}");
|
||||
return r.TrimEnd();
|
||||
}
|
||||
|
||||
@@ -37,6 +37,13 @@ private LegalityCheck verifyECPID()
|
||||
if (pk6.PID == 0)
|
||||
return new LegalityCheck(Severity.Fishy, "PID is not set.");
|
||||
|
||||
if (EncounterType == typeof (EncounterStatic))
|
||||
{
|
||||
var enc = (EncounterStatic) EncounterMatch;
|
||||
if (enc.Shiny != null && (bool)enc.Shiny ^ pk6.IsShiny)
|
||||
return new LegalityCheck(Severity.Invalid, "Encounter " + (enc.Shiny == true ? "must be" : "cannot be") + " shiny.");
|
||||
}
|
||||
|
||||
string special = "";
|
||||
if (pk6.Gen6)
|
||||
{
|
||||
@@ -553,6 +560,8 @@ private LegalityCheck verifyBall()
|
||||
{
|
||||
if (Legal.Ban_Gen3Ball.Contains(pk6.Species))
|
||||
return new LegalityCheck(Severity.Invalid, "Unobtainable capture for Gen4 Ball.");
|
||||
if (pk6.AbilityNumber == 4 && 152 <= pk6.Species && pk6.Species <= 160)
|
||||
return new LegalityCheck(Severity.Invalid, "Ball not possible for species with hidden ability.");
|
||||
|
||||
return new LegalityCheck(Severity.Valid, "Obtainable capture for Gen4 Ball.");
|
||||
}
|
||||
@@ -563,7 +572,7 @@ private LegalityCheck verifyBall()
|
||||
private LegalityCheck verifyHistory()
|
||||
{
|
||||
if (!Encounter.Valid)
|
||||
return new LegalityCheck(Severity.Valid, "Skipped Memory check due to other check being invalid.");
|
||||
return new LegalityCheck(Severity.Valid, "Skipped History check due to other check being invalid.");
|
||||
|
||||
WC6 MatchedWC6 = EncounterMatch as WC6;
|
||||
if (MatchedWC6?.OT.Length > 0) // Has Event OT -- null propagation yields false if MatchedWC6=null
|
||||
@@ -574,14 +583,6 @@ private LegalityCheck verifyHistory()
|
||||
return new LegalityCheck(Severity.Invalid, "Event OT Affection should be zero.");
|
||||
if (pk6.CurrentHandler != 1)
|
||||
return new LegalityCheck(Severity.Invalid, "Current handler should not be Event OT.");
|
||||
if (pk6.OT_Memory != MatchedWC6.OT_Memory)
|
||||
return new LegalityCheck(Severity.Invalid, "Event " + (MatchedWC6.OT_Memory == 0 ? "should not have an OT Memory" : "OT Memory should be index " + MatchedWC6.OT_Memory) + ".");
|
||||
if (pk6.OT_Intensity != MatchedWC6.OT_Intensity)
|
||||
return new LegalityCheck(Severity.Invalid, "Event " + (MatchedWC6.OT_Intensity == 0 ? "should not have an OT Memory Intensity value" : "OT Memory Intensity should be index " + MatchedWC6.OT_Intensity) + ".");
|
||||
if (pk6.OT_TextVar != MatchedWC6.OT_TextVar)
|
||||
return new LegalityCheck(Severity.Invalid, "Event " + (MatchedWC6.OT_TextVar == 0 ? "should not have an OT Memory TextVar value" : "OT Memory TextVar should be index " + MatchedWC6.OT_TextVar) + ".");
|
||||
if (pk6.OT_Feeling != MatchedWC6.OT_Feeling)
|
||||
return new LegalityCheck(Severity.Invalid, "Event " + (MatchedWC6.OT_Feeling == 0 ? "should not have an OT Memory Feeling value" : "OT Memory Feeling should be index " + MatchedWC6.OT_Feeling) + ".");
|
||||
}
|
||||
if (!pk6.WasEvent && !(pk6.WasLink && (EncounterMatch as EncounterLink)?.OT == false) && (pk6.HT_Name.Length == 0 || pk6.Geo1_Country == 0)) // Is not Traded
|
||||
{
|
||||
@@ -689,10 +690,15 @@ private LegalityCheck verifyOTMemory()
|
||||
}
|
||||
if (EncounterType == typeof(WC6))
|
||||
{
|
||||
if (pk6.OT_Memory != 0)
|
||||
return new LegalityCheck(Severity.Invalid, "Event Pokémon should not have an OT memory.");
|
||||
|
||||
return new LegalityCheck(Severity.Valid, "OT Memory (Event) is valid.");
|
||||
WC6 MatchedWC6 = EncounterMatch as WC6;
|
||||
if (pk6.OT_Memory != MatchedWC6.OT_Memory)
|
||||
return new LegalityCheck(Severity.Invalid, "Event " + (MatchedWC6.OT_Memory == 0 ? "should not have an OT Memory" : "OT Memory should be index " + MatchedWC6.OT_Memory) + ".");
|
||||
if (pk6.OT_Intensity != MatchedWC6.OT_Intensity)
|
||||
return new LegalityCheck(Severity.Invalid, "Event " + (MatchedWC6.OT_Intensity == 0 ? "should not have an OT Memory Intensity value" : "OT Memory Intensity should be index " + MatchedWC6.OT_Intensity) + ".");
|
||||
if (pk6.OT_TextVar != MatchedWC6.OT_TextVar)
|
||||
return new LegalityCheck(Severity.Invalid, "Event " + (MatchedWC6.OT_TextVar == 0 ? "should not have an OT Memory TextVar value" : "OT Memory TextVar should be index " + MatchedWC6.OT_TextVar) + ".");
|
||||
if (pk6.OT_Feeling != MatchedWC6.OT_Feeling)
|
||||
return new LegalityCheck(Severity.Invalid, "Event " + (MatchedWC6.OT_Feeling == 0 ? "should not have an OT Memory Feeling value" : "OT Memory Feeling should be index " + MatchedWC6.OT_Feeling) + ".");
|
||||
}
|
||||
switch (pk6.OT_Memory)
|
||||
{
|
||||
@@ -801,7 +807,7 @@ private LegalityCheck verifyForm()
|
||||
break;
|
||||
}
|
||||
|
||||
return pk6.AltForm > 0 && (Legal.BattleForms.Contains(pk6.Species) || Legal.BattleMegas.Contains(pk6.Species))
|
||||
return pk6.AltForm > 0 && new[] {Legal.BattleForms, Legal.BattleMegas, Legal.BattlePrimals}.Any(arr => arr.Contains(pk6.Species))
|
||||
? new LegalityCheck(Severity.Invalid, "Form cannot exist outside of a battle.")
|
||||
: new LegalityCheck();
|
||||
}
|
||||
|
||||
@@ -198,8 +198,10 @@ internal static EncounterStatic getValidStaticEncounter(PK6 pk6)
|
||||
continue;
|
||||
if (e.Level != pk6.Met_Level)
|
||||
continue;
|
||||
if (e.Shiny != null && e.Shiny != pk6.IsShiny)
|
||||
continue;
|
||||
|
||||
// Defer to EC/PID check
|
||||
// if (e.Shiny != null && e.Shiny != pk6.IsShiny)
|
||||
// continue;
|
||||
|
||||
// Defer ball check to later
|
||||
// if (e.Gift && pk6.Ball != 4) // PokéBall
|
||||
@@ -376,7 +378,7 @@ internal static bool getCanLearnMove(PK6 pk6, int move, int version = -1)
|
||||
}
|
||||
internal static bool getCanKnowMove(PK6 pk6, int move, int version = -1)
|
||||
{
|
||||
if (pk6.Species == 235 && !Legal.InvalidSketch.Contains(move))
|
||||
if (pk6.Species == 235 && !InvalidSketch.Contains(move))
|
||||
return true;
|
||||
return getValidMoves(pk6, Version: version, LVL: true, Relearn: true, Tutor: true, Machine: true).Contains(move);
|
||||
}
|
||||
|
||||
@@ -1,57 +1,22 @@
|
||||
namespace PKHeX
|
||||
using System.Linq;
|
||||
|
||||
namespace PKHeX
|
||||
{
|
||||
public static partial 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,
|
||||
|
||||
// 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 =
|
||||
{
|
||||
000, 001, 002, 003, 004, 005, 006, 007, 008, 009, 010, 011, 012,
|
||||
013, 014, 015, 016, 492, 493, 494, 495, 496, 497, 498, 499, 576,
|
||||
};
|
||||
|
||||
internal static readonly int[] Items_CommonBall = {4, 3, 2, 1};
|
||||
|
||||
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, 16
|
||||
};
|
||||
|
||||
#endregion
|
||||
|
||||
#region Games
|
||||
|
||||
@@ -170,7 +135,7 @@ public static partial class Legal
|
||||
|
||||
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,
|
||||
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,
|
||||
@@ -188,9 +153,9 @@ public static partial class Legal
|
||||
699, 704, 710, 711, 715,
|
||||
};
|
||||
|
||||
internal static readonly ushort[] Pouch_Items_ORAS =
|
||||
internal static readonly ushort[] Pouch_Items_AO =
|
||||
{
|
||||
000, 001, 002, 003, 004, 005, 006, 007, 008, 009, 010, 011, 012, 013, 014, 015, 016, 055, 056,
|
||||
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, 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,
|
||||
@@ -214,7 +179,7 @@ public static partial class Legal
|
||||
|
||||
internal static readonly ushort[] Pouch_Key_XY =
|
||||
{
|
||||
000, 216, 431, 442, 445, 446, 447, 450, 465, 466, 471, 628,
|
||||
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,
|
||||
|
||||
@@ -222,9 +187,9 @@ public static partial class Legal
|
||||
716, 717, // For the cheaters who want useless items...
|
||||
};
|
||||
|
||||
internal static readonly ushort[] Pouch_Key_ORAS =
|
||||
internal static readonly ushort[] Pouch_Key_AO =
|
||||
{
|
||||
000, 216, 445, 446, 447, 465, 466, 471, 628,
|
||||
216, 445, 446, 447, 465, 466, 471, 628,
|
||||
629, 631, 632, 638, 697,
|
||||
|
||||
// Illegal
|
||||
@@ -242,7 +207,6 @@ public static partial class Legal
|
||||
|
||||
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,
|
||||
@@ -253,9 +217,8 @@ public static partial class Legal
|
||||
420, 421, 422, 423, 424,
|
||||
};
|
||||
|
||||
internal static readonly ushort[] Pouch_TMHM_ORAS =
|
||||
internal static readonly ushort[] Pouch_TMHM_AO =
|
||||
{
|
||||
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,
|
||||
@@ -271,14 +234,14 @@ public static partial class Legal
|
||||
|
||||
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,
|
||||
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_Medicine_ORAS =
|
||||
internal static readonly ushort[] Pouch_Medicine_AO =
|
||||
{
|
||||
000, 017, 018, 019, 020, 021, 022, 023, 024, 025, 026, 027, 028, 029, 030, 031, 032, 033,
|
||||
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,
|
||||
|
||||
@@ -288,13 +251,15 @@ public static partial class Legal
|
||||
|
||||
internal static readonly ushort[] Pouch_Berry_XY =
|
||||
{
|
||||
0, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
|
||||
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,
|
||||
};
|
||||
|
||||
internal static readonly ushort[] HeldItem_XY = new ushort[1].Concat(Pouch_Items_XY).Concat(Pouch_Medicine_XY).Concat(Pouch_Berry_XY).ToArray();
|
||||
internal static readonly ushort[] HeldItem_AO = new ushort[1].Concat(Pouch_Items_AO).Concat(Pouch_Medicine_AO).Concat(Pouch_Berry_XY).ToArray();
|
||||
#endregion
|
||||
|
||||
#region TMHM
|
||||
@@ -345,8 +310,8 @@ public static partial class Legal
|
||||
|
||||
// Legality
|
||||
internal static readonly int[] Gen4EncounterTypes = { 1, 2, 4, 5, 7, 9, 10, 12, 23, 24 };
|
||||
internal static readonly int Struggle = 165;
|
||||
internal static readonly int Chatter = 448;
|
||||
internal const int Struggle = 165;
|
||||
internal const int Chatter = 448;
|
||||
internal static readonly int[] InvalidSketch = {Struggle, Chatter};
|
||||
internal static readonly int[] EggLocations = {60002, 30002};
|
||||
internal static readonly int[] LightBall = {25, 26, 172};
|
||||
@@ -523,6 +488,7 @@ public static partial class Legal
|
||||
531,
|
||||
719
|
||||
};
|
||||
internal static readonly int[] BattlePrimals = {382, 383};
|
||||
internal static readonly string[][] TradeXY =
|
||||
{
|
||||
new string[0], // 0 - None
|
||||
@@ -778,7 +744,7 @@ public static partial class Legal
|
||||
internal static readonly EncounterTrade[] TradeGift_AO =
|
||||
{
|
||||
new EncounterTrade { Species = 296, Level = 9, Ability = 2, Gender = 0, TID = 30724, Nature = Nature.Brave, IVs = new[] {-1, 31, -1, -1, -1, -1}, }, // Makuhita
|
||||
new EncounterTrade { Species = 300, Level = 25, Ability = 1, Gender = 1, TID = 03239, Nature = Nature.Naughty, IVs = new[] {-1, -1, -1, 31, -1, -1}, }, // Skitty
|
||||
new EncounterTrade { Species = 300, Level = 30, Ability = 1, Gender = 1, TID = 03239, Nature = Nature.Naughty, IVs = new[] {-1, -1, -1, 31, -1, -1}, }, // Skitty
|
||||
new EncounterTrade { Species = 222, Level = 50, Ability = 4, Gender = 1, TID = 00325, Nature = Nature.Calm, IVs = new[] {31, -1, -1, -1, -1, 31}, }, // Corsola
|
||||
};
|
||||
#endregion
|
||||
@@ -904,7 +870,6 @@ public static partial class Legal
|
||||
};
|
||||
internal static readonly int[] Memory_NotAO =
|
||||
{
|
||||
5, // {0} went to a Pokémon Center with {1} to buy {2}. {4} that {3}.
|
||||
11, // {0} went clothes shopping with {1}. {4} that {3}.
|
||||
43, // {0} was impressed by the speed of the train it took with {1}. {4} that {3}.
|
||||
44, // {0} encountered {2} with {1} using the Poké Radar. {4} that {3}.
|
||||
|
||||
36
Legality/Tables3.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Linq;
|
||||
|
||||
namespace PKHeX
|
||||
{
|
||||
public static partial class Legal
|
||||
{
|
||||
// PKHeX Valid Array Storage
|
||||
#region DP
|
||||
internal static readonly ushort[] Pouch_Items_RS = {
|
||||
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, 63, 64, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 78, 79, 80, 81, 83, 84, 85, 86, 93, 94, 95, 96, 97, 98, 103, 104, 106, 107, 108, 109, 110, 111, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 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, 254, 255, 256, 257, 258
|
||||
};
|
||||
internal static readonly ushort[] Pouch_Key_RS = {
|
||||
259, 260, 261, 262, 263, 264, 265, 266, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288
|
||||
};
|
||||
internal static readonly ushort[] Pouch_TM_RS = {
|
||||
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, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338,
|
||||
};
|
||||
internal static readonly ushort[] Pouch_HM_RS = {
|
||||
339, 340, 341, 342, 343, 344, 345, 346
|
||||
};
|
||||
internal static readonly ushort[] Pouch_Berries_RS = {
|
||||
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
|
||||
};
|
||||
internal static readonly ushort[] Pouch_Ball_RS = {
|
||||
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
|
||||
};
|
||||
internal static readonly ushort[] Pouch_Key_E = Pouch_Key_RS.Concat(new ushort[] { 375, 376 }).ToArray();
|
||||
internal static readonly ushort[] Pouch_Key_FRLG = Pouch_Key_RS.Concat(new ushort[] { 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 }).ToArray();
|
||||
|
||||
internal static readonly ushort[] Pouch_TMHM_RS = Pouch_TM_RS.Concat(Pouch_HM_RS).ToArray();
|
||||
internal static readonly ushort[] HeldItems_RS = new ushort[1].Concat(Pouch_Items_RS).Concat(Pouch_Ball_RS).Concat(Pouch_Berries_RS).Concat(Pouch_TM_RS).ToArray();
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
70
Legality/Tables4.cs
Normal file
@@ -0,0 +1,70 @@
|
||||
using System.Linq;
|
||||
|
||||
namespace PKHeX
|
||||
{
|
||||
public static partial class Legal
|
||||
{
|
||||
// PKHeX Valid Array Storage
|
||||
#region DP
|
||||
internal static readonly ushort[] Pouch_Items_DP = {
|
||||
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, 135, 136, 213, 214, 215, 216, 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
|
||||
};
|
||||
internal static readonly ushort[] Pouch_Key_DP = {
|
||||
428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464
|
||||
};
|
||||
internal static readonly ushort[] Pouch_TMHM_DP = {
|
||||
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, 420, 421, 422, 423, 424, 425, 426, 427
|
||||
};
|
||||
internal static readonly ushort[] Pouch_Mail_DP = {
|
||||
137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148
|
||||
};
|
||||
internal static readonly ushort[] Pouch_Medicine_DP = {
|
||||
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
|
||||
};
|
||||
internal static readonly ushort[] Pouch_Berries_DP = {
|
||||
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
|
||||
};
|
||||
internal static readonly ushort[] Pouch_Ball_DP = {
|
||||
1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
|
||||
};
|
||||
internal static readonly ushort[] Pouch_Battle_DP = {
|
||||
55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67
|
||||
};
|
||||
internal static readonly ushort[] HeldItems_DP = new ushort[1].Concat(Pouch_Items_DP).Concat(Pouch_Mail_DP).Concat(Pouch_Medicine_DP).Concat(Pouch_Berries_DP).Concat(Pouch_Ball_DP).ToArray();
|
||||
#endregion
|
||||
|
||||
#region Pt
|
||||
internal static readonly ushort[] Pouch_Items_Pt = {
|
||||
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, 135, 136, 213, 214, 215, 216, 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
|
||||
};
|
||||
internal static readonly ushort[] Pouch_Key_Pt = {
|
||||
428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467
|
||||
};
|
||||
internal static readonly ushort[] Pouch_TMHM_Pt = Pouch_TMHM_DP;
|
||||
internal static readonly ushort[] Pouch_Mail_Pt = Pouch_Mail_DP;
|
||||
internal static readonly ushort[] Pouch_Medicine_Pt = Pouch_Medicine_DP;
|
||||
internal static readonly ushort[] Pouch_Berries_Pt = Pouch_Berries_DP;
|
||||
internal static readonly ushort[] Pouch_Ball_Pt = Pouch_Ball_DP;
|
||||
internal static readonly ushort[] Pouch_Battle_Pt = Pouch_Battle_DP;
|
||||
|
||||
internal static readonly ushort[] HeldItems_Pt = new ushort[1].Concat(Pouch_Items_Pt).Concat(Pouch_Mail_Pt).Concat(Pouch_Medicine_Pt).Concat(Pouch_Berries_Pt).Concat(Pouch_Ball_Pt).ToArray();
|
||||
#endregion
|
||||
|
||||
#region HGSS
|
||||
internal static readonly ushort[] Pouch_Items_HGSS = Pouch_Items_Pt;
|
||||
internal static readonly ushort[] Pouch_Key_HGSS = {
|
||||
434, 435, 437, 444, 445, 446, 447, 450, 456, 464, 465, 466, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 501, 502, 503, 504, 532, 533, 534, 535, 536
|
||||
};
|
||||
internal static readonly ushort[] Pouch_TMHM_HGSS = Pouch_TMHM_DP;
|
||||
internal static readonly ushort[] Pouch_Mail_HGSS = Pouch_Mail_DP;
|
||||
internal static readonly ushort[] Pouch_Medicine_HGSS = Pouch_Medicine_DP;
|
||||
internal static readonly ushort[] Pouch_Berries_HGSS = Pouch_Berries_DP;
|
||||
internal static readonly ushort[] Pouch_Ball_HGSS = {
|
||||
1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 492, 493, 494, 495, 496, 497, 498, 499, 500
|
||||
};
|
||||
internal static readonly ushort[] Pouch_Battle_HGSS = Pouch_Battle_DP;
|
||||
|
||||
internal static readonly ushort[] HeldItems_HGSS = new ushort[1].Concat(Pouch_Items_HGSS).Concat(Pouch_Mail_HGSS).Concat(Pouch_Medicine_HGSS).Concat(Pouch_Berries_HGSS).Concat(Pouch_Ball_Pt).ToArray();
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
29
Legality/Tables5.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System.Linq;
|
||||
|
||||
namespace PKHeX
|
||||
{
|
||||
public static partial class Legal
|
||||
{
|
||||
// PKHeX Valid Array Storage
|
||||
internal static readonly ushort[] Pouch_Items_BW = {
|
||||
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 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, 116, 117, 118, 119, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 213, 214, 215, 216, 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, 575, 576, 577, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590,
|
||||
};
|
||||
internal static readonly ushort[] Pouch_Key_BW = {
|
||||
437, 442, 447, 450, 465, 466, 471, 504, 533, 574, 578, 579, 616, 617, 621, 623, 624, 625, 626,
|
||||
};
|
||||
internal static readonly ushort[] Pouch_TMHM_BW = {
|
||||
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, 420, 421, 422, 423, 424, 425
|
||||
};
|
||||
internal static readonly ushort[] Pouch_Medicine_BW = {
|
||||
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, 134, 504, 565, 566, 567, 568, 569, 570, 591
|
||||
};
|
||||
internal static readonly ushort[] Pouch_Berries_BW = {
|
||||
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
|
||||
};
|
||||
internal static readonly ushort[] HeldItems_BW = new ushort[1].Concat(Pouch_Items_BW).Concat(Pouch_Medicine_BW).Concat(Pouch_Berries_BW).ToArray();
|
||||
|
||||
internal static readonly ushort[] Pouch_Key_B2W2 = {
|
||||
437, 442, 447, 450, 453, 458, 465, 466, 471, 504, 578, 616, 617, 621, 626, 627, 628, 630, 631, 632, 633, 634, 635, 636, 637, 638,
|
||||
};
|
||||
}
|
||||
}
|
||||
142
Misc/PGT.cs
@@ -1,142 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace PKHeX
|
||||
{
|
||||
public class PCD
|
||||
{
|
||||
internal const int Size = 0x358; // 856
|
||||
|
||||
public byte[] Data;
|
||||
public PCD(byte[] data = null)
|
||||
{
|
||||
Data = data ?? new byte[Size];
|
||||
|
||||
byte[] giftData = new byte[PGT.Size];
|
||||
Array.Copy(Data, 0, giftData, 0, PGT.Size);
|
||||
Gift = new PGT(giftData);
|
||||
|
||||
Information = new byte[Data.Length - PGT.Size];
|
||||
Array.Copy(Data, PGT.Size, Information, 0, Information.Length);
|
||||
}
|
||||
public readonly PGT Gift;
|
||||
|
||||
public readonly byte[] Information;
|
||||
/* Big thanks to Grovyle91's Pokémon Mystery Gift Editor, from which the structure was referenced.
|
||||
* http://projectpokemon.org/forums/member.php?829-Grovyle91
|
||||
* http://projectpokemon.org/forums/showthread.php?6524
|
||||
* See also: http://tccphreak.shiny-clique.net/debugger/pcdfiles.htm
|
||||
*/
|
||||
}
|
||||
public class PGT
|
||||
{
|
||||
internal static int Size = 0x104; // 260
|
||||
|
||||
public byte[] Data;
|
||||
public PGT(byte[] data = null)
|
||||
{
|
||||
Data = data ?? new byte[Size];
|
||||
byte[] ekdata = new byte[PK4.SIZE_PARTY];
|
||||
Array.Copy(Data, 8, ekdata, 0, ekdata.Length);
|
||||
// Decrypt PK4
|
||||
PK = new PK4(PKM.decryptArray(ekdata));
|
||||
|
||||
Unknown = new byte[0x10];
|
||||
Array.Copy(Data, 0xF4, Unknown, 0, 0x10);
|
||||
}
|
||||
|
||||
public byte CardType { get { return Data[0]; } set { Data[0] = value; } }
|
||||
// Unused 0x01
|
||||
public byte Slot { get { return Data[2]; } set { Data[2] = value; } }
|
||||
public byte Detail { get { return Data[3]; } set { Data[3] = value; } }
|
||||
public PK4 PK;
|
||||
public byte[] Unknown;
|
||||
|
||||
public bool IsPokémon { get { return CardType == 1; } set { if (value) CardType = 1; } }
|
||||
public bool IsEgg { get { return CardType == 2; } set { if (value) CardType = 2; } }
|
||||
public bool IsManaphyEgg { get { return CardType == 7; } set { if (value) CardType = 7; } }
|
||||
public bool PokémonGift => IsPokémon || IsEgg || IsManaphyEgg;
|
||||
|
||||
public PK4 convertToPK4(SAV6 SAV)
|
||||
{
|
||||
if (!PokémonGift)
|
||||
return null;
|
||||
|
||||
PK4 pk4 = new PK4(PK.Data);
|
||||
if (!IsPokémon && Detail == 0)
|
||||
{
|
||||
pk4.OT_Name = "PKHeX";
|
||||
pk4.TID = 12345;
|
||||
pk4.SID = 54321;
|
||||
pk4.OT_Gender = (int)(Util.rnd32()%2);
|
||||
}
|
||||
if (IsManaphyEgg)
|
||||
{
|
||||
// Since none of this data is populated, fill in default info.
|
||||
pk4.Species = 490;
|
||||
// Level 1 Moves
|
||||
pk4.Move1 = 294;
|
||||
pk4.Move2 = 145;
|
||||
pk4.Move3 = 346;
|
||||
pk4.FatefulEncounter = true;
|
||||
pk4.Ball = 4;
|
||||
pk4.Version = 10; // Diamond
|
||||
pk4.Language = 2; // English
|
||||
pk4.Nickname = "MANAPHY";
|
||||
pk4.Egg_Location = 1; // Ranger (will be +3000 later)
|
||||
}
|
||||
|
||||
// Generate IV
|
||||
uint seed = Util.rnd32();
|
||||
if (pk4.PID == 1) // Create Nonshiny
|
||||
{
|
||||
uint pid1 = PKM.LCRNG(ref seed) >> 16;
|
||||
uint pid2 = PKM.LCRNG(ref seed) >> 16;
|
||||
|
||||
while ((pid1 ^ pid2 ^ pk4.TID ^ pk4.SID) < 8)
|
||||
{
|
||||
uint testPID = pid1 | pid2 << 16;
|
||||
|
||||
// Call the ARNG to change the PID
|
||||
testPID = testPID * 0x6c078965 + 1;
|
||||
|
||||
pid1 = testPID & 0xFFFF;
|
||||
pid2 = testPID >> 16;
|
||||
}
|
||||
pk4.PID = pid1 | (pid2 << 16);
|
||||
}
|
||||
|
||||
// Generate IVs
|
||||
if (pk4.IV32 == 0)
|
||||
{
|
||||
uint iv1 = PKM.LCRNG(ref seed) >> 16;
|
||||
uint iv2 = PKM.LCRNG(ref seed) >> 16;
|
||||
pk4.IV32 = (iv1 | iv2 << 16) & 0x3FFFFFFF;
|
||||
}
|
||||
|
||||
// Generate Met Info
|
||||
DateTime dt = DateTime.Now;
|
||||
if (IsPokémon)
|
||||
{
|
||||
pk4.Met_Location = pk4.Egg_Location + 3000;
|
||||
pk4.Egg_Location = 0;
|
||||
pk4.Met_Day = dt.Day;
|
||||
pk4.Met_Month = dt.Month;
|
||||
pk4.Met_Year = dt.Year - 2000;
|
||||
pk4.IsEgg = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
pk4.Egg_Location = pk4.Egg_Location + 3000;
|
||||
pk4.Egg_Day = dt.Day;
|
||||
pk4.Egg_Month = dt.Month;
|
||||
pk4.Egg_Year = dt.Year - 2000;
|
||||
pk4.IsEgg = false;
|
||||
// Met Location is modified when transferred to pk5; don't worry about it.
|
||||
}
|
||||
if (pk4.Species == 201) // Never will be true; Unown was never distributed.
|
||||
pk4.AltForm = PKM.getUnownForm(pk4.PID);
|
||||
|
||||
return pk4;
|
||||
}
|
||||
}
|
||||
}
|
||||
299
Misc/PK3.cs
@@ -1,299 +0,0 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace PKHeX
|
||||
{
|
||||
public class PK3 // 3rd Generation PKM File
|
||||
{
|
||||
internal const int SIZE_PARTY = 100;
|
||||
internal const int SIZE_STORED = 80;
|
||||
internal const int SIZE_BLOCK = 12;
|
||||
|
||||
public PK3(byte[] decryptedData = null, string ident = null)
|
||||
{
|
||||
Data = (byte[])(decryptedData ?? new byte[SIZE_PARTY]).Clone();
|
||||
Identifier = ident;
|
||||
if (Data.Length != SIZE_PARTY)
|
||||
Array.Resize(ref Data, SIZE_PARTY);
|
||||
}
|
||||
|
||||
// Internal Attributes set on creation
|
||||
public byte[] Data; // Raw Storage
|
||||
public string Identifier; // User or Form Custom Attribute
|
||||
|
||||
// 0x20 Intro
|
||||
public uint PID { get { return BitConverter.ToUInt32(Data, 0x00); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x00); } }
|
||||
public uint EID { get { return BitConverter.ToUInt32(Data, 0x04); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x04); } }
|
||||
public ushort TID { get { return BitConverter.ToUInt16(Data, 0x04); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x04); } }
|
||||
public ushort SID { get { return BitConverter.ToUInt16(Data, 0x06); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x06); } }
|
||||
public string Nickname {
|
||||
get { return PKM.getG3Str(Data.Skip(0x08).Take(10).ToArray(), Japanese); }
|
||||
set { byte[] strdata = PKM.setG3Str(value, Japanese);
|
||||
if (strdata.Length > 10)
|
||||
Array.Resize(ref strdata, 10);
|
||||
strdata.CopyTo(Data, 0x08); } }
|
||||
public int Language { get { return BitConverter.ToUInt16(Data, 0x12); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x12); } }
|
||||
public string OT_Name {
|
||||
get { return PKM.getG3Str(Data.Skip(0x14).Take(7).ToArray(), Japanese); }
|
||||
set { byte[] strdata = PKM.setG3Str(value, Japanese);
|
||||
if (strdata.Length > 7)
|
||||
Array.Resize(ref strdata, 7);
|
||||
strdata.CopyTo(Data, 0x14); } }
|
||||
private byte Markings { get { return Data[0x1B]; } set { Data[0x1B] = value; } }
|
||||
public bool Circle { get { return (Markings & (1 << 0)) == 1 << 0; } set { Markings = (byte)(Markings & ~(1 << 0) | (value ? 1 << 0 : 0)); } }
|
||||
public bool Square { get { return (Markings & (1 << 1)) == 1 << 1; } set { Markings = (byte)(Markings & ~(1 << 1) | (value ? 1 << 1 : 0)); } }
|
||||
public bool Triangle { get { return (Markings & (1 << 2)) == 1 << 2; } set { Markings = (byte)(Markings & ~(1 << 2) | (value ? 1 << 2 : 0)); } }
|
||||
public bool Heart { get { return (Markings & (1 << 3)) == 1 << 3; } set { Markings = (byte)(Markings & ~(1 << 3) | (value ? 1 << 3 : 0)); } }
|
||||
public ushort Checksum { get { return BitConverter.ToUInt16(Data, 0x1C); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x1C); } }
|
||||
public ushort Sanity { get { return BitConverter.ToUInt16(Data, 0x1E); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x1E); } }
|
||||
|
||||
#region Block A
|
||||
public int Species { get { return PKM.getG4Species(BitConverter.ToUInt16(Data, 0x20)); } set { BitConverter.GetBytes((ushort)PKM.getG3Species(value)).CopyTo(Data, 0x20); } }
|
||||
public ushort HeldItem { get { return BitConverter.ToUInt16(Data, 0x22); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x22); } }
|
||||
public uint EXP { get { return BitConverter.ToUInt32(Data, 0x24); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x24); } }
|
||||
private byte PPUps { get { return Data[0x28]; } set { Data[0x28] = value; } }
|
||||
public int Move1_PPUps { get { return (PPUps >> 0) & 3; } set { PPUps = (byte)((PPUps & ~(3 << 0)) | value); } }
|
||||
public int Move2_PPUps { get { return (PPUps >> 2) & 3; } set { PPUps = (byte)((PPUps & ~(3 << 2)) | value); } }
|
||||
public int Move3_PPUps { get { return (PPUps >> 4) & 3; } set { PPUps = (byte)((PPUps & ~(3 << 4)) | value); } }
|
||||
public int Move4_PPUps { get { return (PPUps >> 6) & 3; } set { PPUps = (byte)((PPUps & ~(3 << 6)) | value); } }
|
||||
public int Friendship { get { return Data[0x29]; } set { Data[0x29] = (byte)value; } }
|
||||
// Unused 0x2A 0x2B
|
||||
#endregion
|
||||
|
||||
#region Block B
|
||||
public int Move1 { get { return BitConverter.ToUInt16(Data, 0x2C); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x2C); } }
|
||||
public int Move2 { get { return BitConverter.ToUInt16(Data, 0x2E); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x2E); } }
|
||||
public int Move3 { get { return BitConverter.ToUInt16(Data, 0x30); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x30); } }
|
||||
public int Move4 { get { return BitConverter.ToUInt16(Data, 0x32); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x32); } }
|
||||
public int Move1_PP { get { return Data[0x34]; } set { Data[0x34] = (byte)value; } }
|
||||
public int Move2_PP { get { return Data[0x35]; } set { Data[0x35] = (byte)value; } }
|
||||
public int Move3_PP { get { return Data[0x36]; } set { Data[0x36] = (byte)value; } }
|
||||
public int Move4_PP { get { return Data[0x37]; } set { Data[0x37] = (byte)value; } }
|
||||
#endregion
|
||||
|
||||
#region Block C
|
||||
public int EV_HP { get { return Data[0x38]; } set { Data[0x38] = (byte)value; } }
|
||||
public int EV_ATK { get { return Data[0x39]; } set { Data[0x39] = (byte)value; } }
|
||||
public int EV_DEF { get { return Data[0x3A]; } set { Data[0x3A] = (byte)value; } }
|
||||
public int EV_SPE { get { return Data[0x3B]; } set { Data[0x3B] = (byte)value; } }
|
||||
public int EV_SPA { get { return Data[0x3C]; } set { Data[0x3C] = (byte)value; } }
|
||||
public int EV_SPD { get { return Data[0x3D]; } set { Data[0x3D] = (byte)value; } }
|
||||
public int CNT_Cool { get { return Data[0x3E]; } set { Data[0x3E] = (byte)value; } }
|
||||
public int CNT_Beauty { get { return Data[0x3F]; } set { Data[0x3F] = (byte)value; } }
|
||||
public int CNT_Cute { get { return Data[0x40]; } set { Data[0x40] = (byte)value; } }
|
||||
public int CNT_Smart { get { return Data[0x41]; } set { Data[0x41] = (byte)value; } }
|
||||
public int CNT_Tough { get { return Data[0x42]; } set { Data[0x42] = (byte)value; } }
|
||||
public int CNT_Sheen { get { return Data[0x43]; } set { Data[0x43] = (byte)value; } }
|
||||
#endregion
|
||||
|
||||
#region Block D
|
||||
private byte PKRS { get { return Data[0x44]; } set { Data[0x44] = value; } }
|
||||
public int PKRS_Days { get { return PKRS & 0xF; } set { PKRS = (byte)(PKRS & ~0xF | value); } }
|
||||
public int PKRS_Strain { get { return PKRS >> 4; } set { PKRS = (byte)(PKRS & 0xF | value << 4); } }
|
||||
public int Met_Location { get { return Data[0x45]; } set { Data[0x45] = (byte)value; } }
|
||||
// Origins
|
||||
private ushort Origins { get { return BitConverter.ToUInt16(Data, 0x46); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x46); } }
|
||||
public int Version { get { return (Origins >> 7) & 0xF; } set { Origins = (ushort)((Origins & ~0x780) | ((value & 0xF) << 7));} }
|
||||
public int Pokéball { get { return (Origins >> 11) & 0xF; } set { Origins = (ushort)((Origins & ~0x7800) | ((value & 0xF) << 11)); } }
|
||||
public int OT_Gender { get { return (Origins >> 15) & 1; } set { Origins = (ushort)(Origins & ~(1 << 15) | ((value & 1) << 15)); } }
|
||||
|
||||
public uint IV32 { get { return BitConverter.ToUInt32(Data, 0x48); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x48); } }
|
||||
public int IV_HP { get { return (int)(IV32 >> 00) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 00)) | (uint)((value > 31 ? 31 : value) << 00)); } }
|
||||
public int IV_ATK { get { return (int)(IV32 >> 05) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 05)) | (uint)((value > 31 ? 31 : value) << 05)); } }
|
||||
public int IV_DEF { get { return (int)(IV32 >> 10) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 10)) | (uint)((value > 31 ? 31 : value) << 10)); } }
|
||||
public int IV_SPE { get { return (int)(IV32 >> 15) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 15)) | (uint)((value > 31 ? 31 : value) << 15)); } }
|
||||
public int IV_SPA { get { return (int)(IV32 >> 20) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 20)) | (uint)((value > 31 ? 31 : value) << 20)); } }
|
||||
public int IV_SPD { get { return (int)(IV32 >> 25) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 25)) | (uint)((value > 31 ? 31 : value) << 25)); } }
|
||||
public bool IsEgg { get { return ((IV32 >> 30) & 1) == 1; } set { IV32 = (uint)((IV32 & ~0x40000000) | (uint)(value ? 0x40000000 : 0)); } }
|
||||
public int Ability { get { return (int)((IV32 >> 31) & 1); } set { IV32 = (IV32 & 0x7FFFFFFF) | (value == 1 ? 0x80000000 : 0); } }
|
||||
|
||||
private uint RIB0 { get { return BitConverter.ToUInt32(Data, 0x4C); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x4C); } }
|
||||
public int Cool_Ribbons { get { return (int)(RIB0 >> 00) & 7; } set { RIB0 = (uint)((RIB0 & ~(7 << 00)) | (uint)(value & 7)); } }
|
||||
public int Beauty_Ribbons{ get { return (int)(RIB0 >> 03) & 7; } set { RIB0 = (uint)((RIB0 & ~(7 << 03)) | (uint)(value & 7)); } }
|
||||
public int Cute_Ribbons { get { return (int)(RIB0 >> 06) & 7; } set { RIB0 = (uint)((RIB0 & ~(7 << 06)) | (uint)(value & 7)); } }
|
||||
public int Smart_Ribbons { get { return (int)(RIB0 >> 09) & 3; } set { RIB0 = (uint)((RIB0 & ~(7 << 09)) | (uint)(value & 7)); } }
|
||||
public int Tough_Ribbons { get { return (int)(RIB0 >> 12) & 3; } set { RIB0 = (uint)((RIB0 & ~(7 << 12)) | (uint)(value & 7)); } }
|
||||
public bool Champion { get { return (RIB0 & (1 << 15)) == 1 << 15; } set { RIB0 = (uint)(RIB0 & ~(1 << 15) | (uint)(value ? 1 << 0 : 0)); } }
|
||||
public bool Winning { get { return (RIB0 & (1 << 16)) == 1 << 16; } set { RIB0 = (uint)(RIB0 & ~(1 << 16) | (uint)(value ? 1 << 0 : 0)); } }
|
||||
public bool Victory { get { return (RIB0 & (1 << 17)) == 1 << 17; } set { RIB0 = (uint)(RIB0 & ~(1 << 17) | (uint)(value ? 1 << 0 : 0)); } }
|
||||
public bool Artist { get { return (RIB0 & (1 << 18)) == 1 << 18; } set { RIB0 = (uint)(RIB0 & ~(1 << 18) | (uint)(value ? 1 << 0 : 0)); } }
|
||||
public bool Effort { get { return (RIB0 & (1 << 19)) == 1 << 19; } set { RIB0 = (uint)(RIB0 & ~(1 << 19) | (uint)(value ? 1 << 0 : 0)); } }
|
||||
public bool Special1 { get { return (RIB0 & (1 << 20)) == 1 << 20; } set { RIB0 = (uint)(RIB0 & ~(1 << 20) | (uint)(value ? 1 << 0 : 0)); } }
|
||||
public bool Special2 { get { return (RIB0 & (1 << 21)) == 1 << 21; } set { RIB0 = (uint)(RIB0 & ~(1 << 21) | (uint)(value ? 1 << 0 : 0)); } }
|
||||
public bool Special3 { get { return (RIB0 & (1 << 22)) == 1 << 22; } set { RIB0 = (uint)(RIB0 & ~(1 << 22) | (uint)(value ? 1 << 0 : 0)); } }
|
||||
public bool Special4 { get { return (RIB0 & (1 << 23)) == 1 << 23; } set { RIB0 = (uint)(RIB0 & ~(1 << 23) | (uint)(value ? 1 << 0 : 0)); } }
|
||||
public bool Special5 { get { return (RIB0 & (1 << 24)) == 1 << 24; } set { RIB0 = (uint)(RIB0 & ~(1 << 24) | (uint)(value ? 1 << 0 : 0)); } }
|
||||
public bool Special6 { get { return (RIB0 & (1 << 25)) == 1 << 25; } set { RIB0 = (uint)(RIB0 & ~(1 << 25) | (uint)(value ? 1 << 0 : 0)); } }
|
||||
public bool Special7 { get { return (RIB0 & (1 << 26)) == 1 << 26; } set { RIB0 = (uint)(RIB0 & ~(1 << 26) | (uint)(value ? 1 << 0 : 0)); } }
|
||||
public bool Unused1 { get { return (RIB0 & (1 << 27)) == 1 << 27; } set { RIB0 = (uint)(RIB0 & ~(1 << 27) | (uint)(value ? 1 << 0 : 0)); } }
|
||||
public bool Unused2 { get { return (RIB0 & (1 << 28)) == 1 << 28; } set { RIB0 = (uint)(RIB0 & ~(1 << 28) | (uint)(value ? 1 << 0 : 0)); } }
|
||||
public bool Unused3 { get { return (RIB0 & (1 << 29)) == 1 << 29; } set { RIB0 = (uint)(RIB0 & ~(1 << 29) | (uint)(value ? 1 << 0 : 0)); } }
|
||||
public bool Unused4 { get { return (RIB0 & (1 << 30)) == 1 << 30; } set { RIB0 = (uint)(RIB0 & ~(1 << 30) | (uint)(value ? 1 << 0 : 0)); } }
|
||||
public bool Obedience { get { return (RIB0 & (1 << 31)) == 1 << 31; } set { RIB0 = (RIB0 & ~(1 << 31)) | (uint)(value ? 1 << 0 : 0); } }
|
||||
#endregion
|
||||
|
||||
// Simple Generated Attributes
|
||||
public bool Japanese => Language == 1;
|
||||
public bool Gen3 => Version >= 1 && Version <= 5 || Version == 15;
|
||||
|
||||
public int[] Moves
|
||||
{
|
||||
get { return new[] { Move1, Move2, Move3, Move4 }; }
|
||||
set
|
||||
{
|
||||
if (value.Length > 0) Move1 = value[0];
|
||||
if (value.Length > 1) Move2 = value[1];
|
||||
if (value.Length > 2) Move3 = value[2];
|
||||
if (value.Length > 3) Move4 = value[3];
|
||||
}
|
||||
}
|
||||
|
||||
// Methods
|
||||
public void FixMoves()
|
||||
{
|
||||
if (Move4 != 0 && Move3 == 0)
|
||||
{
|
||||
Move3 = Move4;
|
||||
Move3_PP = Move4_PP;
|
||||
Move3_PPUps = Move4_PPUps;
|
||||
Move4 = Move4_PP = Move4_PPUps = 0;
|
||||
}
|
||||
if (Move3 != 0 && Move2 == 0)
|
||||
{
|
||||
Move2 = Move3;
|
||||
Move2_PP = Move3_PP;
|
||||
Move2_PPUps = Move3_PPUps;
|
||||
Move3 = Move3_PP = Move3_PPUps = 0;
|
||||
}
|
||||
if (Move2 != 0 && Move1 == 0)
|
||||
{
|
||||
Move1 = Move2;
|
||||
Move1_PP = Move2_PP;
|
||||
Move1_PPUps = Move2_PPUps;
|
||||
Move2 = Move2_PP = Move2_PPUps = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public PK4 convertToPK4()
|
||||
{
|
||||
DateTime moment = DateTime.Now;
|
||||
PK4 pk4 = new PK4 // Convert away!
|
||||
{
|
||||
PID = PID,
|
||||
Species = Species,
|
||||
TID = TID,
|
||||
SID = SID,
|
||||
EXP = IsEgg ? PKX.getEXP(5, Species) : EXP,
|
||||
IsEgg = false,
|
||||
Friendship = 40,
|
||||
Circle = Circle,
|
||||
Square = Square,
|
||||
Triangle = Triangle,
|
||||
Heart = Heart,
|
||||
Language = Language,
|
||||
EV_HP = EV_HP,
|
||||
EV_ATK = EV_ATK,
|
||||
EV_DEF = EV_DEF,
|
||||
EV_SPA = EV_SPA,
|
||||
EV_SPD = EV_SPD,
|
||||
EV_SPE = EV_SPE,
|
||||
CNT_Cool = CNT_Cool,
|
||||
CNT_Beauty = CNT_Beauty,
|
||||
CNT_Cute = CNT_Cute,
|
||||
CNT_Smart = CNT_Smart,
|
||||
CNT_Tough = CNT_Tough,
|
||||
CNT_Sheen = CNT_Sheen,
|
||||
FatefulEncounter = Obedience,
|
||||
Move1 = Move1,
|
||||
Move2 = Move2,
|
||||
Move3 = Move3,
|
||||
Move4 = Move4,
|
||||
Move1_PPUps = Move1_PPUps,
|
||||
Move2_PPUps = Move2_PPUps,
|
||||
Move3_PPUps = Move3_PPUps,
|
||||
Move4_PPUps = Move4_PPUps,
|
||||
Move1_PP = PKX.getMovePP(Move1, Move1_PPUps),
|
||||
Move2_PP = PKX.getMovePP(Move2, Move2_PPUps),
|
||||
Move3_PP = PKX.getMovePP(Move3, Move3_PPUps),
|
||||
Move4_PP = PKX.getMovePP(Move4, Move4_PPUps),
|
||||
IV_HP = IV_HP,
|
||||
IV_ATK = IV_ATK,
|
||||
IV_DEF = IV_DEF,
|
||||
IV_SPA = IV_SPA,
|
||||
IV_SPD = IV_SPD,
|
||||
IV_SPE = IV_SPE,
|
||||
Ability = PKM.Gen3Abilities[Species][Ability],
|
||||
Version = Version,
|
||||
Ball = Pokéball,
|
||||
PKRS_Strain = PKRS_Strain,
|
||||
PKRS_Days = PKRS_Days,
|
||||
OT_Gender = OT_Gender,
|
||||
Met_Year = moment.Year - 2000,
|
||||
Met_Month = moment.Month,
|
||||
Met_Day = moment.Day,
|
||||
Met_Location = 0x37, // Pal Park
|
||||
RIB6_4 = Champion,
|
||||
RIB6_5 = Winning,
|
||||
RIB6_6 = Victory,
|
||||
RIB6_7 = Artist,
|
||||
RIB7_0 = Effort,
|
||||
RIB7_1 = Special1, // Battle Champion Ribbon
|
||||
RIB7_2 = Special2, // Regional Champion Ribbon
|
||||
RIB7_3 = Special3, // National Champion Ribbon
|
||||
RIB7_4 = Special4, // Country Ribbon
|
||||
RIB7_5 = Special5, // National Ribbon
|
||||
RIB7_6 = Special6, // Earth Ribbon
|
||||
RIB7_7 = Special7, // World Ribbon
|
||||
};
|
||||
|
||||
// Remaining Ribbons
|
||||
pk4.RIB4_0 |= Cool_Ribbons > 0;
|
||||
pk4.RIB4_1 |= Cool_Ribbons > 1;
|
||||
pk4.RIB4_2 |= Cool_Ribbons > 2;
|
||||
pk4.RIB4_3 |= Cool_Ribbons > 3;
|
||||
pk4.RIB4_4 |= Beauty_Ribbons > 0;
|
||||
pk4.RIB4_5 |= Beauty_Ribbons > 1;
|
||||
pk4.RIB4_6 |= Beauty_Ribbons > 2;
|
||||
pk4.RIB4_7 |= Beauty_Ribbons > 3;
|
||||
pk4.RIB5_0 |= Cute_Ribbons > 0;
|
||||
pk4.RIB5_1 |= Cute_Ribbons > 1;
|
||||
pk4.RIB5_2 |= Cute_Ribbons > 2;
|
||||
pk4.RIB5_3 |= Cute_Ribbons > 3;
|
||||
pk4.RIB5_4 |= Smart_Ribbons > 0;
|
||||
pk4.RIB5_5 |= Smart_Ribbons > 1;
|
||||
pk4.RIB5_6 |= Smart_Ribbons > 2;
|
||||
pk4.RIB5_7 |= Smart_Ribbons > 3;
|
||||
pk4.RIB6_0 |= Tough_Ribbons > 0;
|
||||
pk4.RIB6_1 |= Tough_Ribbons > 1;
|
||||
pk4.RIB6_2 |= Tough_Ribbons > 2;
|
||||
pk4.RIB6_3 |= Tough_Ribbons > 3;
|
||||
|
||||
// Yay for reusing string buffers!
|
||||
PKM.G4TransferTrashBytes[pk4.Language].CopyTo(pk4.Data, 0x48 + 4);
|
||||
pk4.Nickname = IsEgg ? PKM.getSpeciesName(pk4.Species, pk4.Language) : Nickname;
|
||||
Array.Copy(pk4.Data, 0x48, pk4.Data, 0x68, 0x10);
|
||||
pk4.OT_Name = OT_Name;
|
||||
|
||||
// Set Final Data
|
||||
pk4.Met_Level = PKX.getLevel(pk4.Species, pk4.EXP);
|
||||
pk4.Gender = PKM.getGender(pk4.Species, pk4.PID);
|
||||
pk4.IsNicknamed |= pk4.Nickname != PKM.getSpeciesName(pk4.Species, pk4.Language);
|
||||
|
||||
// Unown Form
|
||||
if (Species == 201)
|
||||
pk4.AltForm = PKM.getUnownForm(PID);
|
||||
|
||||
// Remove HM moves
|
||||
int[] banned = { 15, 19, 57, 70, 148, 249, 127, 291 };
|
||||
int[] newMoves = pk4.Moves;
|
||||
for (int i = 0; i < 4; i++)
|
||||
if (banned.Contains(newMoves[i]))
|
||||
newMoves[i] = 0;
|
||||
pk4.Moves = newMoves;
|
||||
pk4.FixMoves();
|
||||
|
||||
pk4.RefreshChecksum();
|
||||
return pk4;
|
||||
}
|
||||
}
|
||||
}
|
||||
1518
Misc/PKX.cs
55
Misc/QR.cs
@@ -1,5 +1,8 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Web;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace PKHeX
|
||||
@@ -41,5 +44,57 @@ private void PB_QR_Click(object sender, EventArgs e)
|
||||
try { Clipboard.SetImage(PB_QR.BackgroundImage); }
|
||||
catch { Util.Alert("Failed to set Image to Clipboard"); }
|
||||
}
|
||||
|
||||
// QR Utility
|
||||
internal static byte[] getQRData()
|
||||
{
|
||||
// Fetch data from QR code...
|
||||
string address;
|
||||
try { address = Clipboard.GetText(); }
|
||||
catch { Util.Alert("No text (url) in clipboard."); return null; }
|
||||
try { if (address.Length < 4 || address.Substring(0, 3) != "htt") { Util.Alert("Clipboard text is not a valid URL:", address); return null; } }
|
||||
catch { Util.Alert("Clipboard text is not a valid URL:", address); return null; }
|
||||
string webURL = "http://api.qrserver.com/v1/read-qr-code/?fileurl=" + HttpUtility.UrlEncode(address);
|
||||
try
|
||||
{
|
||||
HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(webURL);
|
||||
HttpWebResponse httpWebReponse = (HttpWebResponse)httpWebRequest.GetResponse();
|
||||
var reader = new StreamReader(httpWebReponse.GetResponseStream());
|
||||
string data = reader.ReadToEnd();
|
||||
if (data.Contains("could not find")) { Util.Alert("Reader could not find QR data in the image."); return null; }
|
||||
if (data.Contains("filetype not supported")) { Util.Alert("Input URL is not valid. Double check that it is an image (jpg/png).", address); return null; }
|
||||
// Quickly convert the json response to a data string
|
||||
string pkstr = data.Substring(data.IndexOf("#", StringComparison.Ordinal) + 1); // Trim intro
|
||||
pkstr = pkstr.Substring(0, pkstr.IndexOf("\",\"error\":null}]}]", StringComparison.Ordinal)); // Trim outro
|
||||
if (pkstr.Contains("nQR-Code:")) pkstr = pkstr.Substring(0, pkstr.IndexOf("nQR-Code:", StringComparison.Ordinal)); // Remove multiple QR codes in same image
|
||||
pkstr = pkstr.Replace("\\", ""); // Rectify response
|
||||
|
||||
try { return Convert.FromBase64String(pkstr); }
|
||||
catch { Util.Alert("QR string to Data failed.", pkstr); return null; }
|
||||
}
|
||||
catch { Util.Alert("Unable to connect to the internet to decode QR code."); return null; }
|
||||
}
|
||||
internal static Image getQRImage(byte[] data, string server)
|
||||
{
|
||||
string qrdata = Convert.ToBase64String(data);
|
||||
string message = server + qrdata;
|
||||
string webURL = "http://chart.apis.google.com/chart?chs=365x365&cht=qr&chl=" + HttpUtility.UrlEncode(message);
|
||||
|
||||
try
|
||||
{
|
||||
HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(webURL);
|
||||
HttpWebResponse httpWebReponse = (HttpWebResponse)httpWebRequest.GetResponse();
|
||||
Stream stream = httpWebReponse.GetResponseStream();
|
||||
if (stream != null) return Image.FromStream(stream);
|
||||
}
|
||||
catch
|
||||
{
|
||||
if (DialogResult.Yes != Util.Prompt(MessageBoxButtons.YesNo, "Unable to connect to the internet to receive QR code.", "Copy QR URL to Clipboard?"))
|
||||
return null;
|
||||
try { Clipboard.SetText(webURL); }
|
||||
catch { Util.Alert("Failed to set text to Clipboard"); }
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
178
Misc/SAV4.cs
@@ -1,178 +0,0 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace PKHeX
|
||||
{
|
||||
public class SAV4 : PKM
|
||||
{
|
||||
internal const int SIZERAW = 0x80000; // 512KB
|
||||
internal static int getIsG4SAV(byte[] data)
|
||||
{
|
||||
int version = -1;
|
||||
if (BitConverter.ToUInt16(data, 0xC0FE) == ccitt16(data.Take(0xC0EC).ToArray()))
|
||||
version = 0; // DP
|
||||
else if (BitConverter.ToUInt16(data, 0xCF2A) == ccitt16(data.Take(0xCF18).ToArray()))
|
||||
version = 1; // PT
|
||||
else if (BitConverter.ToUInt16(data, 0xF626) == ccitt16(data.Take(0xF618).ToArray()))
|
||||
version = 2; // HGSS
|
||||
return version;
|
||||
}
|
||||
|
||||
// Global Settings
|
||||
// Save Data Attributes
|
||||
public readonly byte[] Data;
|
||||
public bool Edited;
|
||||
public readonly bool Exportable;
|
||||
public readonly byte[] BAK;
|
||||
public string FileName, FilePath;
|
||||
public SAV4(byte[] data = null)
|
||||
{
|
||||
Data = (byte[])(data ?? new byte[SIZERAW]).Clone();
|
||||
BAK = (byte[])Data.Clone();
|
||||
Exportable = !Data.SequenceEqual(new byte[Data.Length]);
|
||||
|
||||
// Get Version
|
||||
int version = getIsG4SAV(Data);
|
||||
getActiveBlock(version);
|
||||
getSAVOffsets(version);
|
||||
}
|
||||
|
||||
private int generalBlock = -1;
|
||||
private int storageBlock = -1;
|
||||
private void getActiveBlock(int version)
|
||||
{
|
||||
if (version < 0)
|
||||
return;
|
||||
int ofs = 0;
|
||||
|
||||
if (version == 0) ofs = 0xC0F0; // DP
|
||||
else if (version == 1) ofs = 0xCF1C; // PT
|
||||
else if (version == 2) ofs = 0xF626; // HGSS
|
||||
generalBlock = BitConverter.ToUInt16(Data, ofs) >= BitConverter.ToUInt16(Data, ofs + 0x40000) ? 0 : 1;
|
||||
|
||||
if (version == 0) ofs = 0x1E2D0; // DP
|
||||
else if (version == 1) ofs = 0x1F100; // PT
|
||||
else if (version == 2) ofs = 0x21A00; // HGSS
|
||||
storageBlock = BitConverter.ToUInt16(Data, ofs) >= BitConverter.ToUInt16(Data, ofs + 0x40000) ? 0 : 1;
|
||||
}
|
||||
private void getSAVOffsets(int version)
|
||||
{
|
||||
if (version < 0)
|
||||
return;
|
||||
|
||||
switch (version)
|
||||
{
|
||||
case 0: // DP
|
||||
Party = 0x98 + 0x40000 * generalBlock;
|
||||
Box = 0xC104 + 0x40000 * storageBlock;
|
||||
break;
|
||||
case 1: // PT
|
||||
Party = 0xA0 + 0x40000 * generalBlock;
|
||||
Box = 0xCF34 + 0x40000 * storageBlock;
|
||||
break;
|
||||
case 2: // HGSS
|
||||
Party = 0x98 + 0x40000 * generalBlock;
|
||||
Box = 0xF704 + 0x40000 * storageBlock;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private int Box, Party = -1;
|
||||
|
||||
public int PartyCount
|
||||
{
|
||||
get { return Data[Party - 4]; }
|
||||
set { Data[Party - 4] = (byte)value; }
|
||||
}
|
||||
|
||||
public int BoxCount
|
||||
{
|
||||
get { return Data[Box - 4]; }
|
||||
set { Data[Box - 4] = (byte)value; }
|
||||
}
|
||||
public PK4[] BoxData
|
||||
{
|
||||
get
|
||||
{
|
||||
PK4[] data = new PK4[18 * 30];
|
||||
for (int i = 0; i < data.Length; i++)
|
||||
{
|
||||
data[i] = getPK4Stored(Box + PK4.SIZE_STORED * i);
|
||||
data[i].Identifier = $"B{(i / 30 + 1).ToString("00")}:{(i % 30 + 1).ToString("00")}";
|
||||
}
|
||||
return data;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value == null)
|
||||
throw new ArgumentNullException();
|
||||
if (value.Length != 18 * 30)
|
||||
throw new ArgumentException("Expected 540, got " + value.Length);
|
||||
|
||||
for (int i = 0; i < value.Length; i++)
|
||||
setPK4Stored(value[i], Box + PK4.SIZE_STORED * i);
|
||||
}
|
||||
}
|
||||
public PK4[] PartyData
|
||||
{
|
||||
get
|
||||
{
|
||||
PK4[] data = new PK4[PartyCount];
|
||||
for (int i = 0; i < data.Length; i++)
|
||||
data[i] = getPK4Party(Party + PK4.SIZE_PARTY * i);
|
||||
return data;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value == null)
|
||||
throw new ArgumentNullException();
|
||||
if (value.Length == 0 || value.Length > 6)
|
||||
throw new ArgumentException("Expected 1-6, got " + value.Length);
|
||||
if (value[0].Species == 0)
|
||||
throw new ArgumentException("Can't have an empty first slot." + value.Length);
|
||||
|
||||
PK4[] newParty = value.Where(pk => pk.Species != 0).ToArray();
|
||||
|
||||
PartyCount = newParty.Length;
|
||||
Array.Resize(ref newParty, 6);
|
||||
|
||||
for (int i = PartyCount; i < newParty.Length; i++)
|
||||
newParty[i] = new PK4();
|
||||
for (int i = 0; i < newParty.Length; i++)
|
||||
setPK4Party(newParty[i], Party + PK4.SIZE_PARTY * i);
|
||||
}
|
||||
}
|
||||
|
||||
public PK4 getPK4Party(int offset)
|
||||
{
|
||||
return new PK4(decryptArray(getData(offset, PK4.SIZE_PARTY)));
|
||||
}
|
||||
public PK4 getPK4Stored(int offset)
|
||||
{
|
||||
return new PK4(decryptArray(getData(offset, PK4.SIZE_STORED)));
|
||||
}
|
||||
public void setPK4Party(PK4 pk4, int offset)
|
||||
{
|
||||
if (pk4 == null) return;
|
||||
|
||||
setData(pk4.EncryptedPartyData, offset);
|
||||
Edited = true;
|
||||
}
|
||||
public void setPK4Stored(PK4 pk4, int offset)
|
||||
{
|
||||
if (pk4 == null) return;
|
||||
|
||||
setData(pk4.EncryptedBoxData, offset);
|
||||
Edited = true;
|
||||
}
|
||||
public byte[] getData(int Offset, int Length)
|
||||
{
|
||||
return Data.Skip(Offset).Take(Length).ToArray();
|
||||
}
|
||||
public void setData(byte[] input, int Offset)
|
||||
{
|
||||
input.CopyTo(Data, Offset);
|
||||
Edited = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
204
Misc/SAV5.cs
@@ -1,204 +0,0 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace PKHeX
|
||||
{
|
||||
public class SAV5 : PKM
|
||||
{
|
||||
internal const int SIZERAW = 0x80000; // 512KB
|
||||
internal const int SIZE1 = 0x24000; // B/W
|
||||
internal const int SIZE2 = 0x26000; // B2/W2
|
||||
|
||||
internal static int getIsG5SAV(byte[] data)
|
||||
{
|
||||
ushort chk1 = BitConverter.ToUInt16(data, SIZE1 - 0x100 + 0x8C + 0xE);
|
||||
ushort actual1 = ccitt16(data.Skip(SIZE1 - 0x100).Take(0x8C).ToArray());
|
||||
if (chk1 == actual1)
|
||||
return 0;
|
||||
ushort chk2 = BitConverter.ToUInt16(data, SIZE2 - 0x100 + 0x94 + 0xE);
|
||||
ushort actual2 = ccitt16(data.Skip(SIZE2 - 0x100).Take(0x94).ToArray());
|
||||
if (chk2 == actual2)
|
||||
return 1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Global Settings
|
||||
// Save Data Attributes
|
||||
public readonly byte[] Data;
|
||||
public bool Edited;
|
||||
public readonly bool Exportable;
|
||||
public readonly byte[] BAK;
|
||||
public string FileName, FilePath;
|
||||
public SAV5(byte[] data = null)
|
||||
{
|
||||
Data = (byte[])(data ?? new byte[SIZERAW]).Clone();
|
||||
BAK = (byte[])Data.Clone();
|
||||
Exportable = !Data.SequenceEqual(new byte[Data.Length]);
|
||||
|
||||
// Get Version
|
||||
int version = getIsG5SAV(Data);
|
||||
if (version < 0) // Invalidate Data
|
||||
Data = null;
|
||||
|
||||
// Different Offsets for different games.
|
||||
BattleBox = version == 1 ? 0x20A00 : 0x20900;
|
||||
}
|
||||
|
||||
private const int Box = 0x400;
|
||||
private const int Party = 0x18E00;
|
||||
private readonly int BattleBox;
|
||||
private const int Trainer = 0x19400;
|
||||
private const int Wondercard = 0x1C800;
|
||||
private const int wcSeed = 0x1D290;
|
||||
|
||||
public int PartyCount
|
||||
{
|
||||
get { return Data[Party]; }
|
||||
set { Data[Party] = (byte)value; }
|
||||
}
|
||||
|
||||
public PK5[] BoxData
|
||||
{
|
||||
get
|
||||
{
|
||||
PK5[] data = new PK5[24 * 30];
|
||||
for (int i = 0; i < data.Length; i++)
|
||||
{
|
||||
data[i] = getPK5Stored(Box + i/30 * 0x10 + PK5.SIZE_STORED * i);
|
||||
data[i].Identifier = $"B{(i / 30 + 1).ToString("00")}:{(i % 30 + 1).ToString("00")}";
|
||||
}
|
||||
return data;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value == null)
|
||||
throw new ArgumentNullException();
|
||||
if (value.Length != 24 * 30)
|
||||
throw new ArgumentException("Expected 720, got " + value.Length);
|
||||
|
||||
for (int i = 0; i < value.Length; i++)
|
||||
setPK5Stored(value[i], Box + i/30 * 0x10 + PK5.SIZE_STORED * i);
|
||||
}
|
||||
}
|
||||
public PK5[] PartyData
|
||||
{
|
||||
get
|
||||
{
|
||||
PK5[] data = new PK5[PartyCount];
|
||||
for (int i = 0; i < data.Length; i++)
|
||||
data[i] = getPK5Party(Party + 8 + PK5.SIZE_PARTY * i);
|
||||
return data;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value == null)
|
||||
throw new ArgumentNullException();
|
||||
if (value.Length == 0 || value.Length > 6)
|
||||
throw new ArgumentException("Expected 1-6, got " + value.Length);
|
||||
if (value[0].Species == 0)
|
||||
throw new ArgumentException("Can't have an empty first slot." + value.Length);
|
||||
|
||||
PK5[] newParty = value.Where(pk => pk.Species != 0).ToArray();
|
||||
|
||||
PartyCount = newParty.Length;
|
||||
Array.Resize(ref newParty, 6);
|
||||
|
||||
for (int i = PartyCount; i < newParty.Length; i++)
|
||||
newParty[i] = new PK5();
|
||||
for (int i = 0; i < newParty.Length; i++)
|
||||
setPK5Party(newParty[i], Party + 8 + PK5.SIZE_PARTY * i);
|
||||
}
|
||||
}
|
||||
public PK5[] BattleBoxData
|
||||
{
|
||||
get
|
||||
{
|
||||
PK5[] data = new PK5[6];
|
||||
for (int i = 0; i < data.Length; i++)
|
||||
{
|
||||
data[i] = getPK5Stored(BattleBox + PK5.SIZE_STORED * i);
|
||||
if (data[i].Species == 0)
|
||||
return data.Take(i).ToArray();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
public class MysteryGift
|
||||
{
|
||||
public readonly PGF[] Cards = new PGF[12];
|
||||
public readonly bool[] UsedFlags = new bool[0x800];
|
||||
public uint Seed;
|
||||
}
|
||||
public MysteryGift WondercardInfo
|
||||
{
|
||||
get
|
||||
{
|
||||
uint seed = BitConverter.ToUInt32(Data, wcSeed);
|
||||
MysteryGift Info = new MysteryGift { Seed = seed };
|
||||
byte[] wcData = Data.Skip(Wondercard).Take(0xA90).ToArray(); // Encrypted, Decrypt
|
||||
for (int i = 0; i < wcData.Length; i += 2)
|
||||
BitConverter.GetBytes((ushort)(BitConverter.ToUInt16(wcData, i) ^ LCRNG(ref seed) >> 16)).CopyTo(wcData, i);
|
||||
|
||||
// 0x100 Bytes for Used Flags
|
||||
for (int i = 0; i < Info.UsedFlags.Length; i++)
|
||||
Info.UsedFlags[i] = (wcData[i/8] >> i%8 & 0x1) == 1;
|
||||
// 12 PGFs
|
||||
for (int i = 0; i < Info.Cards.Length; i++)
|
||||
Info.Cards[i] = new PGF(Data.Skip(0x100 + i*PGF.Size).Take(PGF.Size).ToArray());
|
||||
|
||||
return Info;
|
||||
}
|
||||
set
|
||||
{
|
||||
MysteryGift Info = value;
|
||||
byte[] wcData = new byte[0xA90];
|
||||
|
||||
// Toss back into byte[]
|
||||
for (int i = 0; i < Info.UsedFlags.Length; i++)
|
||||
if (Info.UsedFlags[i])
|
||||
wcData[i/8] |= (byte)(1 << (i & 7));
|
||||
for (int i = 0; i < Info.Cards.Length; i++)
|
||||
Info.Cards[i].Data.CopyTo(wcData, 0x100 + i*PGF.Size);
|
||||
|
||||
// Decrypted, Encrypt
|
||||
uint seed = Info.Seed;
|
||||
for (int i = 0; i < wcData.Length; i += 2)
|
||||
BitConverter.GetBytes((ushort)(BitConverter.ToUInt16(wcData, i) ^ LCRNG(ref seed) >> 16)).CopyTo(wcData, i);
|
||||
BitConverter.GetBytes(Info.Seed).CopyTo(Data, wcSeed);
|
||||
}
|
||||
}
|
||||
|
||||
public PK5 getPK5Party(int offset)
|
||||
{
|
||||
return new PK5(decryptArray(getData(offset, PK5.SIZE_PARTY)));
|
||||
}
|
||||
public PK5 getPK5Stored(int offset)
|
||||
{
|
||||
return new PK5(decryptArray(getData(offset, PK5.SIZE_STORED)));
|
||||
}
|
||||
public void setPK5Party(PK5 pk5, int offset)
|
||||
{
|
||||
if (pk5 == null) return;
|
||||
|
||||
setData(pk5.EncryptedPartyData, offset);
|
||||
Edited = true;
|
||||
}
|
||||
public void setPK5Stored(PK5 pk5, int offset)
|
||||
{
|
||||
if (pk5 == null) return;
|
||||
|
||||
setData(pk5.EncryptedBoxData, offset);
|
||||
Edited = true;
|
||||
}
|
||||
public byte[] getData(int Offset, int Length)
|
||||
{
|
||||
return Data.Skip(Offset).Take(Length).ToArray();
|
||||
}
|
||||
public void setData(byte[] input, int Offset)
|
||||
{
|
||||
input.CopyTo(Data, Offset);
|
||||
Edited = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
160
Misc/Util.cs
@@ -149,6 +149,7 @@ internal static string TrimFromZero(string input)
|
||||
internal static string[] getStringList(string f)
|
||||
{
|
||||
object txt = Properties.Resources.ResourceManager.GetObject(f); // Fetch File, \n to list.
|
||||
if (txt == null) return new string[0];
|
||||
string[] rawlist = ((string)txt).Split('\n');
|
||||
for (int i = 0; i < rawlist.Length; i++)
|
||||
rawlist[i] = rawlist[i].Trim();
|
||||
@@ -157,6 +158,7 @@ internal static string[] getStringList(string f)
|
||||
internal static string[] getStringList(string f, string l)
|
||||
{
|
||||
object txt = Properties.Resources.ResourceManager.GetObject("text_" + f + "_" + l); // Fetch File, \n to list.
|
||||
if (txt == null) return new string[0];
|
||||
string[] rawlist = ((string)txt).Split('\n');
|
||||
for (int i = 0; i < rawlist.Length; i++)
|
||||
rawlist[i] = rawlist[i].Trim();
|
||||
@@ -235,64 +237,74 @@ internal static void TranslateInterface(Control form, string lang)
|
||||
rawlist = rawlist.Select(i => i.Trim()).ToArray(); // Remove trailing spaces
|
||||
}
|
||||
|
||||
string[] stringdata = new string[rawlist.Length];
|
||||
int itemsToRename = 0;
|
||||
List<string> stringdata = new List<string>();
|
||||
int start = -1;
|
||||
for (int i = 0; i < rawlist.Length; i++)
|
||||
{
|
||||
// Find our starting point
|
||||
if (!rawlist[i].Contains("! " + form.Name)) continue;
|
||||
|
||||
// Allow renaming of the Window Title
|
||||
string[] WindowName = rawlist[i].Split(new[] {" = "}, StringSplitOptions.None);
|
||||
if (WindowName.Length > 1) form.Text = WindowName[1];
|
||||
// Copy our Control Names and Text to a new array for later processing.
|
||||
for (int j = i + 1; j < rawlist.Length; j++)
|
||||
{
|
||||
if (rawlist[j].Length == 0) continue; // Skip Over Empty Lines, errhandled
|
||||
if (rawlist[j][0] == '-') continue; // Keep translating if line is a comment line
|
||||
if (rawlist[j][0] == '!') // Stop if we have reached the end of translation
|
||||
goto rename;
|
||||
stringdata[itemsToRename] = rawlist[j]; // Add the entry to process later.
|
||||
itemsToRename++;
|
||||
}
|
||||
start = i;
|
||||
break;
|
||||
}
|
||||
return; // Not Found
|
||||
|
||||
// Now that we have our items to rename in: Control = Text format, let's execute the changes!
|
||||
rename:
|
||||
for (int i = 0; i < itemsToRename; i++)
|
||||
{
|
||||
string[] SplitString = stringdata[i].Split(new[] {" = "}, StringSplitOptions.None);
|
||||
if (SplitString.Length < 2)
|
||||
continue; // Error in Input, errhandled
|
||||
string ctrl = SplitString[0]; // Control to change the text of...
|
||||
string text = SplitString[1]; // Text to set Control.Text to...
|
||||
Control[] controllist = form.Controls.Find(ctrl, true);
|
||||
if (controllist.Length != 0) // If Control is found
|
||||
{ controllist[0].Text = text; goto next; }
|
||||
if (start < 0)
|
||||
return;
|
||||
|
||||
// Rename Window Title
|
||||
string[] WindowName = rawlist[start].Split(new[] {" = "}, StringSplitOptions.None);
|
||||
if (WindowName.Length > 1) form.Text = WindowName[1];
|
||||
|
||||
// Check MenuStrips
|
||||
foreach (MenuStrip menu in form.Controls.OfType<MenuStrip>())
|
||||
{
|
||||
// Menu Items aren't in the Form's Control array. Find within the menu's Control array.
|
||||
ToolStripItem[] TSI = menu.Items.Find(ctrl, true);
|
||||
if (TSI.Length <= 0) continue;
|
||||
|
||||
TSI[0].Text = text; goto next;
|
||||
}
|
||||
// Check ContextMenuStrips
|
||||
foreach (ContextMenuStrip cs in FindContextMenuStrips(form.Controls.OfType<Control>()).Distinct())
|
||||
{
|
||||
ToolStripItem[] TSI = cs.Items.Find(ctrl, true);
|
||||
if (TSI.Length <= 0) continue;
|
||||
// Fetch controls to rename
|
||||
for (int i = start + 1; i < rawlist.Length; i++)
|
||||
{
|
||||
if (rawlist[i].Length == 0) continue; // Skip Over Empty Lines, errhandled
|
||||
if (rawlist[i][0] == '-') continue; // Keep translating if line is a comment line
|
||||
if (rawlist[i][0] == '!') // Stop if we have reached the end of translation
|
||||
break;
|
||||
stringdata.Add(rawlist[i]); // Add the entry to process later.
|
||||
}
|
||||
|
||||
TSI[0].Text = text; goto next;
|
||||
}
|
||||
if (stringdata.Count == 0)
|
||||
return;
|
||||
|
||||
next:;
|
||||
// Find control then change display Text.
|
||||
foreach (string str in stringdata)
|
||||
{
|
||||
string[] SplitString = str.Split(new[] {" = "}, StringSplitOptions.None);
|
||||
if (SplitString.Length < 2)
|
||||
continue;
|
||||
|
||||
object c = FindControl(SplitString[0], form.Controls); // Find control within Form's controls
|
||||
if (c == null) // Not found
|
||||
continue;
|
||||
|
||||
string text = SplitString[1]; // Text to set Control.Text to...
|
||||
|
||||
if (c is Control)
|
||||
(c as Control).Text = text;
|
||||
else if (c is ToolStripItem)
|
||||
(c as ToolStripItem).Text = text;
|
||||
}
|
||||
}
|
||||
internal static List<ContextMenuStrip> FindContextMenuStrips(IEnumerable<Control> c)
|
||||
private static object FindControl(string name, Control.ControlCollection c)
|
||||
{
|
||||
Control control = c.Find(name, true).FirstOrDefault();
|
||||
if (control != null)
|
||||
return control;
|
||||
foreach (MenuStrip menu in c.OfType<MenuStrip>())
|
||||
{
|
||||
var item = menu.Items.Find(name, true).FirstOrDefault();
|
||||
if (item != null)
|
||||
return item;
|
||||
}
|
||||
foreach (ContextMenuStrip strip in FindContextMenuStrips(c.OfType<Control>()))
|
||||
{
|
||||
var item = strip.Items.Find(name, true).FirstOrDefault();
|
||||
if (item != null)
|
||||
return item;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
private static List<ContextMenuStrip> FindContextMenuStrips(IEnumerable<Control> c)
|
||||
{
|
||||
List<ContextMenuStrip> cs = new List<ContextMenuStrip>();
|
||||
foreach (Control control in c)
|
||||
@@ -473,57 +485,5 @@ internal static List<cbItem> getUnsortedCBList(string textfile)
|
||||
}
|
||||
return cbList;
|
||||
}
|
||||
|
||||
// QR Utility
|
||||
internal static byte[] getQRData()
|
||||
{
|
||||
// Fetch data from QR code...
|
||||
string address;
|
||||
try { address = Clipboard.GetText(); }
|
||||
catch { Alert("No text (url) in clipboard."); return null; }
|
||||
try { if (address.Length < 4 || address.Substring(0, 3) != "htt") { Alert("Clipboard text is not a valid URL:", address); return null; } }
|
||||
catch { Alert("Clipboard text is not a valid URL:", address); return null; }
|
||||
string webURL = "http://api.qrserver.com/v1/read-qr-code/?fileurl=" + System.Web.HttpUtility.UrlEncode(address);
|
||||
try
|
||||
{
|
||||
System.Net.HttpWebRequest httpWebRequest = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(webURL);
|
||||
System.Net.HttpWebResponse httpWebReponse = (System.Net.HttpWebResponse)httpWebRequest.GetResponse();
|
||||
var reader = new StreamReader(httpWebReponse.GetResponseStream());
|
||||
string data = reader.ReadToEnd();
|
||||
if (data.Contains("could not find")) { Alert("Reader could not find QR data in the image."); return null; }
|
||||
if (data.Contains("filetype not supported")) { Alert("Input URL is not valid. Double check that it is an image (jpg/png).", address); return null; }
|
||||
// Quickly convert the json response to a data string
|
||||
string pkstr = data.Substring(data.IndexOf("#", StringComparison.Ordinal) + 1); // Trim intro
|
||||
pkstr = pkstr.Substring(0, pkstr.IndexOf("\",\"error\":null}]}]", StringComparison.Ordinal)); // Trim outro
|
||||
if (pkstr.Contains("nQR-Code:")) pkstr = pkstr.Substring(0, pkstr.IndexOf("nQR-Code:", StringComparison.Ordinal)); // Remove multiple QR codes in same image
|
||||
pkstr = pkstr.Replace("\\", ""); // Rectify response
|
||||
|
||||
try { return Convert.FromBase64String(pkstr); }
|
||||
catch { Alert("QR string to Data failed.", pkstr); return null; }
|
||||
}
|
||||
catch { Alert("Unable to connect to the internet to decode QR code."); return null;}
|
||||
}
|
||||
internal static Image getQRImage(byte[] data, string server)
|
||||
{
|
||||
string qrdata = Convert.ToBase64String(data);
|
||||
string message = server + qrdata;
|
||||
string webURL = "http://chart.apis.google.com/chart?chs=365x365&cht=qr&chl=" + System.Web.HttpUtility.UrlEncode(message);
|
||||
|
||||
try
|
||||
{
|
||||
System.Net.HttpWebRequest httpWebRequest = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(webURL);
|
||||
System.Net.HttpWebResponse httpWebReponse = (System.Net.HttpWebResponse)httpWebRequest.GetResponse();
|
||||
Stream stream = httpWebReponse.GetResponseStream();
|
||||
if (stream != null) return Image.FromStream(stream);
|
||||
}
|
||||
catch
|
||||
{
|
||||
if (DialogResult.Yes != Prompt(MessageBoxButtons.YesNo, "Unable to connect to the internet to receive QR code.", "Copy QR URL to Clipboard?"))
|
||||
return null;
|
||||
try { Clipboard.SetText(webURL); }
|
||||
catch { Alert("Failed to set text to Clipboard"); }
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
41
MysteryGifts/MysteryGift.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace PKHeX
|
||||
{
|
||||
public abstract class MysteryGift
|
||||
{
|
||||
internal static MysteryGift getMysteryGift(byte[] data, string ext)
|
||||
{
|
||||
if (data.Length == WC6.SizeFull && ext == ".wc6full")
|
||||
return new WC6(data);
|
||||
if (data.Length == WC6.Size && ext == ".wc6")
|
||||
return new WC6(data);
|
||||
if (data.Length == PGF.Size && ext == ".pgf")
|
||||
return new PGF(data);
|
||||
if (data.Length == PGT.Size && ext == ".pgt")
|
||||
return new PGT(data);
|
||||
if (data.Length == PCD.Size && ext == ".pcd")
|
||||
return new PCD(data);
|
||||
return null;
|
||||
}
|
||||
|
||||
public abstract string Extension { get; }
|
||||
public virtual byte[] Data { get; set; }
|
||||
public abstract PKM convertToPKM(SaveFile SAV);
|
||||
|
||||
// Properties
|
||||
public abstract bool GiftUsed { get; set; }
|
||||
public abstract string CardTitle { get; set; }
|
||||
public abstract int CardID { get; set; }
|
||||
|
||||
public abstract bool IsItem { get; set; }
|
||||
public abstract int Item { get; set; }
|
||||
|
||||
public abstract bool IsPokémon { get; set; }
|
||||
public virtual int Quantity { get { return 1; } set { } }
|
||||
public bool Empty => Data.SequenceEqual(new byte[Data.Length]);
|
||||
|
||||
public string getCardHeader() => (CardID > 0 ? $"Card #: {CardID.ToString("0000")}" : "N/A") + $" - {CardTitle.Trim()}" + Environment.NewLine;
|
||||
}
|
||||
}
|
||||
@@ -3,14 +3,16 @@
|
||||
|
||||
namespace PKHeX
|
||||
{
|
||||
public class PGF
|
||||
public class PGF : MysteryGift
|
||||
{
|
||||
internal const int Size = 0xCC;
|
||||
public override string Extension => ".pgf";
|
||||
|
||||
public byte[] Data;
|
||||
public PGF(byte[] data = null)
|
||||
{
|
||||
Data = data ?? new byte[Size];
|
||||
Data = (byte[])(data?.Clone() ?? new byte[Size]);
|
||||
if (data == null) Data = new byte[Size];
|
||||
else Data = (byte[])data.Clone();
|
||||
}
|
||||
|
||||
public ushort TID { get { return BitConverter.ToUInt16(Data, 0x00); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x00); } }
|
||||
@@ -49,7 +51,7 @@ public PGF(byte[] data = null)
|
||||
public int Language { get { return Data[0x1D]; } set { Data[0x1D] = (byte)value; } }
|
||||
public string Nickname
|
||||
{
|
||||
get { return PKM.TrimFromFFFF(Encoding.Unicode.GetString(Data, 0x1E, 0x16)); }
|
||||
get { return PKX.TrimFromFFFF(Encoding.Unicode.GetString(Data, 0x1E, 0x16)); }
|
||||
set { Encoding.Unicode.GetBytes(value.PadRight(0xB, (char)0xFFFF)).CopyTo(Data, 0x1E); }
|
||||
}
|
||||
public int Nature { get { return Data[0x34]; } set { Data[0x34] = (byte)value; } }
|
||||
@@ -73,27 +75,32 @@ public string Nickname
|
||||
public int IV_SPD { get { return Data[0x48]; } set { Data[0x48] = (byte)value; } }
|
||||
// Unused 0x49
|
||||
public string OT {
|
||||
get { return PKM.TrimFromFFFF(Encoding.Unicode.GetString(Data, 0x4A, 0x10)); }
|
||||
get { return PKX.TrimFromFFFF(Encoding.Unicode.GetString(Data, 0x4A, 0x10)); }
|
||||
set { Encoding.Unicode.GetBytes(value.PadRight(0x08, (char)0xFFFF)).CopyTo(Data, 0x4A); } }
|
||||
public int OTGender { get { return Data[0x5A]; } set { Data[0x5A] = (byte)value; } }
|
||||
public int Level { get { return Data[0x5B]; } set { Data[0x5C] = (byte)value; } }
|
||||
public bool IsEgg { get { return Data[0x5C] == 1; } set { Data[0x5C] = (byte)(value ? 1 : 0); } }
|
||||
// Unused 0x5D 0x5E 0x5F
|
||||
public override string CardTitle
|
||||
{
|
||||
get { return PKX.TrimFromFFFF(Encoding.Unicode.GetString(Data, 0x60, 0x4A)); }
|
||||
set { Encoding.Unicode.GetBytes((value + '\uFFFF').PadRight(0x4A/2, '\0')).CopyTo(Data, 0x60); }
|
||||
}
|
||||
|
||||
// Card Attributes
|
||||
public ushort Item { get { return BitConverter.ToUInt16(Data, 0x00); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x00); } }
|
||||
public override int Item { get { return BitConverter.ToUInt16(Data, 0x00); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x00); } }
|
||||
|
||||
public ushort Year { get { return BitConverter.ToUInt16(Data, 0xAE); } set { BitConverter.GetBytes(value).CopyTo(Data, 0xAE); } }
|
||||
public byte Month { get { return Data[0xAD]; } set { Data[0xAD] = value; } }
|
||||
public byte Day { get { return Data[0xAC]; } set { Data[0xAC] = value; } }
|
||||
public int CardID
|
||||
public override int CardID
|
||||
{
|
||||
get { return BitConverter.ToUInt16(Data, 0xB0); }
|
||||
set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0xB0); }
|
||||
}
|
||||
public int CardLocation { get { return Data[0xB2]; } set { Data[0xB2] = (byte)value; } }
|
||||
public int CardType { get { return Data[0xB3]; } set { Data[0xB3] = (byte)value; } }
|
||||
public bool GiftUsed { get { return Data[0xB4] >> 1 > 0; } set { Data[0xB4] = (byte)(Data[0xB4] & ~2 | (value ? 2 : 0)); } }
|
||||
public override bool GiftUsed { get { return Data[0xB4] >> 1 > 0; } set { Data[0xB4] = (byte)(Data[0xB4] & ~2 | (value ? 2 : 0)); } }
|
||||
public bool MultiObtain { get { return Data[0xB4] == 1; } set { Data[0xB4] = (byte)(value ? 1 : 0); } }
|
||||
|
||||
// Meta Accessible Properties
|
||||
@@ -111,11 +118,11 @@ public int[] Moves
|
||||
if (value.Length > 3) Move4 = value[3];
|
||||
}
|
||||
}
|
||||
public bool IsPokémon { get { return CardType == 1; } set { if (value) CardType = 1; } }
|
||||
public bool IsItem { get { return CardType == 2; } set { if (value) CardType = 2; } }
|
||||
public override bool IsPokémon { get { return CardType == 1; } set { if (value) CardType = 1; } }
|
||||
public override bool IsItem { get { return CardType == 2; } set { if (value) CardType = 2; } }
|
||||
public bool IsPower { get { return CardType == 3; } set { if (value) CardType = 3; } }
|
||||
|
||||
public PK5 convertToPK5(SAV6 SAV)
|
||||
public override PKM convertToPKM(SaveFile SAV)
|
||||
{
|
||||
if (!IsPokémon)
|
||||
return null;
|
||||
@@ -179,21 +186,21 @@ public PK5 convertToPK5(SAV6 SAV)
|
||||
RIB7_3 = RIB1_5, // National Champ Ribbon
|
||||
RIB2_5 = RIB1_6, // World Champ Ribbon
|
||||
|
||||
Friendship = PKX.getBaseFriendship(Species),
|
||||
OT_Friendship = PKX.getBaseFriendship(Species),
|
||||
FatefulEncounter = true,
|
||||
};
|
||||
if (OTGender == 3) // User's
|
||||
{
|
||||
pk.TID = 12345;
|
||||
pk.SID = 54321;
|
||||
pk.OT_Name = "PKHeX";
|
||||
pk.TID = SAV.TID;
|
||||
pk.SID = SAV.SID;
|
||||
pk.OT_Name = SAV.OT;
|
||||
pk.OT_Gender = 1; // Red PKHeX OT
|
||||
}
|
||||
else
|
||||
{
|
||||
pk.TID = TID;
|
||||
pk.SID = SID;
|
||||
pk.OT_Name = OT.Length > 0 ? OT : "PKHeX";
|
||||
pk.TID = IsEgg ? SAV.TID : TID;
|
||||
pk.SID = IsEgg ? SAV.SID : SID;
|
||||
pk.OT_Name = OT.Length > 0 ? OT : SAV.OT;
|
||||
pk.OT_Gender = OTGender % 2; // %2 just in case?
|
||||
}
|
||||
pk.IsNicknamed = IsNicknamed;
|
||||
209
MysteryGifts/PGT.cs
Normal file
@@ -0,0 +1,209 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace PKHeX
|
||||
{
|
||||
/* Big thanks to Grovyle91's Pokémon Mystery Gift Editor, from which the structure was referenced.
|
||||
* http://projectpokemon.org/forums/member.php?829-Grovyle91
|
||||
* http://projectpokemon.org/forums/showthread.php?6524
|
||||
* See also: http://tccphreak.shiny-clique.net/debugger/pcdfiles.htm
|
||||
*/
|
||||
public class PCD : MysteryGift
|
||||
{
|
||||
internal const int Size = 0x358; // 856
|
||||
public override string Extension => ".pcd";
|
||||
|
||||
public PCD(byte[] data = null)
|
||||
{
|
||||
Data = (byte[])(data?.Clone() ?? new byte[Size]);
|
||||
|
||||
byte[] giftData = new byte[PGT.Size];
|
||||
Array.Copy(Data, 0, giftData, 0, PGT.Size);
|
||||
Gift = new PGT(giftData);
|
||||
|
||||
Information = new byte[Data.Length - PGT.Size];
|
||||
Array.Copy(Data, PGT.Size, Information, 0, Information.Length);
|
||||
}
|
||||
public readonly PGT Gift;
|
||||
|
||||
public readonly byte[] Information;
|
||||
public override bool GiftUsed { get { return Gift.GiftUsed; } set { Gift.GiftUsed = value; } }
|
||||
public override bool IsPokémon { get { return Gift.IsPokémon; } set { Gift.IsPokémon = value; } }
|
||||
public override bool IsItem { get { return Gift.IsItem; } set { Gift.IsItem = value; } }
|
||||
public override int Item { get { return Gift.Item; } set { Gift.Item = value; } }
|
||||
public override int CardID
|
||||
{
|
||||
get { return BitConverter.ToUInt16(Data, 0x150); }
|
||||
set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x150); }
|
||||
}
|
||||
public override string CardTitle
|
||||
{
|
||||
get { return PKX.array2strG4(Data.Skip(0x104).Take(0x48).ToArray()); }
|
||||
set
|
||||
{
|
||||
byte[] data = PKX.str2arrayG4(value);
|
||||
int len = data.Length;
|
||||
Array.Resize(ref data, 0x48);
|
||||
for (int i = 0; i < len; i++)
|
||||
data[i] = 0xFF;
|
||||
data.CopyTo(Data, 0x104);
|
||||
}
|
||||
}
|
||||
|
||||
public override PKM convertToPKM(SaveFile SAV)
|
||||
{
|
||||
return Gift.convertToPKM(SAV);
|
||||
}
|
||||
}
|
||||
public class PGT : MysteryGift
|
||||
{
|
||||
internal const int Size = 0x104; // 260
|
||||
public override string Extension => ".pgt";
|
||||
|
||||
private enum GiftType
|
||||
{
|
||||
Pokémon = 1,
|
||||
PokémonEgg = 2,
|
||||
Item = 3,
|
||||
Rule = 4,
|
||||
Seal = 5,
|
||||
Accessory = 6,
|
||||
ManaphyEgg = 7,
|
||||
MemberCard = 8,
|
||||
OaksLetter = 9,
|
||||
AzureFlute = 10,
|
||||
PokétchApp = 11,
|
||||
Ribbon = 12,
|
||||
PokéWalkerArea = 14
|
||||
}
|
||||
|
||||
public override string CardTitle { get { return "Raw Gift (PGT)"; } set { } }
|
||||
public override int CardID { get { return -1; } set { } }
|
||||
public override bool GiftUsed { get { return false; } set { } }
|
||||
|
||||
public PGT(byte[] data = null)
|
||||
{
|
||||
refreshData((byte[])(data?.Clone() ?? new byte[Size]));
|
||||
}
|
||||
public void refreshData(byte[] data)
|
||||
{
|
||||
byte[] ekdata = new byte[PKX.SIZE_4PARTY];
|
||||
Array.Copy(data, 8, ekdata, 0, ekdata.Length);
|
||||
bool empty = ekdata.SequenceEqual(new byte[ekdata.Length]);
|
||||
PK = new PK4(empty ? ekdata : PKX.decryptArray45(ekdata));
|
||||
|
||||
Unknown = new byte[0x10];
|
||||
Array.Copy(data, 0xF4, Unknown, 0, 0x10);
|
||||
RAW = data;
|
||||
}
|
||||
|
||||
public byte CardType { get { return Data[0]; } set { Data[0] = value; } }
|
||||
// Unused 0x01
|
||||
public byte Slot { get { return Data[2]; } set { Data[2] = value; } }
|
||||
public byte Detail { get { return Data[3]; } set { Data[3] = value; } }
|
||||
public override int Item { get { return BitConverter.ToUInt16(Data, 0x4); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x4); } }
|
||||
private PK4 PK;
|
||||
private byte[] Unknown;
|
||||
private byte[] RAW;
|
||||
|
||||
public override byte[] Data
|
||||
{
|
||||
get { return RAW; }
|
||||
set
|
||||
{
|
||||
refreshData(value);
|
||||
}
|
||||
}
|
||||
|
||||
private GiftType Type { get { return (GiftType)Data[0]; } set {Data[0] = (byte)value; } }
|
||||
public bool IsHatched => Type == GiftType.Pokémon;
|
||||
public bool IsEgg => Type == GiftType.PokémonEgg;
|
||||
public bool IsManaphyEgg => Type == GiftType.ManaphyEgg;
|
||||
public override bool IsItem { get { return Type == GiftType.Item; } set { if (value) CardType = (int)GiftType.Item; } }
|
||||
public override bool IsPokémon { get { return Type == GiftType.Pokémon || Type == GiftType.PokémonEgg || Type == GiftType.ManaphyEgg; } set { } }
|
||||
|
||||
public override PKM convertToPKM(SaveFile SAV)
|
||||
{
|
||||
if (!IsPokémon)
|
||||
return null;
|
||||
|
||||
PK4 pk4 = new PK4(PK.Data);
|
||||
if (!IsHatched && Detail == 0)
|
||||
{
|
||||
pk4.OT_Name = SAV.OT;
|
||||
pk4.TID = SAV.TID;
|
||||
pk4.SID = SAV.SID;
|
||||
pk4.OT_Gender = SAV.Gender;
|
||||
}
|
||||
if (IsManaphyEgg)
|
||||
{
|
||||
// Since none of this data is populated, fill in default info.
|
||||
pk4.Species = 490;
|
||||
// Level 1 Moves
|
||||
pk4.Move1 = 294;
|
||||
pk4.Move2 = 145;
|
||||
pk4.Move3 = 346;
|
||||
pk4.FatefulEncounter = true;
|
||||
pk4.Ball = 4;
|
||||
pk4.Version = 10; // Diamond
|
||||
pk4.Language = 2; // English
|
||||
pk4.Nickname = "MANAPHY";
|
||||
pk4.Egg_Location = 1; // Ranger (will be +3000 later)
|
||||
}
|
||||
|
||||
// Generate IV
|
||||
uint seed = Util.rnd32();
|
||||
if (pk4.PID == 1 || IsManaphyEgg) // Create Nonshiny
|
||||
{
|
||||
uint pid1 = PKX.LCRNG(ref seed) >> 16;
|
||||
uint pid2 = PKX.LCRNG(ref seed) >> 16;
|
||||
|
||||
while ((pid1 ^ pid2 ^ pk4.TID ^ pk4.SID) < 8)
|
||||
{
|
||||
uint testPID = pid1 | pid2 << 16;
|
||||
|
||||
// Call the ARNG to change the PID
|
||||
testPID = testPID * 0x6c078965 + 1;
|
||||
|
||||
pid1 = testPID & 0xFFFF;
|
||||
pid2 = testPID >> 16;
|
||||
}
|
||||
pk4.PID = pid1 | (pid2 << 16);
|
||||
}
|
||||
|
||||
// Generate IVs
|
||||
if (pk4.IV32 == 0)
|
||||
{
|
||||
uint iv1 = PKX.LCRNG(ref seed) >> 16;
|
||||
uint iv2 = PKX.LCRNG(ref seed) >> 16;
|
||||
pk4.IV32 = (iv1 | iv2 << 16) & 0x3FFFFFFF;
|
||||
}
|
||||
|
||||
// Generate Met Info
|
||||
DateTime dt = DateTime.Now;
|
||||
if (IsPokémon)
|
||||
{
|
||||
pk4.Met_Location = pk4.Egg_Location + 3000;
|
||||
pk4.Egg_Location = 0;
|
||||
pk4.Met_Day = dt.Day;
|
||||
pk4.Met_Month = dt.Month;
|
||||
pk4.Met_Year = dt.Year - 2000;
|
||||
pk4.IsEgg = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
pk4.Egg_Location = pk4.Egg_Location + 3000;
|
||||
pk4.Egg_Day = dt.Day;
|
||||
pk4.Egg_Month = dt.Month;
|
||||
pk4.Egg_Year = dt.Year - 2000;
|
||||
pk4.IsEgg = false;
|
||||
// Met Location is modified when transferred to pk5; don't worry about it.
|
||||
}
|
||||
if (pk4.Species == 201) // Never will be true; Unown was never distributed.
|
||||
pk4.AltForm = PKX.getUnownForm(pk4.PID);
|
||||
if (IsEgg || IsManaphyEgg)
|
||||
pk4.IsEgg = true;
|
||||
return pk4;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,16 +4,16 @@
|
||||
|
||||
namespace PKHeX
|
||||
{
|
||||
public partial class WC6
|
||||
public class WC6 : MysteryGift
|
||||
{
|
||||
internal const int Size = 0x108;
|
||||
internal const int SizeFull = 0x310;
|
||||
internal const uint EonTicketConst = 0x225D73C2;
|
||||
public override string Extension => ".wc6";
|
||||
|
||||
public readonly byte[] Data;
|
||||
public WC6(byte[] data = null)
|
||||
{
|
||||
Data = data ?? new byte[Size];
|
||||
Data = (byte[])(data?.Clone() ?? new byte[Size]);
|
||||
if (Data.Length == SizeFull)
|
||||
{
|
||||
Data = Data.Skip(SizeFull - Size).ToArray();
|
||||
@@ -23,12 +23,12 @@ public WC6(byte[] data = null)
|
||||
Day = (uint)now.Day;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// General Card Properties
|
||||
public int CardID {
|
||||
public override int CardID {
|
||||
get { return BitConverter.ToUInt16(Data, 0); }
|
||||
set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0); } }
|
||||
public string CardTitle { // Max len 36 char, followed by null terminator
|
||||
public override string CardTitle { // Max len 36 char, followed by null terminator
|
||||
get { return Util.TrimFromZero(Encoding.Unicode.GetString(Data, 2, 72)); }
|
||||
set { Encoding.Unicode.GetBytes(value.PadRight(36, '\0')).CopyTo(Data, 2); } }
|
||||
private uint Date {
|
||||
@@ -46,20 +46,20 @@ public WC6(byte[] data = null)
|
||||
public int CardLocation { get { return Data[0x50]; } set { Data[0x50] = (byte)value; } }
|
||||
|
||||
public int CardType { get { return Data[0x51]; } set { Data[0x51] = (byte)value; } }
|
||||
public bool GiftUsed { get { return Data[0x52] >> 1 > 0; } set { Data[0x52] = (byte)(Data[0x52] & ~2 | (value ? 2 : 0)); } }
|
||||
public override bool GiftUsed { get { return Data[0x52] >> 1 > 0; } set { Data[0x52] = (byte)(Data[0x52] & ~2 | (value ? 2 : 0)); } }
|
||||
public bool MultiObtain { get { return Data[0x53] == 1; } set { Data[0x53] = (byte)(value ? 1 : 0); } }
|
||||
|
||||
// Item Properties
|
||||
public bool IsItem { get { return CardType == 1; } set { if (value) CardType = 1; } }
|
||||
public int Item {
|
||||
public override bool IsItem { get { return CardType == 1; } set { if (value) CardType = 1; } }
|
||||
public override int Item {
|
||||
get { return BitConverter.ToUInt16(Data, 0x68); }
|
||||
set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x68); } }
|
||||
public int Quantity {
|
||||
public override int Quantity {
|
||||
get { return BitConverter.ToUInt16(Data, 0x70); }
|
||||
set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x70); } }
|
||||
|
||||
// Pokémon Properties
|
||||
public bool IsPokémon { get { return CardType == 0; } set { if (value) CardType = 0; } }
|
||||
public override bool IsPokémon { get { return CardType == 0; } set { if (value) CardType = 0; } }
|
||||
public int TID {
|
||||
get { return BitConverter.ToUInt16(Data, 0x68); }
|
||||
set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x68); } }
|
||||
@@ -207,7 +207,7 @@ public int[] RelearnMoves
|
||||
}
|
||||
}
|
||||
|
||||
public PK6 convertToPK6(SAV6 SAV)
|
||||
public override PKM convertToPKM(SaveFile SAV)
|
||||
{
|
||||
if (!IsPokémon)
|
||||
return null;
|
||||
101
PKHeX.csproj
@@ -71,24 +71,34 @@
|
||||
<Compile Include="Legality\Checks.cs" />
|
||||
<Compile Include="Legality\Core.cs" />
|
||||
<Compile Include="Legality\Data.cs" />
|
||||
<Compile Include="Misc\PGT.cs" />
|
||||
<Compile Include="Misc\PK3.cs" />
|
||||
<Compile Include="Misc\PK4.cs" />
|
||||
<Compile Include="Legality\Tables3.cs" />
|
||||
<Compile Include="Legality\Tables5.cs" />
|
||||
<Compile Include="Legality\Tables4.cs" />
|
||||
<Compile Include="MysteryGifts\MysteryGift.cs" />
|
||||
<Compile Include="PKM\PKM.cs" />
|
||||
<Compile Include="PKM\PKMConverter.cs" />
|
||||
<Compile Include="PKM\ShowdownSet.cs" />
|
||||
<Compile Include="MysteryGifts\PGT.cs" />
|
||||
<Compile Include="PKM\PK3.cs" />
|
||||
<Compile Include="PKM\PK4.cs" />
|
||||
<Compile Include="Legality\Tables.cs" />
|
||||
<Compile Include="Misc\PGF.cs" />
|
||||
<Compile Include="Misc\PK5.cs" />
|
||||
<Compile Include="Misc\PK6.cs" />
|
||||
<Compile Include="Misc\PKM.cs" />
|
||||
<Compile Include="MysteryGifts\PGF.cs" />
|
||||
<Compile Include="PKM\PK5.cs" />
|
||||
<Compile Include="PKM\PK6.cs" />
|
||||
<Compile Include="Misc\QR.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Misc\QR.Designer.cs">
|
||||
<DependentUpon>QR.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Misc\SAV4.cs" />
|
||||
<Compile Include="Misc\SAV5.cs" />
|
||||
<Compile Include="Misc\SAV6.cs" />
|
||||
<Compile Include="Misc\WC6.cs" />
|
||||
<Compile Include="Saves\BlockInfo.cs" />
|
||||
<Compile Include="Saves\Inventory.cs" />
|
||||
<Compile Include="Saves\SAV3.cs" />
|
||||
<Compile Include="Saves\SAV4.cs" />
|
||||
<Compile Include="Saves\SAV5.cs" />
|
||||
<Compile Include="Saves\SAV6.cs" />
|
||||
<Compile Include="Saves\SaveFile.cs" />
|
||||
<Compile Include="MysteryGifts\WC6.cs" />
|
||||
<Compile Include="PKX\f2-Text.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -101,7 +111,7 @@
|
||||
<Compile Include="Misc\About.Designer.cs">
|
||||
<DependentUpon>About.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Misc\PKX.cs" />
|
||||
<Compile Include="PKM\PKX.cs" />
|
||||
<Compile Include="PKX\f1-Main.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -125,11 +135,13 @@
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SAV\SAV_BerryFieldORAS.cs">
|
||||
<Compile Include="Saves\SaveObjects.cs" />
|
||||
<Compile Include="Saves\SaveUtil.cs" />
|
||||
<Compile Include="SAV\SAV_PokeBlockORAS.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="SAV\SAV_BerryFieldORAS.Designer.cs">
|
||||
<DependentUpon>SAV_BerryFieldORAS.cs</DependentUpon>
|
||||
<Compile Include="SAV\SAV_PokeBlockORAS.Designer.cs">
|
||||
<DependentUpon>SAV_PokeBlockORAS.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SAV\SAV_Database.cs">
|
||||
<SubType>Form</SubType>
|
||||
@@ -149,11 +161,11 @@
|
||||
<Compile Include="SAV\SAV_SecretBase.Designer.cs">
|
||||
<DependentUpon>SAV_SecretBase.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SAV\SAV_EventFlagsORAS.cs">
|
||||
<Compile Include="SAV\SAV_EventFlags.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="SAV\SAV_EventFlagsORAS.Designer.cs">
|
||||
<DependentUpon>SAV_EventFlagsORAS.cs</DependentUpon>
|
||||
<Compile Include="SAV\SAV_EventFlags.Designer.cs">
|
||||
<DependentUpon>SAV_EventFlags.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SAV\frmReport.cs">
|
||||
<SubType>Form</SubType>
|
||||
@@ -175,12 +187,6 @@
|
||||
<Compile Include="SAV\SAV_BoxLayout.Designer.cs">
|
||||
<DependentUpon>SAV_BoxLayout.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SAV\SAV_EventFlagsXY.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="SAV\SAV_EventFlagsXY.Designer.cs">
|
||||
<DependentUpon>SAV_EventFlagsXY.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SAV\SAV_HallOfFame.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -211,6 +217,12 @@
|
||||
<Compile Include="SAV\SAV_Pokepuff.Designer.cs">
|
||||
<DependentUpon>SAV_Pokepuff.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SAV\SAV_SimpleTrainer.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="SAV\SAV_SimpleTrainer.Designer.cs">
|
||||
<DependentUpon>SAV_SimpleTrainer.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SAV\SAV_SuperTrain.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -238,12 +250,14 @@
|
||||
<Compile Include="Misc\Util.cs" />
|
||||
<EmbeddedResource Include="Misc\QR.resx">
|
||||
<DependentUpon>QR.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="PKX\f2-Text.resx">
|
||||
<DependentUpon>f2-Text.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Misc\About.resx">
|
||||
<DependentUpon>About.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="PKX\f1-Main.resx">
|
||||
<DependentUpon>f1-Main.cs</DependentUpon>
|
||||
@@ -255,8 +269,8 @@
|
||||
<EmbeddedResource Include="PKX\f3-MemoryAmie.resx">
|
||||
<DependentUpon>f3-MemoryAmie.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="SAV\SAV_BerryFieldORAS.resx">
|
||||
<DependentUpon>SAV_BerryFieldORAS.cs</DependentUpon>
|
||||
<EmbeddedResource Include="SAV\SAV_PokeBlockORAS.resx">
|
||||
<DependentUpon>SAV_PokeBlockORAS.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="SAV\SAV_Database.resx">
|
||||
<DependentUpon>SAV_Database.cs</DependentUpon>
|
||||
@@ -267,8 +281,8 @@
|
||||
<EmbeddedResource Include="SAV\SAV_SecretBase.resx">
|
||||
<DependentUpon>SAV_SecretBase.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="SAV\SAV_EventFlagsORAS.resx">
|
||||
<DependentUpon>SAV_EventFlagsORAS.cs</DependentUpon>
|
||||
<EmbeddedResource Include="SAV\SAV_EventFlags.resx">
|
||||
<DependentUpon>SAV_EventFlags.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="SAV\frmReport.resx">
|
||||
<DependentUpon>frmReport.cs</DependentUpon>
|
||||
@@ -284,9 +298,6 @@
|
||||
<EmbeddedResource Include="SAV\SAV_BoxLayout.resx">
|
||||
<DependentUpon>SAV_BoxLayout.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="SAV\SAV_EventFlagsXY.resx">
|
||||
<DependentUpon>SAV_EventFlagsXY.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="SAV\SAV_HallOfFame.resx">
|
||||
<DependentUpon>SAV_HallOfFame.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
@@ -302,6 +313,9 @@
|
||||
<EmbeddedResource Include="SAV\SAV_Pokepuff.resx">
|
||||
<DependentUpon>SAV_Pokepuff.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="SAV\SAV_SimpleTrainer.resx">
|
||||
<DependentUpon>SAV_SimpleTrainer.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="SAV\SAV_SuperTrain.resx">
|
||||
<DependentUpon>SAV_SuperTrain.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
@@ -313,6 +327,7 @@
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Misc\SplashScreen.resx">
|
||||
<DependentUpon>SplashScreen.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<None Include="app.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
@@ -370,6 +385,27 @@
|
||||
<None Include="Resources\byte\wc6full.pkl" />
|
||||
<None Include="Resources\img\warn.png" />
|
||||
<None Include="Resources\img\valid.png" />
|
||||
<None Include="Resources\img\Program\about.png" />
|
||||
<None Include="Resources\img\Program\bak.png" />
|
||||
<None Include="Resources\img\Program\database.png" />
|
||||
<None Include="Resources\img\Program\exit.png" />
|
||||
<None Include="Resources\img\Program\export.png" />
|
||||
<None Include="Resources\img\Program\import.png" />
|
||||
<None Include="Resources\img\Program\language.png" />
|
||||
<None Include="Resources\img\Program\open.png" />
|
||||
<None Include="Resources\img\Program\other.png" />
|
||||
<None Include="Resources\img\Program\report.png" />
|
||||
<None Include="Resources\img\Program\savePKM.png" />
|
||||
<None Include="Resources\img\Program\saveSAV.png" />
|
||||
<None Include="Resources\img\Program\settings-16.png" />
|
||||
<None Include="Resources\img\Program\settings.png" />
|
||||
<None Include="Resources\img\Program\nocheck.png" />
|
||||
<None Include="Resources\img\Program\load.png" />
|
||||
<None Include="Resources\img\Program\data.png" />
|
||||
<None Include="Resources\img\Program\dump.png" />
|
||||
<None Include="Resources\img\Program\showdown.png" />
|
||||
<None Include="Resources\img\Program\folder.png" />
|
||||
<None Include="Resources\img\Program\main.png" />
|
||||
<Content Include="Resources\text\de\text_Pokeblock_de.txt" />
|
||||
<None Include="Resources\text\de\text_tradeao_de.txt" />
|
||||
<None Include="Resources\text\de\text_tradexy_de.txt" />
|
||||
@@ -391,6 +427,9 @@
|
||||
<Content Include="Resources\text\ko\text_Pokeblock_ko.txt" />
|
||||
<None Include="Resources\text\ko\text_tradeao_ko.txt" />
|
||||
<None Include="Resources\text\ko\text_tradexy_ko.txt" />
|
||||
<None Include="Resources\text\other\const_oras.txt" />
|
||||
<None Include="Resources\text\other\flags_oras.txt" />
|
||||
<None Include="Resources\text\other\flags_xy.txt" />
|
||||
<Content Include="Resources\text\zh\text_Pokeblock_zh.txt" />
|
||||
<None Include="Resources\text\it\lang_it.txt" />
|
||||
<None Include="Resources\img\Pokemon Sprites\414-2.png" />
|
||||
|
||||
306
PKM/PK3.cs
Normal file
@@ -0,0 +1,306 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace PKHeX
|
||||
{
|
||||
public class PK3 : PKM // 3rd Generation PKM File
|
||||
{
|
||||
internal static readonly byte[] ExtraBytes =
|
||||
{
|
||||
0x2A, 0x2B
|
||||
};
|
||||
public override int SIZE_PARTY => PKX.SIZE_3PARTY;
|
||||
public override int SIZE_STORED => PKX.SIZE_3STORED;
|
||||
public override int Format => 3;
|
||||
public PK3(byte[] decryptedData = null, string ident = null)
|
||||
{
|
||||
Data = (byte[])(decryptedData ?? new byte[SIZE_PARTY]).Clone();
|
||||
PKMConverter.checkEncrypted(ref Data);
|
||||
Identifier = ident;
|
||||
if (Data.Length != SIZE_PARTY)
|
||||
Array.Resize(ref Data, SIZE_PARTY);
|
||||
}
|
||||
public override PKM Clone() { return new PK3(Data); }
|
||||
|
||||
// Future Attributes
|
||||
public override uint EncryptionConstant { get { return PID; } set { } }
|
||||
public override int Nature { get { return (int)(PID % 25); } set { } }
|
||||
public override int AltForm { get { return -1; } set { } }
|
||||
|
||||
public override bool IsNicknamed { get { return PKX.getIsNicknamed(Species, Nickname); } set { } }
|
||||
public override int Gender { get { return PKX.getGender(Species, PID); } set { } }
|
||||
public override int Characteristic => -1;
|
||||
public override int CurrentFriendship { get { return OT_Friendship; } set { OT_Friendship = value; } }
|
||||
public override int Ability { get { return PKX.Gen3Abilities[Species][AbilityNumber]; } set { } }
|
||||
public override int CurrentHandler { get { return 0; } set { } }
|
||||
public override int Egg_Location { get { return 0; } set { } }
|
||||
public override int Met_Level { get { return -1; } set { } }
|
||||
|
||||
// 0x20 Intro
|
||||
public override uint PID { get { return BitConverter.ToUInt32(Data, 0x00); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x00); } }
|
||||
public override int TID { get { return BitConverter.ToUInt16(Data, 0x04); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x04); } }
|
||||
public override int SID { get { return BitConverter.ToUInt16(Data, 0x06); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x06); } }
|
||||
public override string Nickname {
|
||||
get { return PKX.getG3Str(Data.Skip(0x08).Take(10).ToArray(), Japanese); }
|
||||
set { byte[] strdata = PKX.setG3Str(value, Japanese);
|
||||
if (strdata.Length > 10)
|
||||
Array.Resize(ref strdata, 10);
|
||||
strdata.CopyTo(Data, 0x08); } }
|
||||
public override int Language { get { return BitConverter.ToUInt16(Data, 0x12) & 0xFF; } set { BitConverter.GetBytes((ushort)(value | 0x200)).CopyTo(Data, 0x12); } }
|
||||
public override string OT_Name {
|
||||
get { return PKX.getG3Str(Data.Skip(0x14).Take(7).ToArray(), Japanese); }
|
||||
set { byte[] strdata = PKX.setG3Str(value, Japanese);
|
||||
if (strdata.Length > 7)
|
||||
Array.Resize(ref strdata, 7);
|
||||
strdata.CopyTo(Data, 0x14); } }
|
||||
|
||||
public override byte MarkByte { get { return Data[0x1B]; } protected set { Data[0x1B] = value; } }
|
||||
public override ushort Checksum { get { return BitConverter.ToUInt16(Data, 0x1C); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x1C); } }
|
||||
public override ushort Sanity { get { return BitConverter.ToUInt16(Data, 0x1E); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x1E); } }
|
||||
|
||||
#region Block A
|
||||
public override int Species { get { return PKX.getG4Species(BitConverter.ToUInt16(Data, 0x20)); } set { BitConverter.GetBytes((ushort)PKX.getG3Species(value)).CopyTo(Data, 0x20); } }
|
||||
public override int HeldItem { get { return PKX.getG4Item((ushort)G3Item); } set { } }
|
||||
public int G3Item { get { return BitConverter.ToUInt16(Data, 0x22); } set { BitConverter.GetBytes((ushort) value).CopyTo(Data, 0x22); } }
|
||||
|
||||
public override uint EXP { get { return BitConverter.ToUInt32(Data, 0x24); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x24); } }
|
||||
private byte PPUps { get { return Data[0x28]; } set { Data[0x28] = value; } }
|
||||
public override int Move1_PPUps { get { return (PPUps >> 0) & 3; } set { PPUps = (byte)((PPUps & ~(3 << 0)) | value); } }
|
||||
public override int Move2_PPUps { get { return (PPUps >> 2) & 3; } set { PPUps = (byte)((PPUps & ~(3 << 2)) | value); } }
|
||||
public override int Move3_PPUps { get { return (PPUps >> 4) & 3; } set { PPUps = (byte)((PPUps & ~(3 << 4)) | value); } }
|
||||
public override int Move4_PPUps { get { return (PPUps >> 6) & 3; } set { PPUps = (byte)((PPUps & ~(3 << 6)) | value); } }
|
||||
public override int OT_Friendship { get { return Data[0x29]; } set { Data[0x29] = (byte)value; } }
|
||||
// Unused 0x2A 0x2B
|
||||
#endregion
|
||||
|
||||
#region Block B
|
||||
public override int Move1 { get { return BitConverter.ToUInt16(Data, 0x2C); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x2C); } }
|
||||
public override int Move2 { get { return BitConverter.ToUInt16(Data, 0x2E); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x2E); } }
|
||||
public override int Move3 { get { return BitConverter.ToUInt16(Data, 0x30); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x30); } }
|
||||
public override int Move4 { get { return BitConverter.ToUInt16(Data, 0x32); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x32); } }
|
||||
public override int Move1_PP { get { return Data[0x34]; } set { Data[0x34] = (byte)value; } }
|
||||
public override int Move2_PP { get { return Data[0x35]; } set { Data[0x35] = (byte)value; } }
|
||||
public override int Move3_PP { get { return Data[0x36]; } set { Data[0x36] = (byte)value; } }
|
||||
public override int Move4_PP { get { return Data[0x37]; } set { Data[0x37] = (byte)value; } }
|
||||
#endregion
|
||||
|
||||
#region Block C
|
||||
public override int EV_HP { get { return Data[0x38]; } set { Data[0x38] = (byte)value; } }
|
||||
public override int EV_ATK { get { return Data[0x39]; } set { Data[0x39] = (byte)value; } }
|
||||
public override int EV_DEF { get { return Data[0x3A]; } set { Data[0x3A] = (byte)value; } }
|
||||
public override int EV_SPE { get { return Data[0x3B]; } set { Data[0x3B] = (byte)value; } }
|
||||
public override int EV_SPA { get { return Data[0x3C]; } set { Data[0x3C] = (byte)value; } }
|
||||
public override int EV_SPD { get { return Data[0x3D]; } set { Data[0x3D] = (byte)value; } }
|
||||
public override int CNT_Cool { get { return Data[0x3E]; } set { Data[0x3E] = (byte)value; } }
|
||||
public override int CNT_Beauty { get { return Data[0x3F]; } set { Data[0x3F] = (byte)value; } }
|
||||
public override int CNT_Cute { get { return Data[0x40]; } set { Data[0x40] = (byte)value; } }
|
||||
public override int CNT_Smart { get { return Data[0x41]; } set { Data[0x41] = (byte)value; } }
|
||||
public override int CNT_Tough { get { return Data[0x42]; } set { Data[0x42] = (byte)value; } }
|
||||
public override int CNT_Sheen { get { return Data[0x43]; } set { Data[0x43] = (byte)value; } }
|
||||
#endregion
|
||||
|
||||
#region Block D
|
||||
private byte PKRS { get { return Data[0x44]; } set { Data[0x44] = value; } }
|
||||
public override int PKRS_Days { get { return PKRS & 0xF; } set { PKRS = (byte)(PKRS & ~0xF | value); } }
|
||||
public override int PKRS_Strain { get { return PKRS >> 4; } set { PKRS = (byte)(PKRS & 0xF | value << 4); } }
|
||||
public override int Met_Location { get { return Data[0x45]; } set { Data[0x45] = (byte)value; } }
|
||||
// Origins
|
||||
private ushort Origins { get { return BitConverter.ToUInt16(Data, 0x46); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x46); } }
|
||||
public override int Version { get { return (Origins >> 7) & 0xF; } set { Origins = (ushort)((Origins & ~0x780) | ((value & 0xF) << 7));} }
|
||||
public override int Ball { get { return (Origins >> 11) & 0xF; } set { Origins = (ushort)((Origins & ~0x7800) | ((value & 0xF) << 11)); } }
|
||||
public override int OT_Gender { get { return (Origins >> 15) & 1; } set { Origins = (ushort)(Origins & ~(1 << 15) | ((value & 1) << 15)); } }
|
||||
|
||||
public uint IV32 { get { return BitConverter.ToUInt32(Data, 0x48); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x48); } }
|
||||
public override int IV_HP { get { return (int)(IV32 >> 00) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 00)) | (uint)((value > 31 ? 31 : value) << 00)); } }
|
||||
public override int IV_ATK { get { return (int)(IV32 >> 05) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 05)) | (uint)((value > 31 ? 31 : value) << 05)); } }
|
||||
public override int IV_DEF { get { return (int)(IV32 >> 10) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 10)) | (uint)((value > 31 ? 31 : value) << 10)); } }
|
||||
public override int IV_SPE { get { return (int)(IV32 >> 15) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 15)) | (uint)((value > 31 ? 31 : value) << 15)); } }
|
||||
public override int IV_SPA { get { return (int)(IV32 >> 20) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 20)) | (uint)((value > 31 ? 31 : value) << 20)); } }
|
||||
public override int IV_SPD { get { return (int)(IV32 >> 25) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 25)) | (uint)((value > 31 ? 31 : value) << 25)); } }
|
||||
public override bool IsEgg { get { return ((IV32 >> 30) & 1) == 1; } set { IV32 = (uint)((IV32 & ~0x40000000) | (uint)(value ? 0x40000000 : 0)); } }
|
||||
public int AbilityNumber { get { return (int)((IV32 >> 31) & 1); } set { IV32 = (IV32 & 0x7FFFFFFF) | (value == 1 ? 0x80000000 : 0); } }
|
||||
|
||||
private uint RIB0 { get { return BitConverter.ToUInt32(Data, 0x4C); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x4C); } }
|
||||
public int Cool_Ribbons { get { return (int)(RIB0 >> 00) & 7; } set { RIB0 = (uint)((RIB0 & ~(7 << 00)) | (uint)(value & 7)); } }
|
||||
public int Beauty_Ribbons{ get { return (int)(RIB0 >> 03) & 7; } set { RIB0 = (uint)((RIB0 & ~(7 << 03)) | (uint)(value & 7)); } }
|
||||
public int Cute_Ribbons { get { return (int)(RIB0 >> 06) & 7; } set { RIB0 = (uint)((RIB0 & ~(7 << 06)) | (uint)(value & 7)); } }
|
||||
public int Smart_Ribbons { get { return (int)(RIB0 >> 09) & 3; } set { RIB0 = (uint)((RIB0 & ~(7 << 09)) | (uint)(value & 7)); } }
|
||||
public int Tough_Ribbons { get { return (int)(RIB0 >> 12) & 3; } set { RIB0 = (uint)((RIB0 & ~(7 << 12)) | (uint)(value & 7)); } }
|
||||
public bool Champion { get { return (RIB0 & (1 << 15)) == 1 << 15; } set { RIB0 = (uint)(RIB0 & ~(1 << 15) | (uint)(value ? 1 << 0 : 0)); } }
|
||||
public bool Winning { get { return (RIB0 & (1 << 16)) == 1 << 16; } set { RIB0 = (uint)(RIB0 & ~(1 << 16) | (uint)(value ? 1 << 0 : 0)); } }
|
||||
public bool Victory { get { return (RIB0 & (1 << 17)) == 1 << 17; } set { RIB0 = (uint)(RIB0 & ~(1 << 17) | (uint)(value ? 1 << 0 : 0)); } }
|
||||
public bool Artist { get { return (RIB0 & (1 << 18)) == 1 << 18; } set { RIB0 = (uint)(RIB0 & ~(1 << 18) | (uint)(value ? 1 << 0 : 0)); } }
|
||||
public bool Effort { get { return (RIB0 & (1 << 19)) == 1 << 19; } set { RIB0 = (uint)(RIB0 & ~(1 << 19) | (uint)(value ? 1 << 0 : 0)); } }
|
||||
public bool Special1 { get { return (RIB0 & (1 << 20)) == 1 << 20; } set { RIB0 = (uint)(RIB0 & ~(1 << 20) | (uint)(value ? 1 << 0 : 0)); } }
|
||||
public bool Special2 { get { return (RIB0 & (1 << 21)) == 1 << 21; } set { RIB0 = (uint)(RIB0 & ~(1 << 21) | (uint)(value ? 1 << 0 : 0)); } }
|
||||
public bool Special3 { get { return (RIB0 & (1 << 22)) == 1 << 22; } set { RIB0 = (uint)(RIB0 & ~(1 << 22) | (uint)(value ? 1 << 0 : 0)); } }
|
||||
public bool Special4 { get { return (RIB0 & (1 << 23)) == 1 << 23; } set { RIB0 = (uint)(RIB0 & ~(1 << 23) | (uint)(value ? 1 << 0 : 0)); } }
|
||||
public bool Special5 { get { return (RIB0 & (1 << 24)) == 1 << 24; } set { RIB0 = (uint)(RIB0 & ~(1 << 24) | (uint)(value ? 1 << 0 : 0)); } }
|
||||
public bool Special6 { get { return (RIB0 & (1 << 25)) == 1 << 25; } set { RIB0 = (uint)(RIB0 & ~(1 << 25) | (uint)(value ? 1 << 0 : 0)); } }
|
||||
public bool Special7 { get { return (RIB0 & (1 << 26)) == 1 << 26; } set { RIB0 = (uint)(RIB0 & ~(1 << 26) | (uint)(value ? 1 << 0 : 0)); } }
|
||||
public bool Unused1 { get { return (RIB0 & (1 << 27)) == 1 << 27; } set { RIB0 = (uint)(RIB0 & ~(1 << 27) | (uint)(value ? 1 << 0 : 0)); } }
|
||||
public bool Unused2 { get { return (RIB0 & (1 << 28)) == 1 << 28; } set { RIB0 = (uint)(RIB0 & ~(1 << 28) | (uint)(value ? 1 << 0 : 0)); } }
|
||||
public bool Unused3 { get { return (RIB0 & (1 << 29)) == 1 << 29; } set { RIB0 = (uint)(RIB0 & ~(1 << 29) | (uint)(value ? 1 << 0 : 0)); } }
|
||||
public bool Unused4 { get { return (RIB0 & (1 << 30)) == 1 << 30; } set { RIB0 = (uint)(RIB0 & ~(1 << 30) | (uint)(value ? 1 << 0 : 0)); } }
|
||||
public override bool FatefulEncounter { get { return (RIB0 & (1 << 31)) == 1 << 31; } set { RIB0 = (RIB0 & ~(1 << 31)) | (uint)(value ? 1 << 0 : 0); } }
|
||||
#endregion
|
||||
|
||||
public override int Stat_Level { get { return Data[0x54]; } set { Data[0x54] = (byte)value; } }
|
||||
public override int Stat_HPCurrent { get { return BitConverter.ToUInt16(Data, 0x56); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x56); } }
|
||||
public override int Stat_HPMax { get { return BitConverter.ToUInt16(Data, 0x58); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x58); } }
|
||||
public override int Stat_ATK { get { return BitConverter.ToUInt16(Data, 0x5A); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x5A); } }
|
||||
public override int Stat_DEF { get { return BitConverter.ToUInt16(Data, 0x5C); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x5C); } }
|
||||
public override int Stat_SPE { get { return BitConverter.ToUInt16(Data, 0x5E); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x5E); } }
|
||||
public override int Stat_SPA { get { return BitConverter.ToUInt16(Data, 0x60); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x60); } }
|
||||
public override int Stat_SPD { get { return BitConverter.ToUInt16(Data, 0x62); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x62); } }
|
||||
|
||||
// Generated Attributes
|
||||
public override int PSV => (int)((PID >> 16 ^ PID & 0xFFFF) >> 3);
|
||||
public override int TSV => (TID ^ SID) >> 3;
|
||||
public bool Japanese => Language == 1;
|
||||
|
||||
public override byte[] Encrypt()
|
||||
{
|
||||
return PKX.encryptArray3(Data);
|
||||
}
|
||||
public override bool getGenderIsValid()
|
||||
{
|
||||
int gv = PKX.Personal[Species].Gender;
|
||||
|
||||
if (gv == 255)
|
||||
return Gender == 2;
|
||||
if (gv == 254)
|
||||
return Gender == 0;
|
||||
if (gv == 0)
|
||||
return Gender == 1;
|
||||
if (gv <= (PID & 0xFF))
|
||||
return Gender == 0;
|
||||
if ((PID & 0xFF) < gv)
|
||||
return Gender == 1;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public PK4 convertToPK4()
|
||||
{
|
||||
DateTime moment = DateTime.Now;
|
||||
PK4 pk4 = new PK4 // Convert away!
|
||||
{
|
||||
PID = PID,
|
||||
Species = Species,
|
||||
TID = TID,
|
||||
SID = SID,
|
||||
EXP = IsEgg ? PKX.getEXP(5, Species) : EXP,
|
||||
IsEgg = false,
|
||||
OT_Friendship = 40,
|
||||
Circle = Circle,
|
||||
Square = Square,
|
||||
Triangle = Triangle,
|
||||
Heart = Heart,
|
||||
Language = Language,
|
||||
EV_HP = EV_HP,
|
||||
EV_ATK = EV_ATK,
|
||||
EV_DEF = EV_DEF,
|
||||
EV_SPA = EV_SPA,
|
||||
EV_SPD = EV_SPD,
|
||||
EV_SPE = EV_SPE,
|
||||
CNT_Cool = CNT_Cool,
|
||||
CNT_Beauty = CNT_Beauty,
|
||||
CNT_Cute = CNT_Cute,
|
||||
CNT_Smart = CNT_Smart,
|
||||
CNT_Tough = CNT_Tough,
|
||||
CNT_Sheen = CNT_Sheen,
|
||||
FatefulEncounter = FatefulEncounter,
|
||||
Move1 = Move1,
|
||||
Move2 = Move2,
|
||||
Move3 = Move3,
|
||||
Move4 = Move4,
|
||||
Move1_PPUps = Move1_PPUps,
|
||||
Move2_PPUps = Move2_PPUps,
|
||||
Move3_PPUps = Move3_PPUps,
|
||||
Move4_PPUps = Move4_PPUps,
|
||||
Move1_PP = PKX.getMovePP(Move1, Move1_PPUps),
|
||||
Move2_PP = PKX.getMovePP(Move2, Move2_PPUps),
|
||||
Move3_PP = PKX.getMovePP(Move3, Move3_PPUps),
|
||||
Move4_PP = PKX.getMovePP(Move4, Move4_PPUps),
|
||||
IV_HP = IV_HP,
|
||||
IV_ATK = IV_ATK,
|
||||
IV_DEF = IV_DEF,
|
||||
IV_SPA = IV_SPA,
|
||||
IV_SPD = IV_SPD,
|
||||
IV_SPE = IV_SPE,
|
||||
Ability = PKX.Gen3Abilities[Species][Ability],
|
||||
Version = Version,
|
||||
Ball = Ball,
|
||||
PKRS_Strain = PKRS_Strain,
|
||||
PKRS_Days = PKRS_Days,
|
||||
OT_Gender = OT_Gender,
|
||||
Met_Year = moment.Year - 2000,
|
||||
Met_Month = moment.Month,
|
||||
Met_Day = moment.Day,
|
||||
Met_Location = 0x37, // Pal Park
|
||||
RIB6_4 = Champion,
|
||||
RIB6_5 = Winning,
|
||||
RIB6_6 = Victory,
|
||||
RIB6_7 = Artist,
|
||||
RIB7_0 = Effort,
|
||||
RIB7_1 = Special1, // Battle Champion Ribbon
|
||||
RIB7_2 = Special2, // Regional Champion Ribbon
|
||||
RIB7_3 = Special3, // National Champion Ribbon
|
||||
RIB7_4 = Special4, // Country Ribbon
|
||||
RIB7_5 = Special5, // National Ribbon
|
||||
RIB7_6 = Special6, // Earth Ribbon
|
||||
RIB7_7 = Special7, // World Ribbon
|
||||
};
|
||||
|
||||
// Remaining Ribbons
|
||||
pk4.RIB4_0 |= Cool_Ribbons > 0;
|
||||
pk4.RIB4_1 |= Cool_Ribbons > 1;
|
||||
pk4.RIB4_2 |= Cool_Ribbons > 2;
|
||||
pk4.RIB4_3 |= Cool_Ribbons > 3;
|
||||
pk4.RIB4_4 |= Beauty_Ribbons > 0;
|
||||
pk4.RIB4_5 |= Beauty_Ribbons > 1;
|
||||
pk4.RIB4_6 |= Beauty_Ribbons > 2;
|
||||
pk4.RIB4_7 |= Beauty_Ribbons > 3;
|
||||
pk4.RIB5_0 |= Cute_Ribbons > 0;
|
||||
pk4.RIB5_1 |= Cute_Ribbons > 1;
|
||||
pk4.RIB5_2 |= Cute_Ribbons > 2;
|
||||
pk4.RIB5_3 |= Cute_Ribbons > 3;
|
||||
pk4.RIB5_4 |= Smart_Ribbons > 0;
|
||||
pk4.RIB5_5 |= Smart_Ribbons > 1;
|
||||
pk4.RIB5_6 |= Smart_Ribbons > 2;
|
||||
pk4.RIB5_7 |= Smart_Ribbons > 3;
|
||||
pk4.RIB6_0 |= Tough_Ribbons > 0;
|
||||
pk4.RIB6_1 |= Tough_Ribbons > 1;
|
||||
pk4.RIB6_2 |= Tough_Ribbons > 2;
|
||||
pk4.RIB6_3 |= Tough_Ribbons > 3;
|
||||
|
||||
// Yay for reusing string buffers!
|
||||
PKX.G4TransferTrashBytes[pk4.Language].CopyTo(pk4.Data, 0x48 + 4);
|
||||
pk4.Nickname = IsEgg ? PKX.getSpeciesName(pk4.Species, pk4.Language) : Nickname;
|
||||
Array.Copy(pk4.Data, 0x48, pk4.Data, 0x68, 0x10);
|
||||
pk4.OT_Name = OT_Name;
|
||||
|
||||
// Set Final Data
|
||||
pk4.Met_Level = PKX.getLevel(pk4.Species, pk4.EXP);
|
||||
pk4.Gender = PKX.getGender(pk4.Species, pk4.PID);
|
||||
pk4.IsNicknamed = IsNicknamed;
|
||||
|
||||
// Unown Form
|
||||
if (Species == 201)
|
||||
pk4.AltForm = PKX.getUnownForm(PID);
|
||||
|
||||
// Remove HM moves
|
||||
int[] banned = { 15, 19, 57, 70, 148, 249, 127, 291 };
|
||||
int[] newMoves = pk4.Moves;
|
||||
for (int i = 0; i < 4; i++)
|
||||
if (banned.Contains(newMoves[i]))
|
||||
newMoves[i] = 0;
|
||||
pk4.Moves = newMoves;
|
||||
pk4.FixMoves();
|
||||
|
||||
pk4.RefreshChecksum();
|
||||
return pk4;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,57 +3,58 @@
|
||||
|
||||
namespace PKHeX
|
||||
{
|
||||
public class PK4 // 4th Generation PKM File
|
||||
public class PK4 : PKM // 4th Generation PKM File
|
||||
{
|
||||
internal const int SIZE_PARTY = 236;
|
||||
internal const int SIZE_STORED = 136;
|
||||
internal const int SIZE_BLOCK = 32;
|
||||
|
||||
internal static readonly byte[] ExtraBytes =
|
||||
{
|
||||
0x42, 0x43, 0x5E, 0x63, 0x64, 0x65, 0x66, 0x67, 0x87
|
||||
};
|
||||
public override int SIZE_PARTY => PKX.SIZE_4PARTY;
|
||||
public override int SIZE_STORED => PKX.SIZE_4STORED;
|
||||
public override int Format => 4;
|
||||
public PK4(byte[] decryptedData = null, string ident = null)
|
||||
{
|
||||
Data = (byte[])(decryptedData ?? new byte[SIZE_PARTY]).Clone();
|
||||
PKMConverter.checkEncrypted(ref Data);
|
||||
Identifier = ident;
|
||||
if (Data.Length != SIZE_PARTY)
|
||||
Array.Resize(ref Data, SIZE_PARTY);
|
||||
}
|
||||
public override PKM Clone() { return new PK4(Data); }
|
||||
|
||||
// Internal Attributes set on creation
|
||||
public byte[] Data; // Raw Storage
|
||||
public string Identifier; // User or Form Custom Attribute
|
||||
// Future Attributes
|
||||
public override uint EncryptionConstant { get { return PID; } set { } }
|
||||
public override int Nature { get { return (int)(PID%25); } set { } }
|
||||
public override int CurrentFriendship { get { return OT_Friendship; } set { OT_Friendship = value; } }
|
||||
public override int CurrentHandler { get { return 0; } set { } }
|
||||
|
||||
// Structure
|
||||
public uint PID { get { return BitConverter.ToUInt32(Data, 0x00); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x00); } }
|
||||
public ushort Sanity { get { return BitConverter.ToUInt16(Data, 0x04); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x04); } }
|
||||
public ushort Checksum { get { return BitConverter.ToUInt16(Data, 0x06); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x06); } }
|
||||
|
||||
public override uint PID { get { return BitConverter.ToUInt32(Data, 0x00); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x00); } }
|
||||
public override ushort Sanity { get { return BitConverter.ToUInt16(Data, 0x04); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x04); } }
|
||||
public override ushort Checksum { get { return BitConverter.ToUInt16(Data, 0x06); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x06); } }
|
||||
|
||||
#region Block A
|
||||
public int Species { get { return BitConverter.ToUInt16(Data, 0x08); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x08); } }
|
||||
public int HeldItem { get { return BitConverter.ToUInt16(Data, 0x0A); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x0A); } }
|
||||
public int TID { get { return BitConverter.ToUInt16(Data, 0x0C); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x0C); } }
|
||||
public int SID { get { return BitConverter.ToUInt16(Data, 0x0E); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x0E); } }
|
||||
public uint EXP { get { return BitConverter.ToUInt32(Data, 0x10); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x10); } }
|
||||
public int Friendship { get { return Data[0x14]; } set { Data[0x14] = (byte)value; } }
|
||||
public int Ability { get { return Data[0x15]; } set { Data[0x15] = (byte)value; } }
|
||||
public byte Markings { get { return Data[0x16]; } set { Data[0x16] = value; } }
|
||||
public bool Circle { get { return (Markings & (1 << 0)) == 1 << 0; } set { Markings = (byte)(Markings & ~(1 << 0) | (value ? 1 << 0 : 0)); } }
|
||||
public bool Triangle { get { return (Markings & (1 << 1)) == 1 << 1; } set { Markings = (byte)(Markings & ~(1 << 1) | (value ? 1 << 1 : 0)); } }
|
||||
public bool Square { get { return (Markings & (1 << 2)) == 1 << 2; } set { Markings = (byte)(Markings & ~(1 << 2) | (value ? 1 << 2 : 0)); } }
|
||||
public bool Heart { get { return (Markings & (1 << 3)) == 1 << 3; } set { Markings = (byte)(Markings & ~(1 << 3) | (value ? 1 << 3 : 0)); } }
|
||||
public bool Star { get { return (Markings & (1 << 4)) == 1 << 4; } set { Markings = (byte)(Markings & ~(1 << 4) | (value ? 1 << 4 : 0)); } }
|
||||
public bool Diamond { get { return (Markings & (1 << 5)) == 1 << 5; } set { Markings = (byte)(Markings & ~(1 << 5) | (value ? 1 << 5 : 0)); } }
|
||||
public int Language { get { return Data[0x17]; } set { Data[0x17] = (byte)value; } }
|
||||
public int EV_HP { get { return Data[0x18]; } set { Data[0x18] = (byte)value; } }
|
||||
public int EV_ATK { get { return Data[0x19]; } set { Data[0x19] = (byte)value; } }
|
||||
public int EV_DEF { get { return Data[0x1A]; } set { Data[0x1A] = (byte)value; } }
|
||||
public int EV_SPE { get { return Data[0x1B]; } set { Data[0x1B] = (byte)value; } }
|
||||
public int EV_SPA { get { return Data[0x1C]; } set { Data[0x1C] = (byte)value; } }
|
||||
public int EV_SPD { get { return Data[0x1D]; } set { Data[0x1D] = (byte)value; } }
|
||||
public int CNT_Cool { get { return Data[0x1E]; } set { Data[0x1E] = (byte)value; } }
|
||||
public int CNT_Beauty { get { return Data[0x1F]; } set { Data[0x1F] = (byte)value; } }
|
||||
public int CNT_Cute { get { return Data[0x20]; } set { Data[0x20] = (byte)value; } }
|
||||
public int CNT_Smart { get { return Data[0x21]; } set { Data[0x21] = (byte)value; } }
|
||||
public int CNT_Tough { get { return Data[0x22]; } set { Data[0x22] = (byte)value; } }
|
||||
public int CNT_Sheen { get { return Data[0x23]; } set { Data[0x23] = (byte)value; } }
|
||||
public override int Species { get { return BitConverter.ToUInt16(Data, 0x08); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x08); } }
|
||||
public override int HeldItem { get { return BitConverter.ToUInt16(Data, 0x0A); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x0A); } }
|
||||
public override int TID { get { return BitConverter.ToUInt16(Data, 0x0C); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x0C); } }
|
||||
public override int SID { get { return BitConverter.ToUInt16(Data, 0x0E); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x0E); } }
|
||||
public override uint EXP { get { return BitConverter.ToUInt32(Data, 0x10); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x10); } }
|
||||
public override int OT_Friendship { get { return Data[0x14]; } set { Data[0x14] = (byte)value; } }
|
||||
public override int Ability { get { return Data[0x15]; } set { Data[0x15] = (byte)value; } }
|
||||
public override byte MarkByte { get { return Data[0x16]; } protected set { Data[0x16] = value; } }
|
||||
public override int Language { get { return Data[0x17]; } set { Data[0x17] = (byte)value; } }
|
||||
public override int EV_HP { get { return Data[0x18]; } set { Data[0x18] = (byte)value; } }
|
||||
public override int EV_ATK { get { return Data[0x19]; } set { Data[0x19] = (byte)value; } }
|
||||
public override int EV_DEF { get { return Data[0x1A]; } set { Data[0x1A] = (byte)value; } }
|
||||
public override int EV_SPE { get { return Data[0x1B]; } set { Data[0x1B] = (byte)value; } }
|
||||
public override int EV_SPA { get { return Data[0x1C]; } set { Data[0x1C] = (byte)value; } }
|
||||
public override int EV_SPD { get { return Data[0x1D]; } set { Data[0x1D] = (byte)value; } }
|
||||
public override int CNT_Cool { get { return Data[0x1E]; } set { Data[0x1E] = (byte)value; } }
|
||||
public override int CNT_Beauty { get { return Data[0x1F]; } set { Data[0x1F] = (byte)value; } }
|
||||
public override int CNT_Cute { get { return Data[0x20]; } set { Data[0x20] = (byte)value; } }
|
||||
public override int CNT_Smart { get { return Data[0x21]; } set { Data[0x21] = (byte)value; } }
|
||||
public override int CNT_Tough { get { return Data[0x22]; } set { Data[0x22] = (byte)value; } }
|
||||
public override int CNT_Sheen { get { return Data[0x23]; } set { Data[0x23] = (byte)value; } }
|
||||
|
||||
private byte RIB0 { get { return Data[0x24]; } set { Data[0x24] = value; } } // Sinnoh 1
|
||||
public bool RIB0_0 { get { return (RIB0 & (1 << 0)) == 1 << 0; } set { RIB0 = (byte)(RIB0 & ~(1 << 0) | (value ? 1 << 0 : 0)); } } // Sinnoh Champ Ribbon
|
||||
@@ -94,27 +95,27 @@ public PK4(byte[] decryptedData = null, string ident = null)
|
||||
#endregion
|
||||
|
||||
#region Block B
|
||||
public int Move1 { get { return BitConverter.ToUInt16(Data, 0x28); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x28); } }
|
||||
public int Move2 { get { return BitConverter.ToUInt16(Data, 0x2A); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x2A); } }
|
||||
public int Move3 { get { return BitConverter.ToUInt16(Data, 0x2C); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x2C); } }
|
||||
public int Move4 { get { return BitConverter.ToUInt16(Data, 0x2E); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x2E); } }
|
||||
public int Move1_PP { get { return Data[0x30]; } set { Data[0x30] = (byte)value; } }
|
||||
public int Move2_PP { get { return Data[0x31]; } set { Data[0x31] = (byte)value; } }
|
||||
public int Move3_PP { get { return Data[0x32]; } set { Data[0x32] = (byte)value; } }
|
||||
public int Move4_PP { get { return Data[0x33]; } set { Data[0x33] = (byte)value; } }
|
||||
public int Move1_PPUps { get { return Data[0x34]; } set { Data[0x34] = (byte)value; } }
|
||||
public int Move2_PPUps { get { return Data[0x35]; } set { Data[0x35] = (byte)value; } }
|
||||
public int Move3_PPUps { get { return Data[0x36]; } set { Data[0x36] = (byte)value; } }
|
||||
public int Move4_PPUps { get { return Data[0x37]; } set { Data[0x37] = (byte)value; } }
|
||||
public override int Move1 { get { return BitConverter.ToUInt16(Data, 0x28); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x28); } }
|
||||
public override int Move2 { get { return BitConverter.ToUInt16(Data, 0x2A); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x2A); } }
|
||||
public override int Move3 { get { return BitConverter.ToUInt16(Data, 0x2C); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x2C); } }
|
||||
public override int Move4 { get { return BitConverter.ToUInt16(Data, 0x2E); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x2E); } }
|
||||
public override int Move1_PP { get { return Data[0x30]; } set { Data[0x30] = (byte)value; } }
|
||||
public override int Move2_PP { get { return Data[0x31]; } set { Data[0x31] = (byte)value; } }
|
||||
public override int Move3_PP { get { return Data[0x32]; } set { Data[0x32] = (byte)value; } }
|
||||
public override int Move4_PP { get { return Data[0x33]; } set { Data[0x33] = (byte)value; } }
|
||||
public override int Move1_PPUps { get { return Data[0x34]; } set { Data[0x34] = (byte)value; } }
|
||||
public override int Move2_PPUps { get { return Data[0x35]; } set { Data[0x35] = (byte)value; } }
|
||||
public override int Move3_PPUps { get { return Data[0x36]; } set { Data[0x36] = (byte)value; } }
|
||||
public override int Move4_PPUps { get { return Data[0x37]; } set { Data[0x37] = (byte)value; } }
|
||||
public uint IV32 { get { return BitConverter.ToUInt32(Data, 0x38); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x38); } }
|
||||
public int IV_HP { get { return (int)(IV32 >> 00) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 00)) | (uint)((value > 31 ? 31 : value) << 00)); } }
|
||||
public int IV_ATK { get { return (int)(IV32 >> 05) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 05)) | (uint)((value > 31 ? 31 : value) << 05)); } }
|
||||
public int IV_DEF { get { return (int)(IV32 >> 10) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 10)) | (uint)((value > 31 ? 31 : value) << 10)); } }
|
||||
public int IV_SPE { get { return (int)(IV32 >> 15) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 15)) | (uint)((value > 31 ? 31 : value) << 15)); } }
|
||||
public int IV_SPA { get { return (int)(IV32 >> 20) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 20)) | (uint)((value > 31 ? 31 : value) << 20)); } }
|
||||
public int IV_SPD { get { return (int)(IV32 >> 25) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 25)) | (uint)((value > 31 ? 31 : value) << 25)); } }
|
||||
public bool IsEgg { get { return ((IV32 >> 30) & 1) == 1; } set { IV32 = (uint)((IV32 & ~0x40000000) | (uint)(value ? 0x40000000 : 0)); } }
|
||||
public bool IsNicknamed { get { return ((IV32 >> 31) & 1) == 1; } set { IV32 = (IV32 & 0x7FFFFFFF) | (value ? 0x80000000 : 0); } }
|
||||
public override int IV_HP { get { return (int)(IV32 >> 00) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 00)) | (uint)((value > 31 ? 31 : value) << 00)); } }
|
||||
public override int IV_ATK { get { return (int)(IV32 >> 05) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 05)) | (uint)((value > 31 ? 31 : value) << 05)); } }
|
||||
public override int IV_DEF { get { return (int)(IV32 >> 10) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 10)) | (uint)((value > 31 ? 31 : value) << 10)); } }
|
||||
public override int IV_SPE { get { return (int)(IV32 >> 15) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 15)) | (uint)((value > 31 ? 31 : value) << 15)); } }
|
||||
public override int IV_SPA { get { return (int)(IV32 >> 20) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 20)) | (uint)((value > 31 ? 31 : value) << 20)); } }
|
||||
public override int IV_SPD { get { return (int)(IV32 >> 25) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 25)) | (uint)((value > 31 ? 31 : value) << 25)); } }
|
||||
public override bool IsEgg { get { return ((IV32 >> 30) & 1) == 1; } set { IV32 = (uint)((IV32 & ~0x40000000) | (uint)(value ? 0x40000000 : 0)); } }
|
||||
public override bool IsNicknamed { get { return ((IV32 >> 31) & 1) == 1; } set { IV32 = (IV32 & 0x7FFFFFFF) | (value ? 0x80000000 : 0); } }
|
||||
|
||||
private byte RIB4 { get { return Data[0x3C]; } set { Data[0x3C] = value; } } // Hoenn 1a
|
||||
public bool RIB4_0 { get { return (RIB4 & (1 << 0)) == 1 << 0; } set { RIB4 = (byte)(RIB4 & ~(1 << 0) | (value ? 1 << 0 : 0)); } } // Cool Ribbon
|
||||
@@ -153,18 +154,18 @@ public PK4(byte[] decryptedData = null, string ident = null)
|
||||
public bool RIB7_6 { get { return (RIB7 & (1 << 6)) == 1 << 6; } set { RIB7 = (byte)(RIB7 & ~(1 << 6) | (value ? 1 << 6 : 0)); } } // Earth Ribbon
|
||||
public bool RIB7_7 { get { return (RIB7 & (1 << 7)) == 1 << 7; } set { RIB7 = (byte)(RIB7 & ~(1 << 7) | (value ? 1 << 7 : 0)); } } // World Ribbon
|
||||
|
||||
public bool FatefulEncounter { get { return (Data[0x40] & 1) == 1; } set { Data[0x40] = (byte)(Data[0x40] & ~0x01 | (value ? 1 : 0)); } }
|
||||
public int Gender { get { return (Data[0x40] >> 1) & 0x3; } set { Data[0x40] = (byte)(Data[0x40] & ~0x06 | (value << 1)); } }
|
||||
public int AltForm { get { return Data[0x40] >> 3; } set { Data[0x40] = (byte)(Data[0x40] & 0x07 | (value << 3)); } }
|
||||
public override bool FatefulEncounter { get { return (Data[0x40] & 1) == 1; } set { Data[0x40] = (byte)(Data[0x40] & ~0x01 | (value ? 1 : 0)); } }
|
||||
public override int Gender { get { return (Data[0x40] >> 1) & 0x3; } set { Data[0x40] = (byte)(Data[0x40] & ~0x06 | (value << 1)); } }
|
||||
public override int AltForm { get { return Data[0x40] >> 3; } set { Data[0x40] = (byte)(Data[0x40] & 0x07 | (value << 3)); } }
|
||||
// 0x43-0x47 Unused
|
||||
#endregion
|
||||
|
||||
#region Block C
|
||||
public string Nickname
|
||||
public override string Nickname
|
||||
{
|
||||
get
|
||||
{
|
||||
return PKM.array2strG4(Data.Skip(0x48).Take(22).ToArray())
|
||||
return PKX.array2strG4(Data.Skip(0x48).Take(22).ToArray())
|
||||
.Replace("\uE08F", "\u2640") // nidoran
|
||||
.Replace("\uE08E", "\u2642") // nidoran
|
||||
.Replace("\u2019", "\u0027"); // farfetch'd
|
||||
@@ -177,11 +178,11 @@ public string Nickname
|
||||
.Replace("\u2640", "\uE08F") // nidoran
|
||||
.Replace("\u2642", "\uE08E") // nidoran
|
||||
.Replace("\u0027", "\u2019"); // farfetch'd
|
||||
PKM.str2arrayG4(TempNick).CopyTo(Data, 0x48);
|
||||
PKX.str2arrayG4(TempNick).CopyTo(Data, 0x48);
|
||||
}
|
||||
}
|
||||
// 0x5E unused
|
||||
public int Version { get { return Data[0x5F]; } set { Data[0x5F] = (byte)value; } }
|
||||
public override int Version { get { return Data[0x5F]; } set { Data[0x5F] = (byte)value; } }
|
||||
private byte RIB8 { get { return Data[0x60]; } set { Data[0x60] = value; } } // Sinnoh 3
|
||||
public bool RIB8_0 { get { return (RIB8 & (1 << 0)) == 1 << 0; } set { RIB8 = (byte)(RIB8 & ~(1 << 0) | (value ? 1 << 0 : 0)); } } // Cool Ribbon
|
||||
public bool RIB8_1 { get { return (RIB8 & (1 << 1)) == 1 << 1; } set { RIB8 = (byte)(RIB8 & ~(1 << 1) | (value ? 1 << 1 : 0)); } } // Cool Ribbon Great
|
||||
@@ -222,11 +223,11 @@ public string Nickname
|
||||
#endregion
|
||||
|
||||
#region Block D
|
||||
public string OT_Name
|
||||
public override string OT_Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return PKM.array2strG4(Data.Skip(0x68).Take(16).ToArray())
|
||||
return PKX.array2strG4(Data.Skip(0x68).Take(16).ToArray())
|
||||
.Replace("\uE08F", "\u2640") // Nidoran ♂
|
||||
.Replace("\uE08E", "\u2642") // Nidoran ♀
|
||||
.Replace("\u2019", "\u0027"); // Farfetch'd
|
||||
@@ -239,65 +240,85 @@ public string OT_Name
|
||||
.Replace("\u2640", "\uE08F") // Nidoran ♂
|
||||
.Replace("\u2642", "\uE08E") // Nidoran ♀
|
||||
.Replace("\u0027", "\u2019"); // Farfetch'd
|
||||
PKM.str2arrayG4(TempNick).CopyTo(Data, 0x68);
|
||||
PKX.str2arrayG4(TempNick).CopyTo(Data, 0x68);
|
||||
}
|
||||
}
|
||||
public override int Egg_Year { get { return Data[0x78]; } set { Data[0x78] = (byte)value; } }
|
||||
public override int Egg_Month { get { return Data[0x79]; } set { Data[0x79] = (byte)value; } }
|
||||
public override int Egg_Day { get { return Data[0x7A]; } set { Data[0x7A] = (byte)value; } }
|
||||
public override int Met_Year { get { return Data[0x7B]; } set { Data[0x7B] = (byte)value; } }
|
||||
public override int Met_Month { get { return Data[0x7C]; } set { Data[0x7C] = (byte)value; } }
|
||||
public override int Met_Day { get { return Data[0x7D]; } set { Data[0x7D] = (byte)value; } }
|
||||
|
||||
public override int Egg_Location
|
||||
{
|
||||
get
|
||||
{
|
||||
ushort hgssloc = BitConverter.ToUInt16(Data, 0x44);
|
||||
if (hgssloc != 0)
|
||||
return hgssloc;
|
||||
return BitConverter.ToUInt16(Data, 0x7E);
|
||||
}
|
||||
set
|
||||
{
|
||||
if (PtHGSS)
|
||||
{
|
||||
BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x44);
|
||||
BitConverter.GetBytes(0x7D0).CopyTo(Data, 0x7E);
|
||||
}
|
||||
else
|
||||
{
|
||||
BitConverter.GetBytes((ushort)0).CopyTo(Data, 0x44);
|
||||
BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x7E);
|
||||
}
|
||||
}
|
||||
}
|
||||
public override int Met_Location
|
||||
{
|
||||
get
|
||||
{
|
||||
ushort hgssloc = BitConverter.ToUInt16(Data, 0x46);
|
||||
if (hgssloc != 0)
|
||||
return hgssloc;
|
||||
return BitConverter.ToUInt16(Data, 0x80);
|
||||
}
|
||||
set
|
||||
{
|
||||
if (PtHGSS)
|
||||
{
|
||||
BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x46);
|
||||
BitConverter.GetBytes(0x7D0).CopyTo(Data, 0x80);
|
||||
}
|
||||
else
|
||||
{
|
||||
BitConverter.GetBytes((ushort)0).CopyTo(Data, 0x46);
|
||||
BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x80);
|
||||
}
|
||||
}
|
||||
}
|
||||
public int Egg_Year { get { return Data[0x78]; } set { Data[0x78] = (byte)value; } }
|
||||
public int Egg_Month { get { return Data[0x79]; } set { Data[0x79] = (byte)value; } }
|
||||
public int Egg_Day { get { return Data[0x7A]; } set { Data[0x7A] = (byte)value; } }
|
||||
public int Met_Year { get { return Data[0x7B]; } set { Data[0x7B] = (byte)value; } }
|
||||
public int Met_Month { get { return Data[0x7C]; } set { Data[0x7C] = (byte)value; } }
|
||||
public int Met_Day { get { return Data[0x7D]; } set { Data[0x7D] = (byte)value; } }
|
||||
public int Egg_Location { get { return BitConverter.ToUInt16(Data, 0x7E); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x7E); } }
|
||||
public int Met_Location { get { return BitConverter.ToUInt16(Data, 0x80); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x80); } }
|
||||
private byte PKRS { get { return Data[0x82]; } set { Data[0x82] = value; } }
|
||||
public int PKRS_Days { get { return PKRS & 0xF; } set { PKRS = (byte)(PKRS & ~0xF | value); } }
|
||||
public int PKRS_Strain { get { return PKRS >> 4; } set { PKRS = (byte)(PKRS & 0xF | (value << 4)); } }
|
||||
public int Ball { get { return Data[0x83]; } set { Data[0x83] = (byte)value; } }
|
||||
public int Met_Level { get { return Data[0x84] & ~0x80; } set { Data[0x84] = (byte)((Data[0x84] & 0x80) | value); } }
|
||||
public int OT_Gender { get { return Data[0x84] >> 7; } set { Data[0x84] = (byte)((Data[0x84] & ~0x80) | value << 7); } }
|
||||
public int EncounterType { get { return Data[0x85]; } set { Data[0x85] = (byte)value; } }
|
||||
public override int PKRS_Days { get { return PKRS & 0xF; } set { PKRS = (byte)(PKRS & ~0xF | value); } }
|
||||
public override int PKRS_Strain { get { return PKRS >> 4; } set { PKRS = (byte)(PKRS & 0xF | (value << 4)); } }
|
||||
public override int Ball { get { return Data[0x83]; } set { Data[0x83] = (byte)value; } }
|
||||
public override int Met_Level { get { return Data[0x84] & ~0x80; } set { Data[0x84] = (byte)((Data[0x84] & 0x80) | value); } }
|
||||
public override int OT_Gender { get { return Data[0x84] >> 7; } set { Data[0x84] = (byte)((Data[0x84] & ~0x80) | value << 7); } }
|
||||
public override int EncounterType { get { return Data[0x85]; } set { Data[0x85] = (byte)value; } }
|
||||
public int HGSSBall { get { return Data[0x86]; } set { Data[0x86] = (byte)value; } }
|
||||
// Unused 0x87
|
||||
#endregion
|
||||
|
||||
// Simple Generated Attributes
|
||||
public int[] IVs
|
||||
{
|
||||
get { return new[] { IV_HP, IV_ATK, IV_DEF, IV_SPE, IV_SPA, IV_SPD }; }
|
||||
set
|
||||
{
|
||||
if (value == null || value.Length != 6) return;
|
||||
IV_HP = value[0]; IV_ATK = value[1]; IV_DEF = value[2];
|
||||
IV_SPE = value[3]; IV_SPA = value[4]; IV_SPD = value[5];
|
||||
}
|
||||
}
|
||||
public int[] EVs => new[] { EV_HP, EV_ATK, EV_DEF, EV_SPE, EV_SPA, EV_SPD };
|
||||
public int PSV => (int)((PID >> 16 ^ PID & 0xFFFF) >> 3);
|
||||
public int TSV => (TID ^ SID) >> 3;
|
||||
public bool IsShiny => TSV == PSV;
|
||||
public bool PKRS_Infected => PKRS_Strain > 0;
|
||||
public bool PKRS_Cured => PKRS_Days == 0 && PKRS_Strain > 0;
|
||||
public bool Gen4 => Version >= 10 && Version < 12 || Version >= 7 && Version <= 8;
|
||||
public bool Gen3 => Version >= 1 && Version <= 5 || Version == 15;
|
||||
public bool GenU => !(Gen4 || Gen3);
|
||||
public override int Stat_Level { get { return Data[0x8C]; } set { Data[0x8C] = (byte)value; } }
|
||||
public override int Stat_HPCurrent { get { return BitConverter.ToUInt16(Data, 0x8E); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x8E); } }
|
||||
public override int Stat_HPMax { get { return BitConverter.ToUInt16(Data, 0x90); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x90); } }
|
||||
public override int Stat_ATK { get { return BitConverter.ToUInt16(Data, 0x92); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x92); } }
|
||||
public override int Stat_DEF { get { return BitConverter.ToUInt16(Data, 0x94); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x94); } }
|
||||
public override int Stat_SPE { get { return BitConverter.ToUInt16(Data, 0x96); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x96); } }
|
||||
public override int Stat_SPA { get { return BitConverter.ToUInt16(Data, 0x98); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x98); } }
|
||||
public override int Stat_SPD { get { return BitConverter.ToUInt16(Data, 0x9A); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x9A); } }
|
||||
|
||||
public int[] Moves
|
||||
{
|
||||
get { return new[] { Move1, Move2, Move3, Move4 }; }
|
||||
set
|
||||
{
|
||||
if (value.Length > 0) Move1 = value[0];
|
||||
if (value.Length > 1) Move2 = value[1];
|
||||
if (value.Length > 2) Move3 = value[2];
|
||||
if (value.Length > 3) Move4 = value[3];
|
||||
}
|
||||
}
|
||||
|
||||
// Complex Generated Attributes
|
||||
public byte[] EncryptedPartyData => Encrypt().Take(SIZE_PARTY).ToArray();
|
||||
public byte[] EncryptedBoxData => Encrypt().Take(SIZE_STORED).ToArray();
|
||||
public int Characteristic
|
||||
public override int PSV => (int)((PID >> 16 ^ PID & 0xFFFF) >> 3);
|
||||
public override int TSV => (TID ^ SID) >> 3;
|
||||
public override int Characteristic
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -315,40 +336,9 @@ public int Characteristic
|
||||
return pm6stat * 5 + maxIV % 5;
|
||||
}
|
||||
}
|
||||
public int PotentialRating
|
||||
{
|
||||
get
|
||||
{
|
||||
int ivTotal = IVs.Sum();
|
||||
if (ivTotal <= 90)
|
||||
return 0;
|
||||
if (ivTotal <= 120)
|
||||
return 1;
|
||||
return ivTotal <= 150 ? 2 : 3;
|
||||
}
|
||||
}
|
||||
public string FileName => $"{Species.ToString("000")}{(IsShiny ? " ★" : "")} - {Nickname} - {Checksum.ToString("X4")}{PID.ToString("X8")}.pkm";
|
||||
public bool ChecksumValid => Checksum == CalculateChecksum();
|
||||
|
||||
|
||||
// Methods
|
||||
public void RefreshChecksum()
|
||||
{
|
||||
Checksum = CalculateChecksum();
|
||||
}
|
||||
public ushort CalculateChecksum()
|
||||
{
|
||||
ushort chk = 0;
|
||||
for (int i = 8; i < SIZE_STORED; i += 2) // Loop through the entire PK6
|
||||
chk += BitConverter.ToUInt16(Data, i);
|
||||
|
||||
return chk;
|
||||
}
|
||||
public byte[] Write()
|
||||
{
|
||||
RefreshChecksum();
|
||||
return Data;
|
||||
}
|
||||
public bool getGenderIsValid()
|
||||
public override bool getGenderIsValid()
|
||||
{
|
||||
int gv = PKX.Personal[Species].Gender;
|
||||
|
||||
@@ -365,34 +355,10 @@ public bool getGenderIsValid()
|
||||
|
||||
return false;
|
||||
}
|
||||
public void FixMoves()
|
||||
public override byte[] Encrypt()
|
||||
{
|
||||
if (Move4 != 0 && Move3 == 0)
|
||||
{
|
||||
Move3 = Move4;
|
||||
Move3_PP = Move4_PP;
|
||||
Move3_PPUps = Move4_PPUps;
|
||||
Move4 = Move4_PP = Move4_PPUps = 0;
|
||||
}
|
||||
if (Move3 != 0 && Move2 == 0)
|
||||
{
|
||||
Move2 = Move3;
|
||||
Move2_PP = Move3_PP;
|
||||
Move2_PPUps = Move3_PPUps;
|
||||
Move3 = Move3_PP = Move3_PPUps = 0;
|
||||
}
|
||||
if (Move2 != 0 && Move1 == 0)
|
||||
{
|
||||
Move1 = Move2;
|
||||
Move1_PP = Move2_PP;
|
||||
Move1_PPUps = Move2_PPUps;
|
||||
Move2 = Move2_PP = Move2_PPUps = 0;
|
||||
}
|
||||
}
|
||||
public byte[] Encrypt()
|
||||
{
|
||||
Checksum = CalculateChecksum();
|
||||
return PKM.encryptArray(Data);
|
||||
RefreshChecksum();
|
||||
return PKX.encryptArray45(Data);
|
||||
}
|
||||
|
||||
public PK5 convertToPK5()
|
||||
@@ -406,7 +372,7 @@ public PK5 convertToPK5()
|
||||
PK5 pk5 = new PK5(Data) // Convert away!
|
||||
{
|
||||
HeldItem = 0,
|
||||
Friendship = 70,
|
||||
OT_Friendship = 70,
|
||||
// Apply new met date
|
||||
Met_Year = moment.Year - 2000,
|
||||
Met_Month = moment.Month,
|
||||
@@ -420,7 +386,7 @@ public PK5 convertToPK5()
|
||||
pk5.Move4_PP = PKX.getMovePP(pk5.Move4_PP, pk5.Move4_PPUps);
|
||||
|
||||
// Disassociate Nature and PID
|
||||
pk5.Nature = (int)(pk5.PID % 0x19);
|
||||
pk5.Nature = (int)(pk5.PID % 25);
|
||||
|
||||
// Delete Platinum/HGSS Met Location Data
|
||||
BitConverter.GetBytes((uint)0).CopyTo(pk5.Data, 0x44);
|
||||
@@ -6,55 +6,55 @@ namespace PKHeX
|
||||
{
|
||||
public class PK5 : PKM // 5th Generation PKM File
|
||||
{
|
||||
internal const int SIZE_PARTY = 220;
|
||||
internal const int SIZE_STORED = 136;
|
||||
internal const int SIZE_BLOCK = 32;
|
||||
|
||||
internal static readonly byte[] ExtraBytes =
|
||||
{
|
||||
0x42, 0x43, 0x5E, 0x63, 0x64, 0x65, 0x66, 0x67, 0x87
|
||||
};
|
||||
public override int SIZE_PARTY => PKX.SIZE_5PARTY;
|
||||
public override int SIZE_STORED => PKX.SIZE_5STORED;
|
||||
public override int Format => 5;
|
||||
public PK5(byte[] decryptedData = null, string ident = null)
|
||||
{
|
||||
Data = (byte[])(decryptedData ?? new byte[SIZE_PARTY]).Clone();
|
||||
PKMConverter.checkEncrypted(ref Data);
|
||||
Identifier = ident;
|
||||
if (Data.Length != SIZE_PARTY)
|
||||
Array.Resize(ref Data, SIZE_PARTY);
|
||||
}
|
||||
public override PKM Clone() { return new PK5(Data); }
|
||||
|
||||
// Internal Attributes set on creation
|
||||
public byte[] Data; // Raw Storage
|
||||
public string Identifier; // User or Form Custom Attribute
|
||||
// Future Attributes
|
||||
public override uint EncryptionConstant { get { return PID; } set { } }
|
||||
public override int CurrentFriendship { get { return OT_Friendship; } set { OT_Friendship = value; } }
|
||||
public override int CurrentHandler { get { return 0; } set { } }
|
||||
|
||||
// Structure
|
||||
public uint PID { get { return BitConverter.ToUInt32(Data, 0x00); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x00); } }
|
||||
public ushort Sanity { get { return BitConverter.ToUInt16(Data, 0x04); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x04); } }
|
||||
public ushort Checksum { get { return BitConverter.ToUInt16(Data, 0x06); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x06); } }
|
||||
public override uint PID { get { return BitConverter.ToUInt32(Data, 0x00); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x00); } }
|
||||
public override ushort Sanity { get { return BitConverter.ToUInt16(Data, 0x04); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x04); } }
|
||||
public override ushort Checksum { get { return BitConverter.ToUInt16(Data, 0x06); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x06); } }
|
||||
|
||||
#region Block A
|
||||
public int Species { get { return BitConverter.ToUInt16(Data, 0x08); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x08); } }
|
||||
public int HeldItem { get { return BitConverter.ToUInt16(Data, 0x0A); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x0A); } }
|
||||
public int TID { get { return BitConverter.ToUInt16(Data, 0x0C); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x0C); } }
|
||||
public int SID { get { return BitConverter.ToUInt16(Data, 0x0E); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x0E); } }
|
||||
public uint EXP { get { return BitConverter.ToUInt32(Data, 0x10); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x10); } }
|
||||
public int Friendship { get { return Data[0x14]; } set { Data[0x14] = (byte)value; } }
|
||||
public int Ability { get { return Data[0x15]; } set { Data[0x15] = (byte)value; } }
|
||||
public byte Markings { get { return Data[0x16]; } set { Data[0x16] = value; } }
|
||||
public bool Circle { get { return (Markings & (1 << 0)) == 1 << 0; } set { Markings = (byte)(Markings & ~(1 << 0) | (value ? 1 << 0 : 0)); } }
|
||||
public bool Triangle { get { return (Markings & (1 << 1)) == 1 << 1; } set { Markings = (byte)(Markings & ~(1 << 1) | (value ? 1 << 1 : 0)); } }
|
||||
public bool Square { get { return (Markings & (1 << 2)) == 1 << 2; } set { Markings = (byte)(Markings & ~(1 << 2) | (value ? 1 << 2 : 0)); } }
|
||||
public bool Heart { get { return (Markings & (1 << 3)) == 1 << 3; } set { Markings = (byte)(Markings & ~(1 << 3) | (value ? 1 << 3 : 0)); } }
|
||||
public bool Star { get { return (Markings & (1 << 4)) == 1 << 4; } set { Markings = (byte)(Markings & ~(1 << 4) | (value ? 1 << 4 : 0)); } }
|
||||
public bool Diamond { get { return (Markings & (1 << 5)) == 1 << 5; } set { Markings = (byte)(Markings & ~(1 << 5) | (value ? 1 << 5 : 0)); } }
|
||||
public int Language { get { return Data[0x17]; } set { Data[0x17] = (byte)value; } }
|
||||
public int EV_HP { get { return Data[0x18]; } set { Data[0x18] = (byte)value; } }
|
||||
public int EV_ATK { get { return Data[0x19]; } set { Data[0x19] = (byte)value; } }
|
||||
public int EV_DEF { get { return Data[0x1A]; } set { Data[0x1A] = (byte)value; } }
|
||||
public int EV_SPE { get { return Data[0x1B]; } set { Data[0x1B] = (byte)value; } }
|
||||
public int EV_SPA { get { return Data[0x1C]; } set { Data[0x1C] = (byte)value; } }
|
||||
public int EV_SPD { get { return Data[0x1D]; } set { Data[0x1D] = (byte)value; } }
|
||||
public int CNT_Cool { get { return Data[0x1E]; } set { Data[0x1E] = (byte)value; } }
|
||||
public int CNT_Beauty { get { return Data[0x1F]; } set { Data[0x1F] = (byte)value; } }
|
||||
public int CNT_Cute { get { return Data[0x20]; } set { Data[0x20] = (byte)value; } }
|
||||
public int CNT_Smart { get { return Data[0x21]; } set { Data[0x21] = (byte)value; } }
|
||||
public int CNT_Tough { get { return Data[0x22]; } set { Data[0x22] = (byte)value; } }
|
||||
public int CNT_Sheen { get { return Data[0x23]; } set { Data[0x23] = (byte)value; } }
|
||||
public override int Species { get { return BitConverter.ToUInt16(Data, 0x08); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x08); } }
|
||||
public override int HeldItem { get { return BitConverter.ToUInt16(Data, 0x0A); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x0A); } }
|
||||
public override int TID { get { return BitConverter.ToUInt16(Data, 0x0C); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x0C); } }
|
||||
public override int SID { get { return BitConverter.ToUInt16(Data, 0x0E); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x0E); } }
|
||||
public override uint EXP { get { return BitConverter.ToUInt32(Data, 0x10); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x10); } }
|
||||
public override int OT_Friendship { get { return Data[0x14]; } set { Data[0x14] = (byte)value; } }
|
||||
public override int Ability { get { return Data[0x15]; } set { Data[0x15] = (byte)value; } }
|
||||
public override byte MarkByte { get { return Data[0x16]; } protected set { Data[0x16] = value; } }
|
||||
public override int Language { get { return Data[0x17]; } set { Data[0x17] = (byte)value; } }
|
||||
public override int EV_HP { get { return Data[0x18]; } set { Data[0x18] = (byte)value; } }
|
||||
public override int EV_ATK { get { return Data[0x19]; } set { Data[0x19] = (byte)value; } }
|
||||
public override int EV_DEF { get { return Data[0x1A]; } set { Data[0x1A] = (byte)value; } }
|
||||
public override int EV_SPE { get { return Data[0x1B]; } set { Data[0x1B] = (byte)value; } }
|
||||
public override int EV_SPA { get { return Data[0x1C]; } set { Data[0x1C] = (byte)value; } }
|
||||
public override int EV_SPD { get { return Data[0x1D]; } set { Data[0x1D] = (byte)value; } }
|
||||
public override int CNT_Cool { get { return Data[0x1E]; } set { Data[0x1E] = (byte)value; } }
|
||||
public override int CNT_Beauty { get { return Data[0x1F]; } set { Data[0x1F] = (byte)value; } }
|
||||
public override int CNT_Cute { get { return Data[0x20]; } set { Data[0x20] = (byte)value; } }
|
||||
public override int CNT_Smart { get { return Data[0x21]; } set { Data[0x21] = (byte)value; } }
|
||||
public override int CNT_Tough { get { return Data[0x22]; } set { Data[0x22] = (byte)value; } }
|
||||
public override int CNT_Sheen { get { return Data[0x23]; } set { Data[0x23] = (byte)value; } }
|
||||
|
||||
private byte RIB0 { get { return Data[0x24]; } set { Data[0x24] = value; } } // Sinnoh 1
|
||||
public bool RIB0_0 { get { return (RIB0 & (1 << 0)) == 1 << 0; } set { RIB0 = (byte)(RIB0 & ~(1 << 0) | (value ? 1 << 0 : 0)); } } // Sinnoh Champ Ribbon
|
||||
@@ -95,27 +95,27 @@ public PK5(byte[] decryptedData = null, string ident = null)
|
||||
#endregion
|
||||
|
||||
#region Block B
|
||||
public int Move1 { get { return BitConverter.ToUInt16(Data, 0x28); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x28); } }
|
||||
public int Move2 { get { return BitConverter.ToUInt16(Data, 0x2A); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x2A); } }
|
||||
public int Move3 { get { return BitConverter.ToUInt16(Data, 0x2C); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x2C); } }
|
||||
public int Move4 { get { return BitConverter.ToUInt16(Data, 0x2E); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x2E); } }
|
||||
public int Move1_PP { get { return Data[0x30]; } set { Data[0x30] = (byte)value; } }
|
||||
public int Move2_PP { get { return Data[0x31]; } set { Data[0x31] = (byte)value; } }
|
||||
public int Move3_PP { get { return Data[0x32]; } set { Data[0x32] = (byte)value; } }
|
||||
public int Move4_PP { get { return Data[0x33]; } set { Data[0x33] = (byte)value; } }
|
||||
public int Move1_PPUps { get { return Data[0x34]; } set { Data[0x34] = (byte)value; } }
|
||||
public int Move2_PPUps { get { return Data[0x35]; } set { Data[0x35] = (byte)value; } }
|
||||
public int Move3_PPUps { get { return Data[0x36]; } set { Data[0x36] = (byte)value; } }
|
||||
public int Move4_PPUps { get { return Data[0x37]; } set { Data[0x37] = (byte)value; } }
|
||||
public override int Move1 { get { return BitConverter.ToUInt16(Data, 0x28); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x28); } }
|
||||
public override int Move2 { get { return BitConverter.ToUInt16(Data, 0x2A); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x2A); } }
|
||||
public override int Move3 { get { return BitConverter.ToUInt16(Data, 0x2C); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x2C); } }
|
||||
public override int Move4 { get { return BitConverter.ToUInt16(Data, 0x2E); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x2E); } }
|
||||
public override int Move1_PP { get { return Data[0x30]; } set { Data[0x30] = (byte)value; } }
|
||||
public override int Move2_PP { get { return Data[0x31]; } set { Data[0x31] = (byte)value; } }
|
||||
public override int Move3_PP { get { return Data[0x32]; } set { Data[0x32] = (byte)value; } }
|
||||
public override int Move4_PP { get { return Data[0x33]; } set { Data[0x33] = (byte)value; } }
|
||||
public override int Move1_PPUps { get { return Data[0x34]; } set { Data[0x34] = (byte)value; } }
|
||||
public override int Move2_PPUps { get { return Data[0x35]; } set { Data[0x35] = (byte)value; } }
|
||||
public override int Move3_PPUps { get { return Data[0x36]; } set { Data[0x36] = (byte)value; } }
|
||||
public override int Move4_PPUps { get { return Data[0x37]; } set { Data[0x37] = (byte)value; } }
|
||||
private uint IV32 { get { return BitConverter.ToUInt32(Data, 0x38); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x38); } }
|
||||
public int IV_HP { get { return (int)(IV32 >> 00) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 00)) | (uint)((value > 31 ? 31 : value) << 00)); } }
|
||||
public int IV_ATK { get { return (int)(IV32 >> 05) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 05)) | (uint)((value > 31 ? 31 : value) << 05)); } }
|
||||
public int IV_DEF { get { return (int)(IV32 >> 10) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 10)) | (uint)((value > 31 ? 31 : value) << 10)); } }
|
||||
public int IV_SPE { get { return (int)(IV32 >> 15) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 15)) | (uint)((value > 31 ? 31 : value) << 15)); } }
|
||||
public int IV_SPA { get { return (int)(IV32 >> 20) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 20)) | (uint)((value > 31 ? 31 : value) << 20)); } }
|
||||
public int IV_SPD { get { return (int)(IV32 >> 25) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 25)) | (uint)((value > 31 ? 31 : value) << 25)); } }
|
||||
public bool IsEgg { get { return ((IV32 >> 30) & 1) == 1; } set { IV32 = (uint)((IV32 & ~0x40000000) | (uint)(value ? 0x40000000 : 0)); } }
|
||||
public bool IsNicknamed { get { return ((IV32 >> 31) & 1) == 1; } set { IV32 = (IV32 & 0x7FFFFFFF) | (value ? 0x80000000 : 0); } }
|
||||
public override int IV_HP { get { return (int)(IV32 >> 00) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 00)) | (uint)((value > 31 ? 31 : value) << 00)); } }
|
||||
public override int IV_ATK { get { return (int)(IV32 >> 05) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 05)) | (uint)((value > 31 ? 31 : value) << 05)); } }
|
||||
public override int IV_DEF { get { return (int)(IV32 >> 10) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 10)) | (uint)((value > 31 ? 31 : value) << 10)); } }
|
||||
public override int IV_SPE { get { return (int)(IV32 >> 15) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 15)) | (uint)((value > 31 ? 31 : value) << 15)); } }
|
||||
public override int IV_SPA { get { return (int)(IV32 >> 20) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 20)) | (uint)((value > 31 ? 31 : value) << 20)); } }
|
||||
public override int IV_SPD { get { return (int)(IV32 >> 25) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 25)) | (uint)((value > 31 ? 31 : value) << 25)); } }
|
||||
public override bool IsEgg { get { return ((IV32 >> 30) & 1) == 1; } set { IV32 = (uint)((IV32 & ~0x40000000) | (uint)(value ? 0x40000000 : 0)); } }
|
||||
public override bool IsNicknamed { get { return ((IV32 >> 31) & 1) == 1; } set { IV32 = (IV32 & 0x7FFFFFFF) | (value ? 0x80000000 : 0); } }
|
||||
|
||||
private byte RIB4 { get { return Data[0x3C]; } set { Data[0x3C] = value; } } // Hoenn 1a
|
||||
public bool RIB4_0 { get { return (RIB4 & (1 << 0)) == 1 << 0; } set { RIB4 = (byte)(RIB4 & ~(1 << 0) | (value ? 1 << 0 : 0)); } } // Cool Ribbon
|
||||
@@ -154,21 +154,21 @@ public PK5(byte[] decryptedData = null, string ident = null)
|
||||
public bool RIB7_6 { get { return (RIB7 & (1 << 6)) == 1 << 6; } set { RIB7 = (byte)(RIB7 & ~(1 << 6) | (value ? 1 << 6 : 0)); } } // Earth Ribbon
|
||||
public bool RIB7_7 { get { return (RIB7 & (1 << 7)) == 1 << 7; } set { RIB7 = (byte)(RIB7 & ~(1 << 7) | (value ? 1 << 7 : 0)); } } // World Ribbon
|
||||
|
||||
public bool FatefulEncounter { get { return (Data[0x40] & 1) == 1; } set { Data[0x40] = (byte)(Data[0x40] & ~0x01 | (value ? 1 : 0)); } }
|
||||
public int Gender { get { return (Data[0x40] >> 1) & 0x3; } set { Data[0x40] = (byte)(Data[0x40] & ~0x06 | (value << 1)); } }
|
||||
public int AltForm { get { return Data[0x40] >> 3; } set { Data[0x40] = (byte)(Data[0x40] & 0x07 | (value << 3)); } }
|
||||
public int Nature { get { return Data[0x41]; } set { Data[0x41] = (byte)value; } }
|
||||
public override bool FatefulEncounter { get { return (Data[0x40] & 1) == 1; } set { Data[0x40] = (byte)(Data[0x40] & ~0x01 | (value ? 1 : 0)); } }
|
||||
public override int Gender { get { return (Data[0x40] >> 1) & 0x3; } set { Data[0x40] = (byte)(Data[0x40] & ~0x06 | (value << 1)); } }
|
||||
public override int AltForm { get { return Data[0x40] >> 3; } set { Data[0x40] = (byte)(Data[0x40] & 0x07 | (value << 3)); } }
|
||||
public override int Nature { get { return Data[0x41]; } set { Data[0x41] = (byte)value; } }
|
||||
public bool HiddenAbility { get { return (Data[0x41] & 1) == 1; } set { Data[0x41] = (byte)(Data[0x41] & ~0x01 | (value ? 1 : 0)); } }
|
||||
public bool NPokémon { get { return (Data[0x41] & 2) == 2; } set { Data[0x41] = (byte)(Data[0x41] & ~0x02 | (value ? 2 : 0)); } }
|
||||
// 0x43-0x47 Unused
|
||||
#endregion
|
||||
|
||||
#region Block C
|
||||
public string Nickname
|
||||
public override string Nickname
|
||||
{
|
||||
get
|
||||
{
|
||||
return TrimFromFFFF(Encoding.Unicode.GetString(Data, 0x48, 22))
|
||||
return PKX.TrimFromFFFF(Encoding.Unicode.GetString(Data, 0x48, 22))
|
||||
.Replace("\uE08F", "\u2640") // nidoran
|
||||
.Replace("\uE08E", "\u2642") // nidoran
|
||||
.Replace("\u2019", "\u0027"); // farfetch'd
|
||||
@@ -186,7 +186,7 @@ public string Nickname
|
||||
}
|
||||
}
|
||||
// 0x5E unused
|
||||
public int Version { get { return Data[0x5F]; } set { Data[0x5F] = (byte)value; } }
|
||||
public override int Version { get { return Data[0x5F]; } set { Data[0x5F] = (byte)value; } }
|
||||
private byte RIB8 { get { return Data[0x60]; } set { Data[0x60] = value; } } // Sinnoh 3
|
||||
public bool RIB8_0 { get { return (RIB8 & (1 << 0)) == 1 << 0; } set { RIB8 = (byte)(RIB8 & ~(1 << 0) | (value ? 1 << 0 : 0)); } } // Cool Ribbon
|
||||
public bool RIB8_1 { get { return (RIB8 & (1 << 1)) == 1 << 1; } set { RIB8 = (byte)(RIB8 & ~(1 << 1) | (value ? 1 << 1 : 0)); } } // Cool Ribbon Great
|
||||
@@ -227,11 +227,11 @@ public string Nickname
|
||||
#endregion
|
||||
|
||||
#region Block D
|
||||
public string OT_Name
|
||||
public override string OT_Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return TrimFromFFFF(Encoding.Unicode.GetString(Data, 0x68, 16))
|
||||
return PKX.TrimFromFFFF(Encoding.Unicode.GetString(Data, 0x68, 16))
|
||||
.Replace("\uE08F", "\u2640") // Nidoran ♂
|
||||
.Replace("\uE08E", "\u2642") // Nidoran ♀
|
||||
.Replace("\u2019", "\u0027"); // farfetch'd
|
||||
@@ -248,60 +248,37 @@ public string OT_Name
|
||||
Encoding.Unicode.GetBytes(TempNick).CopyTo(Data, 0x68);
|
||||
}
|
||||
}
|
||||
public int Egg_Year { get { return Data[0x78]; } set { Data[0x78] = (byte)value; } }
|
||||
public int Egg_Month { get { return Data[0x79]; } set { Data[0x79] = (byte)value; } }
|
||||
public int Egg_Day { get { return Data[0x7A]; } set { Data[0x7A] = (byte)value; } }
|
||||
public int Met_Year { get { return Data[0x7B]; } set { Data[0x7B] = (byte)value; } }
|
||||
public int Met_Month { get { return Data[0x7C]; } set { Data[0x7C] = (byte)value; } }
|
||||
public int Met_Day { get { return Data[0x7D]; } set { Data[0x7D] = (byte)value; } }
|
||||
public int Egg_Location { get { return BitConverter.ToUInt16(Data, 0x7E); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x7E); } }
|
||||
public int Met_Location { get { return BitConverter.ToUInt16(Data, 0x80); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x80); } }
|
||||
public override int Egg_Year { get { return Data[0x78]; } set { Data[0x78] = (byte)value; } }
|
||||
public override int Egg_Month { get { return Data[0x79]; } set { Data[0x79] = (byte)value; } }
|
||||
public override int Egg_Day { get { return Data[0x7A]; } set { Data[0x7A] = (byte)value; } }
|
||||
public override int Met_Year { get { return Data[0x7B]; } set { Data[0x7B] = (byte)value; } }
|
||||
public override int Met_Month { get { return Data[0x7C]; } set { Data[0x7C] = (byte)value; } }
|
||||
public override int Met_Day { get { return Data[0x7D]; } set { Data[0x7D] = (byte)value; } }
|
||||
public override int Egg_Location { get { return BitConverter.ToUInt16(Data, 0x7E); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x7E); } }
|
||||
public override int Met_Location { get { return BitConverter.ToUInt16(Data, 0x80); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x80); } }
|
||||
private byte PKRS { get { return Data[0x82]; } set { Data[0x82] = value; } }
|
||||
public int PKRS_Days { get { return PKRS & 0xF; } set { PKRS = (byte)(PKRS & ~0xF | value); } }
|
||||
public int PKRS_Strain { get { return PKRS >> 4; } set { PKRS = (byte)(PKRS & 0xF | (value << 4)); } }
|
||||
public int Ball { get { return Data[0x83]; } set { Data[0x83] = (byte)value; } }
|
||||
public int Met_Level { get { return Data[0x84] & ~0x80; } set { Data[0x84] = (byte)((Data[0x84] & 0x80) | value); } }
|
||||
public int OT_Gender { get { return Data[0x84] >> 7; } set { Data[0x84] = (byte)((Data[0x84] & ~0x80) | value << 7); } }
|
||||
public int EncounterType { get { return Data[0x85]; } set { Data[0x85] = (byte)value; } }
|
||||
public override int PKRS_Days { get { return PKRS & 0xF; } set { PKRS = (byte)(PKRS & ~0xF | value); } }
|
||||
public override int PKRS_Strain { get { return PKRS >> 4; } set { PKRS = (byte)(PKRS & 0xF | (value << 4)); } }
|
||||
public override int Ball { get { return Data[0x83]; } set { Data[0x83] = (byte)value; } }
|
||||
public override int Met_Level { get { return Data[0x84] & ~0x80; } set { Data[0x84] = (byte)((Data[0x84] & 0x80) | value); } }
|
||||
public override int OT_Gender { get { return Data[0x84] >> 7; } set { Data[0x84] = (byte)((Data[0x84] & ~0x80) | value << 7); } }
|
||||
public override int EncounterType { get { return Data[0x85]; } set { Data[0x85] = (byte)value; } }
|
||||
// 0x86-0x87 Unused
|
||||
#endregion
|
||||
|
||||
// Simple Generated Attributes
|
||||
public int[] IVs
|
||||
{
|
||||
get { return new[] { IV_HP, IV_ATK, IV_DEF, IV_SPE, IV_SPA, IV_SPD }; }
|
||||
set
|
||||
{
|
||||
if (value == null || value.Length != 6) return;
|
||||
IV_HP = value[0]; IV_ATK = value[1]; IV_DEF = value[2];
|
||||
IV_SPE = value[3]; IV_SPA = value[4]; IV_SPD = value[5];
|
||||
}
|
||||
}
|
||||
public int[] EVs => new[] { EV_HP, EV_ATK, EV_DEF, EV_SPE, EV_SPA, EV_SPD };
|
||||
public int PSV => (int)((PID >> 16 ^ PID & 0xFFFF) >> 3);
|
||||
public int TSV => (TID ^ SID) >> 3;
|
||||
public bool IsShiny => TSV == PSV;
|
||||
public bool PKRS_Infected => PKRS_Strain > 0;
|
||||
public bool PKRS_Cured => PKRS_Days == 0 && PKRS_Strain > 0;
|
||||
public bool Gen5 => Version >= 20 && Version <= 23;
|
||||
public bool Gen4 => Version >= 10 && Version < 12 || Version >= 7 && Version <= 8;
|
||||
public bool Gen3 => Version >= 1 && Version <= 5 || Version == 15;
|
||||
public bool GenU => !(Gen5 || Gen4 || Gen3);
|
||||
public override int Stat_Level { get { return Data[0x8C]; } set { Data[0x8C] = (byte)value; } }
|
||||
public override int Stat_HPCurrent { get { return BitConverter.ToUInt16(Data, 0x8E); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x8E); } }
|
||||
public override int Stat_HPMax { get { return BitConverter.ToUInt16(Data, 0x90); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x90); } }
|
||||
public override int Stat_ATK { get { return BitConverter.ToUInt16(Data, 0x92); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x92); } }
|
||||
public override int Stat_DEF { get { return BitConverter.ToUInt16(Data, 0x94); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x94); } }
|
||||
public override int Stat_SPE { get { return BitConverter.ToUInt16(Data, 0x96); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x96); } }
|
||||
public override int Stat_SPA { get { return BitConverter.ToUInt16(Data, 0x98); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x98); } }
|
||||
public override int Stat_SPD { get { return BitConverter.ToUInt16(Data, 0x9A); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x9A); } }
|
||||
|
||||
public int[] Moves {
|
||||
get { return new[] {Move1, Move2, Move3, Move4}; }
|
||||
set {
|
||||
if (value.Length > 0) Move1 = value[0];
|
||||
if (value.Length > 1) Move2 = value[1];
|
||||
if (value.Length > 2) Move3 = value[2];
|
||||
if (value.Length > 3) Move4 = value[3]; } }
|
||||
|
||||
// Complex Generated Attributes
|
||||
public byte[] EncryptedPartyData => Encrypt().Take(SIZE_PARTY).ToArray();
|
||||
public byte[] EncryptedBoxData => Encrypt().Take(SIZE_STORED).ToArray();
|
||||
public byte[] DecryptedPartyData => Data.Take(SIZE_PARTY).ToArray();
|
||||
public byte[] DecryptedBoxData => Data.Take(SIZE_STORED).ToArray();
|
||||
public int Characteristic
|
||||
// Generated Attributes
|
||||
public override int PSV => (int)((PID >> 16 ^ PID & 0xFFFF) >> 3);
|
||||
public override int TSV => (TID ^ SID) >> 3;
|
||||
public override int Characteristic
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -319,40 +296,9 @@ public int Characteristic
|
||||
return pm6stat * 5 + maxIV % 5;
|
||||
}
|
||||
}
|
||||
public int PotentialRating
|
||||
{
|
||||
get
|
||||
{
|
||||
int ivTotal = IVs.Sum();
|
||||
if (ivTotal <= 90)
|
||||
return 0;
|
||||
if (ivTotal <= 120)
|
||||
return 1;
|
||||
return ivTotal <= 150 ? 2 : 3;
|
||||
}
|
||||
}
|
||||
public string FileName => $"{Species.ToString("000")}{(IsShiny ? " ★" : "")} - {Nickname} - {Checksum.ToString("X4")}{PID.ToString("X8")}.pkm";
|
||||
public bool ChecksumValid => Checksum == CalculateChecksum();
|
||||
|
||||
|
||||
// Methods
|
||||
public void RefreshChecksum()
|
||||
{
|
||||
Checksum = CalculateChecksum();
|
||||
}
|
||||
public ushort CalculateChecksum()
|
||||
{
|
||||
ushort chk = 0;
|
||||
for (int i = 8; i < SIZE_STORED; i += 2) // Loop through the entire PK5
|
||||
chk += BitConverter.ToUInt16(Data, i);
|
||||
|
||||
return chk;
|
||||
}
|
||||
public byte[] Write()
|
||||
{
|
||||
RefreshChecksum();
|
||||
return Data;
|
||||
}
|
||||
public bool getGenderIsValid()
|
||||
public override bool getGenderIsValid()
|
||||
{
|
||||
int gv = PKX.Personal[Species].Gender;
|
||||
if (gv == 255 && Gender == 2)
|
||||
@@ -367,34 +313,10 @@ public bool getGenderIsValid()
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public void FixMoves()
|
||||
public override byte[] Encrypt()
|
||||
{
|
||||
if (Move4 != 0 && Move3 == 0)
|
||||
{
|
||||
Move3 = Move4;
|
||||
Move3_PP = Move4_PP;
|
||||
Move3_PPUps = Move4_PPUps;
|
||||
Move4 = Move4_PP = Move4_PPUps = 0;
|
||||
}
|
||||
if (Move3 != 0 && Move2 == 0)
|
||||
{
|
||||
Move2 = Move3;
|
||||
Move2_PP = Move3_PP;
|
||||
Move2_PPUps = Move3_PPUps;
|
||||
Move3 = Move3_PP = Move3_PPUps = 0;
|
||||
}
|
||||
if (Move2 != 0 && Move1 == 0)
|
||||
{
|
||||
Move1 = Move2;
|
||||
Move1_PP = Move2_PP;
|
||||
Move1_PPUps = Move2_PPUps;
|
||||
Move2 = Move2_PP = Move2_PPUps = 0;
|
||||
}
|
||||
}
|
||||
public byte[] Encrypt()
|
||||
{
|
||||
Checksum = CalculateChecksum();
|
||||
return encryptArray(Data);
|
||||
RefreshChecksum();
|
||||
return PKX.encryptArray45(Data);
|
||||
}
|
||||
|
||||
public PK6 convertToPK6()
|
||||
@@ -581,16 +503,16 @@ public PK6 convertToPK6()
|
||||
pk6.Data[0x34] = (byte)bx34;
|
||||
|
||||
// Write Transfer Location - location is dependent on 3DS system that transfers.
|
||||
pk6.Country = Converter.Country;
|
||||
pk6.Region = Converter.Region;
|
||||
pk6.ConsoleRegion = Converter.ConsoleRegion;
|
||||
pk6.Country = PKMConverter.Country;
|
||||
pk6.Region = PKMConverter.Region;
|
||||
pk6.ConsoleRegion = PKMConverter.ConsoleRegion;
|
||||
|
||||
// Write the Memories, Friendship, and Origin!
|
||||
pk6.CurrentHandler = 1;
|
||||
pk6.HT_Name = Converter.OT_Name;
|
||||
pk6.HT_Gender = Converter.OT_Gender;
|
||||
pk6.Geo1_Region = Converter.Region;
|
||||
pk6.Geo1_Country = Converter.Country;
|
||||
pk6.HT_Name = PKMConverter.OT_Name;
|
||||
pk6.HT_Gender = PKMConverter.OT_Gender;
|
||||
pk6.Geo1_Region = PKMConverter.Region;
|
||||
pk6.Geo1_Country = PKMConverter.Country;
|
||||
pk6.HT_Intensity = 1;
|
||||
pk6.HT_Memory = 4;
|
||||
pk6.HT_Feeling = (int)(Util.rnd32() % 10);
|
||||
@@ -1,104 +1,99 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace PKHeX
|
||||
{
|
||||
public class PK6 : PKX
|
||||
public class PK6 : PKM
|
||||
{
|
||||
internal const int SIZE_PARTY = 0x104;
|
||||
internal const int SIZE_STORED = 0xE8;
|
||||
|
||||
internal static readonly byte[] ExtraBytes =
|
||||
{
|
||||
0x36, 0x37, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x58, 0x59, 0x73, 0x90, 0x91, 0x9E, 0x9F, 0xA0, 0xA1, 0xA7, 0xAA, 0xAB, 0xAC, 0xAD, 0xC8, 0xC9, 0xD7, 0xE4, 0xE5, 0xE6, 0xE7
|
||||
};
|
||||
public override int SIZE_PARTY => PKX.SIZE_6PARTY;
|
||||
public override int SIZE_STORED => PKX.SIZE_6STORED;
|
||||
public override int Format => 6;
|
||||
public PK6(byte[] decryptedData = null, string ident = null)
|
||||
{
|
||||
Data = (byte[])(decryptedData ?? new byte[SIZE_PARTY]).Clone();
|
||||
PKMConverter.checkEncrypted(ref Data);
|
||||
Identifier = ident;
|
||||
if (Data.Length != SIZE_PARTY)
|
||||
Array.Resize(ref Data, SIZE_PARTY);
|
||||
}
|
||||
|
||||
// Internal Attributes set on creation
|
||||
public byte[] Data; // Raw Storage
|
||||
public string Identifier; // User or Form Custom Attribute
|
||||
public override PKM Clone() { return new PK6(Data); }
|
||||
|
||||
// Structure
|
||||
#region Block A
|
||||
public uint EncryptionConstant
|
||||
public override uint EncryptionConstant
|
||||
{
|
||||
get { return BitConverter.ToUInt32(Data, 0x00); }
|
||||
set { BitConverter.GetBytes(value).CopyTo(Data, 0x00); }
|
||||
}
|
||||
public ushort Sanity
|
||||
public override ushort Sanity
|
||||
{
|
||||
get { return BitConverter.ToUInt16(Data, 0x04); }
|
||||
set { BitConverter.GetBytes(value).CopyTo(Data, 0x04); } // Should always be zero...
|
||||
}
|
||||
public ushort Checksum
|
||||
public override ushort Checksum
|
||||
{
|
||||
get { return BitConverter.ToUInt16(Data, 0x06); }
|
||||
set { BitConverter.GetBytes(value).CopyTo(Data, 0x06); }
|
||||
}
|
||||
public int Species
|
||||
public override int Species
|
||||
{
|
||||
get { return BitConverter.ToUInt16(Data, 0x08); }
|
||||
set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x08); }
|
||||
}
|
||||
public int HeldItem
|
||||
public override int HeldItem
|
||||
{
|
||||
get { return BitConverter.ToUInt16(Data, 0x0A); }
|
||||
set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x0A); }
|
||||
}
|
||||
public int TID
|
||||
public override int TID
|
||||
{
|
||||
get { return BitConverter.ToUInt16(Data, 0x0C); }
|
||||
set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x0C); }
|
||||
}
|
||||
public int SID
|
||||
public override int SID
|
||||
{
|
||||
get { return BitConverter.ToUInt16(Data, 0x0E); }
|
||||
set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x0E); }
|
||||
}
|
||||
public uint EXP
|
||||
public override uint EXP
|
||||
{
|
||||
get { return BitConverter.ToUInt32(Data, 0x10); }
|
||||
set { BitConverter.GetBytes(value).CopyTo(Data, 0x10); }
|
||||
}
|
||||
public int Ability { get { return Data[0x14]; } set { Data[0x14] = (byte)value; } }
|
||||
public override int Ability { get { return Data[0x14]; } set { Data[0x14] = (byte)value; } }
|
||||
public int AbilityNumber { get { return Data[0x15]; } set { Data[0x15] = (byte)value; } }
|
||||
public int TrainingBagHits { get { return Data[0x16]; } set { Data[0x16] = (byte)value; } }
|
||||
public int TrainingBag { get { return Data[0x17]; } set { Data[0x17] = (byte)value; } }
|
||||
public uint PID
|
||||
public int TrainingBag { get { return Data[0x17]; } set { Data[0x17] = (byte)value; } }
|
||||
public override uint PID
|
||||
{
|
||||
get { return BitConverter.ToUInt32(Data, 0x18); }
|
||||
set { BitConverter.GetBytes(value).CopyTo(Data, 0x18); }
|
||||
}
|
||||
public int Nature { get { return Data[0x1C]; } set { Data[0x1C] = (byte)value; } }
|
||||
public bool FatefulEncounter { get { return (Data[0x1D] & 1) == 1; } set { Data[0x1D] = (byte)(Data[0x1D] & ~0x01 | (value ? 1 : 0)); } }
|
||||
public int Gender { get { return (Data[0x1D] >> 1) & 0x3; } set { Data[0x1D] = (byte)(Data[0x1D] & ~0x06 | (value << 1)); } }
|
||||
public int AltForm { get { return Data[0x1D] >> 3; } set { Data[0x1D] = (byte)(Data[0x1D] & 0x07 | (value << 3)); } }
|
||||
public int EV_HP { get { return Data[0x1E]; } set { Data[0x1E] = (byte)value; } }
|
||||
public int EV_ATK { get { return Data[0x1F]; } set { Data[0x1F] = (byte)value; } }
|
||||
public int EV_DEF { get { return Data[0x20]; } set { Data[0x20] = (byte)value; } }
|
||||
public int EV_SPE { get { return Data[0x21]; } set { Data[0x21] = (byte)value; } }
|
||||
public int EV_SPA { get { return Data[0x22]; } set { Data[0x22] = (byte)value; } }
|
||||
public int EV_SPD { get { return Data[0x23]; } set { Data[0x23] = (byte)value; } }
|
||||
public int CNT_Cool { get { return Data[0x24]; } set { Data[0x24] = (byte)value; } }
|
||||
public int CNT_Beauty { get { return Data[0x25]; } set { Data[0x25] = (byte)value; } }
|
||||
public int CNT_Cute { get { return Data[0x26]; } set { Data[0x26] = (byte)value; } }
|
||||
public int CNT_Smart { get { return Data[0x27]; } set { Data[0x27] = (byte)value; } }
|
||||
public int CNT_Tough { get { return Data[0x28]; } set { Data[0x28] = (byte)value; } }
|
||||
public int CNT_Sheen { get { return Data[0x29]; } set { Data[0x29] = (byte)value; } }
|
||||
public byte Markings { get { return Data[0x2A]; } set { Data[0x2A] = value; } }
|
||||
public bool Circle { get { return (Markings & (1 << 0)) == 1 << 0; } set { Markings = (byte)(Markings & ~(1 << 0) | (value ? 1 << 0 : 0)); } }
|
||||
public bool Triangle { get { return (Markings & (1 << 1)) == 1 << 1; } set { Markings = (byte)(Markings & ~(1 << 1) | (value ? 1 << 1 : 0)); } }
|
||||
public bool Square { get { return (Markings & (1 << 2)) == 1 << 2; } set { Markings = (byte)(Markings & ~(1 << 2) | (value ? 1 << 2 : 0)); } }
|
||||
public bool Heart { get { return (Markings & (1 << 3)) == 1 << 3; } set { Markings = (byte)(Markings & ~(1 << 3) | (value ? 1 << 3 : 0)); } }
|
||||
public bool Star { get { return (Markings & (1 << 4)) == 1 << 4; } set { Markings = (byte)(Markings & ~(1 << 4) | (value ? 1 << 4 : 0)); } }
|
||||
public bool Diamond { get { return (Markings & (1 << 5)) == 1 << 5; } set { Markings = (byte)(Markings & ~(1 << 5) | (value ? 1 << 5 : 0)); } }
|
||||
public override int Nature { get { return Data[0x1C]; } set { Data[0x1C] = (byte)value; } }
|
||||
public override bool FatefulEncounter { get { return (Data[0x1D] & 1) == 1; } set { Data[0x1D] = (byte)(Data[0x1D] & ~0x01 | (value ? 1 : 0)); } }
|
||||
public override int Gender { get { return (Data[0x1D] >> 1) & 0x3; } set { Data[0x1D] = (byte)(Data[0x1D] & ~0x06 | (value << 1)); } }
|
||||
public override int AltForm { get { return Data[0x1D] >> 3; } set { Data[0x1D] = (byte)(Data[0x1D] & 0x07 | (value << 3)); } }
|
||||
public override int EV_HP { get { return Data[0x1E]; } set { Data[0x1E] = (byte)value; } }
|
||||
public override int EV_ATK { get { return Data[0x1F]; } set { Data[0x1F] = (byte)value; } }
|
||||
public override int EV_DEF { get { return Data[0x20]; } set { Data[0x20] = (byte)value; } }
|
||||
public override int EV_SPE { get { return Data[0x21]; } set { Data[0x21] = (byte)value; } }
|
||||
public override int EV_SPA { get { return Data[0x22]; } set { Data[0x22] = (byte)value; } }
|
||||
public override int EV_SPD { get { return Data[0x23]; } set { Data[0x23] = (byte)value; } }
|
||||
public override int CNT_Cool { get { return Data[0x24]; } set { Data[0x24] = (byte)value; } }
|
||||
public override int CNT_Beauty { get { return Data[0x25]; } set { Data[0x25] = (byte)value; } }
|
||||
public override int CNT_Cute { get { return Data[0x26]; } set { Data[0x26] = (byte)value; } }
|
||||
public override int CNT_Smart { get { return Data[0x27]; } set { Data[0x27] = (byte)value; } }
|
||||
public override int CNT_Tough { get { return Data[0x28]; } set { Data[0x28] = (byte)value; } }
|
||||
public override int CNT_Sheen { get { return Data[0x29]; } set { Data[0x29] = (byte)value; } }
|
||||
public override byte MarkByte { get { return Data[0x2A]; } protected set { Data[0x2A] = value; } }
|
||||
private byte PKRS { get { return Data[0x2B]; } set { Data[0x2B] = value; } }
|
||||
public int PKRS_Days { get { return PKRS & 0xF; } set { PKRS = (byte)(PKRS & ~0xF | value); } }
|
||||
public int PKRS_Strain { get { return PKRS >> 4; } set { PKRS = (byte)(PKRS & 0xF | value << 4); } }
|
||||
public override int PKRS_Days { get { return PKRS & 0xF; } set { PKRS = (byte)(PKRS & ~0xF | value); } }
|
||||
public override int PKRS_Strain { get { return PKRS >> 4; } set { PKRS = (byte)(PKRS & 0xF | value << 4); } }
|
||||
private byte ST1 { get { return Data[0x2C]; } set { Data[0x2C] = value; } }
|
||||
public bool Unused0 { get { return (ST1 & (1 << 0)) == 1 << 0; } set { ST1 = (byte)(ST1 & ~(1 << 0) | (value ? 1 << 0 : 0)); } }
|
||||
public bool Unused1 { get { return (ST1 & (1 << 1)) == 1 << 1; } set { ST1 = (byte)(ST1 & ~(1 << 1) | (value ? 1 << 1 : 0)); } }
|
||||
@@ -209,7 +204,7 @@ public uint PID
|
||||
public byte _0x3F { get { return Data[0x3F]; } set { Data[0x3F] = value; } }
|
||||
#endregion
|
||||
#region Block B
|
||||
public string Nickname
|
||||
public override string Nickname
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -230,50 +225,50 @@ public string Nickname
|
||||
Encoding.Unicode.GetBytes(TempNick).CopyTo(Data, 0x40);
|
||||
}
|
||||
}
|
||||
public int Move1
|
||||
public override int Move1
|
||||
{
|
||||
get { return BitConverter.ToUInt16(Data, 0x5A); }
|
||||
set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x5A); }
|
||||
}
|
||||
public int Move2
|
||||
public override int Move2
|
||||
{
|
||||
get { return BitConverter.ToUInt16(Data, 0x5C); }
|
||||
set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x5C); }
|
||||
}
|
||||
public int Move3
|
||||
public override int Move3
|
||||
{
|
||||
get { return BitConverter.ToUInt16(Data, 0x5E); }
|
||||
set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x5E); }
|
||||
}
|
||||
public int Move4
|
||||
public override int Move4
|
||||
{
|
||||
get { return BitConverter.ToUInt16(Data, 0x60); }
|
||||
set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x60); }
|
||||
}
|
||||
public int Move1_PP { get { return Data[0x62]; } set { Data[0x62] = (byte)value; } }
|
||||
public int Move2_PP { get { return Data[0x63]; } set { Data[0x63] = (byte)value; } }
|
||||
public int Move3_PP { get { return Data[0x64]; } set { Data[0x64] = (byte)value; } }
|
||||
public int Move4_PP { get { return Data[0x65]; } set { Data[0x65] = (byte)value; } }
|
||||
public int Move1_PPUps { get { return Data[0x66]; } set { Data[0x66] = (byte)value; } }
|
||||
public int Move2_PPUps { get { return Data[0x67]; } set { Data[0x67] = (byte)value; } }
|
||||
public int Move3_PPUps { get { return Data[0x68]; } set { Data[0x68] = (byte)value; } }
|
||||
public int Move4_PPUps { get { return Data[0x69]; } set { Data[0x69] = (byte)value; } }
|
||||
public int RelearnMove1
|
||||
public override int Move1_PP { get { return Data[0x62]; } set { Data[0x62] = (byte)value; } }
|
||||
public override int Move2_PP { get { return Data[0x63]; } set { Data[0x63] = (byte)value; } }
|
||||
public override int Move3_PP { get { return Data[0x64]; } set { Data[0x64] = (byte)value; } }
|
||||
public override int Move4_PP { get { return Data[0x65]; } set { Data[0x65] = (byte)value; } }
|
||||
public override int Move1_PPUps { get { return Data[0x66]; } set { Data[0x66] = (byte)value; } }
|
||||
public override int Move2_PPUps { get { return Data[0x67]; } set { Data[0x67] = (byte)value; } }
|
||||
public override int Move3_PPUps { get { return Data[0x68]; } set { Data[0x68] = (byte)value; } }
|
||||
public override int Move4_PPUps { get { return Data[0x69]; } set { Data[0x69] = (byte)value; } }
|
||||
public override int RelearnMove1
|
||||
{
|
||||
get { return BitConverter.ToUInt16(Data, 0x6A); }
|
||||
set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x6A); }
|
||||
}
|
||||
public int RelearnMove2
|
||||
public override int RelearnMove2
|
||||
{
|
||||
get { return BitConverter.ToUInt16(Data, 0x6C); }
|
||||
set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x6C); }
|
||||
}
|
||||
public int RelearnMove3
|
||||
public override int RelearnMove3
|
||||
{
|
||||
get { return BitConverter.ToUInt16(Data, 0x6E); }
|
||||
set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x6E); }
|
||||
}
|
||||
public int RelearnMove4
|
||||
public override int RelearnMove4
|
||||
{
|
||||
get { return BitConverter.ToUInt16(Data, 0x70); }
|
||||
set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x70); }
|
||||
@@ -281,14 +276,14 @@ public int RelearnMove4
|
||||
public bool SecretSuperTraining { get { return Data[0x72] == 1; } set { Data[0x72] = (byte)((Data[0x72] & ~1) | (value ? 1 : 0)); } }
|
||||
public byte _0x73 { get { return Data[0x73]; } set { Data[0x73] = value; } }
|
||||
private uint IV32 { get { return BitConverter.ToUInt32(Data, 0x74); } set { BitConverter.GetBytes(value).CopyTo(Data, 0x74); } }
|
||||
public int IV_HP { get { return (int)(IV32 >> 00) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 00)) | (uint)((value > 31 ? 31 : value) << 00)); } }
|
||||
public int IV_ATK { get { return (int)(IV32 >> 05) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 05)) | (uint)((value > 31 ? 31 : value) << 05)); } }
|
||||
public int IV_DEF { get { return (int)(IV32 >> 10) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 10)) | (uint)((value > 31 ? 31 : value) << 10)); } }
|
||||
public int IV_SPE { get { return (int)(IV32 >> 15) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 15)) | (uint)((value > 31 ? 31 : value) << 15)); } }
|
||||
public int IV_SPA { get { return (int)(IV32 >> 20) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 20)) | (uint)((value > 31 ? 31 : value) << 20)); } }
|
||||
public int IV_SPD { get { return (int)(IV32 >> 25) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 25)) | (uint)((value > 31 ? 31 : value) << 25)); } }
|
||||
public bool IsEgg { get { return ((IV32 >> 30) & 1) == 1; } set { IV32 = (uint)((IV32 & ~0x40000000) | (uint)(value ? 0x40000000 : 0)); } }
|
||||
public bool IsNicknamed { get { return ((IV32 >> 31) & 1) == 1; } set { IV32 = (IV32 & 0x7FFFFFFF) | (value ? 0x80000000 : 0); } }
|
||||
public override int IV_HP { get { return (int)(IV32 >> 00) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 00)) | (uint)((value > 31 ? 31 : value) << 00)); } }
|
||||
public override int IV_ATK { get { return (int)(IV32 >> 05) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 05)) | (uint)((value > 31 ? 31 : value) << 05)); } }
|
||||
public override int IV_DEF { get { return (int)(IV32 >> 10) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 10)) | (uint)((value > 31 ? 31 : value) << 10)); } }
|
||||
public override int IV_SPE { get { return (int)(IV32 >> 15) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 15)) | (uint)((value > 31 ? 31 : value) << 15)); } }
|
||||
public override int IV_SPA { get { return (int)(IV32 >> 20) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 20)) | (uint)((value > 31 ? 31 : value) << 20)); } }
|
||||
public override int IV_SPD { get { return (int)(IV32 >> 25) & 0x1F; } set { IV32 = (uint)((IV32 & ~(0x1F << 25)) | (uint)((value > 31 ? 31 : value) << 25)); } }
|
||||
public override bool IsEgg { get { return ((IV32 >> 30) & 1) == 1; } set { IV32 = (uint)((IV32 & ~0x40000000) | (uint)(value ? 0x40000000 : 0)); } }
|
||||
public override bool IsNicknamed { get { return ((IV32 >> 31) & 1) == 1; } set { IV32 = (IV32 & 0x7FFFFFFF) | (value ? 0x80000000 : 0); } }
|
||||
#endregion
|
||||
#region Block C
|
||||
public string HT_Name
|
||||
@@ -313,7 +308,7 @@ public string HT_Name
|
||||
}
|
||||
}
|
||||
public int HT_Gender { get { return Data[0x92]; } set { Data[0x92] = (byte)value; } }
|
||||
public int CurrentHandler { get { return Data[0x93]; } set { Data[0x93] = (byte)value; } }
|
||||
public override int CurrentHandler { get { return Data[0x93]; } set { Data[0x93] = (byte)value; } }
|
||||
public int Geo1_Region { get { return Data[0x94]; } set { Data[0x94] = (byte)value; } }
|
||||
public int Geo1_Country { get { return Data[0x95]; } set { Data[0x95] = (byte)value; } }
|
||||
public int Geo2_Region { get { return Data[0x96]; } set { Data[0x96] = (byte)value; } }
|
||||
@@ -343,7 +338,7 @@ public string HT_Name
|
||||
public byte Enjoyment { get { return Data[0xAF]; } set { Data[0xAF] = value; } }
|
||||
#endregion
|
||||
#region Block D
|
||||
public string OT_Name
|
||||
public override string OT_Name
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -364,44 +359,44 @@ public string OT_Name
|
||||
Encoding.Unicode.GetBytes(TempNick).CopyTo(Data, 0xB0);
|
||||
}
|
||||
}
|
||||
public int OT_Friendship { get { return Data[0xCA]; } set { Data[0xCA] = (byte)value; } }
|
||||
public int OT_Affection { get { return Data[0xCB]; } set { Data[0xCB] = (byte)value; } }
|
||||
public override int OT_Friendship { get { return Data[0xCA]; } set { Data[0xCA] = (byte)value; } }
|
||||
public override int OT_Affection { get { return Data[0xCB]; } set { Data[0xCB] = (byte)value; } }
|
||||
public int OT_Intensity { get { return Data[0xCC]; } set { Data[0xCC] = (byte)value; } }
|
||||
public int OT_Memory { get { return Data[0xCD]; } set { Data[0xCD] = (byte)value; } }
|
||||
public int OT_TextVar { get { return BitConverter.ToUInt16(Data, 0xCE); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0xCE); } }
|
||||
public int OT_Feeling { get { return Data[0xD0]; } set { Data[0xD0] = (byte)value; } }
|
||||
public int Egg_Year { get { return Data[0xD1]; } set { Data[0xD1] = (byte)value; } }
|
||||
public int Egg_Month { get { return Data[0xD2]; } set { Data[0xD2] = (byte)value; } }
|
||||
public int Egg_Day { get { return Data[0xD3]; } set { Data[0xD3] = (byte)value; } }
|
||||
public int Met_Year { get { return Data[0xD4]; } set { Data[0xD4] = (byte)value; } }
|
||||
public int Met_Month { get { return Data[0xD5]; } set { Data[0xD5] = (byte)value; } }
|
||||
public int Met_Day { get { return Data[0xD6]; } set { Data[0xD6] = (byte)value; } }
|
||||
public override int Egg_Year { get { return Data[0xD1]; } set { Data[0xD1] = (byte)value; } }
|
||||
public override int Egg_Month { get { return Data[0xD2]; } set { Data[0xD2] = (byte)value; } }
|
||||
public override int Egg_Day { get { return Data[0xD3]; } set { Data[0xD3] = (byte)value; } }
|
||||
public override int Met_Year { get { return Data[0xD4]; } set { Data[0xD4] = (byte)value; } }
|
||||
public override int Met_Month { get { return Data[0xD5]; } set { Data[0xD5] = (byte)value; } }
|
||||
public override int Met_Day { get { return Data[0xD6]; } set { Data[0xD6] = (byte)value; } }
|
||||
public byte _0xD7 { get { return Data[0xD7]; } set { Data[0xD7] = value; } }
|
||||
public int Egg_Location { get { return BitConverter.ToUInt16(Data, 0xD8); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0xD8); } }
|
||||
public int Met_Location { get { return BitConverter.ToUInt16(Data, 0xDA); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0xDA); } }
|
||||
public int Ball { get { return Data[0xDC]; } set { Data[0xDC] = (byte)value; } }
|
||||
public int Met_Level { get { return Data[0xDD] & ~0x80; } set { Data[0xDD] = (byte)((Data[0xDD] & 0x80) | value); } }
|
||||
public int OT_Gender { get { return Data[0xDD] >> 7; } set { Data[0xDD] = (byte)((Data[0xDD] & ~0x80) | (value << 7)); } }
|
||||
public int EncounterType { get { return Data[0xDE]; } set { Data[0xDE] = (byte)value; } }
|
||||
public int Version { get { return Data[0xDF]; } set { Data[0xDF] = (byte)value; } }
|
||||
public override int Egg_Location { get { return BitConverter.ToUInt16(Data, 0xD8); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0xD8); } }
|
||||
public override int Met_Location { get { return BitConverter.ToUInt16(Data, 0xDA); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0xDA); } }
|
||||
public override int Ball { get { return Data[0xDC]; } set { Data[0xDC] = (byte)value; } }
|
||||
public override int Met_Level { get { return Data[0xDD] & ~0x80; } set { Data[0xDD] = (byte)((Data[0xDD] & 0x80) | value); } }
|
||||
public override int OT_Gender { get { return Data[0xDD] >> 7; } set { Data[0xDD] = (byte)((Data[0xDD] & ~0x80) | (value << 7)); } }
|
||||
public override int EncounterType { get { return Data[0xDE]; } set { Data[0xDE] = (byte)value; } }
|
||||
public override int Version { get { return Data[0xDF]; } set { Data[0xDF] = (byte)value; } }
|
||||
public int Country { get { return Data[0xE0]; } set { Data[0xE0] = (byte)value; } }
|
||||
public int Region { get { return Data[0xE1]; } set { Data[0xE1] = (byte)value; } }
|
||||
public int ConsoleRegion { get { return Data[0xE2]; } set { Data[0xE2] = (byte)value; } }
|
||||
public int Language { get { return Data[0xE3]; } set { Data[0xE3] = (byte)value; } }
|
||||
public override int Language { get { return Data[0xE3]; } set { Data[0xE3] = (byte)value; } }
|
||||
#endregion
|
||||
#region Battle Stats
|
||||
public int Stat_Level { get { return Data[0xEC]; } set { Data[0xEC] = (byte)value; } }
|
||||
public int Stat_HPCurrent { get { return BitConverter.ToUInt16(Data, 0xF0); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0xF0); } }
|
||||
public int Stat_HPMax { get { return BitConverter.ToUInt16(Data, 0xF2); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0xF2); } }
|
||||
public int Stat_ATK { get { return BitConverter.ToUInt16(Data, 0xF4); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0xF4); } }
|
||||
public int Stat_DEF { get { return BitConverter.ToUInt16(Data, 0xF6); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0xF6); } }
|
||||
public int Stat_SPE { get { return BitConverter.ToUInt16(Data, 0xF8); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0xF8); } }
|
||||
public int Stat_SPA { get { return BitConverter.ToUInt16(Data, 0xFA); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0xFA); } }
|
||||
public int Stat_SPD { get { return BitConverter.ToUInt16(Data, 0xFC); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0xFC); } }
|
||||
public override int Stat_Level { get { return Data[0xEC]; } set { Data[0xEC] = (byte)value; } }
|
||||
public override int Stat_HPCurrent { get { return BitConverter.ToUInt16(Data, 0xF0); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0xF0); } }
|
||||
public override int Stat_HPMax { get { return BitConverter.ToUInt16(Data, 0xF2); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0xF2); } }
|
||||
public override int Stat_ATK { get { return BitConverter.ToUInt16(Data, 0xF4); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0xF4); } }
|
||||
public override int Stat_DEF { get { return BitConverter.ToUInt16(Data, 0xF6); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0xF6); } }
|
||||
public override int Stat_SPE { get { return BitConverter.ToUInt16(Data, 0xF8); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0xF8); } }
|
||||
public override int Stat_SPA { get { return BitConverter.ToUInt16(Data, 0xFA); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0xFA); } }
|
||||
public override int Stat_SPD { get { return BitConverter.ToUInt16(Data, 0xFC); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0xFC); } }
|
||||
#endregion
|
||||
|
||||
// Simple Generated Attributes
|
||||
public int CurrentFriendship {
|
||||
public override int CurrentFriendship {
|
||||
get { return CurrentHandler == 0 ? OT_Friendship : HT_Friendship; }
|
||||
set { if (CurrentHandler == 0) OT_Friendship = value; else HT_Friendship = value; }
|
||||
}
|
||||
@@ -410,41 +405,12 @@ public int OppositeFriendship
|
||||
get { return CurrentHandler == 1 ? OT_Friendship : HT_Friendship; }
|
||||
set { if (CurrentHandler == 1) OT_Friendship = value; else HT_Friendship = value; }
|
||||
}
|
||||
|
||||
public int[] IVs {
|
||||
get { return new[] {IV_HP, IV_ATK, IV_DEF, IV_SPE, IV_SPA, IV_SPD}; }
|
||||
set { if (value == null || value.Length != 6) return;
|
||||
IV_HP = value[0]; IV_ATK = value[1]; IV_DEF = value[2];
|
||||
IV_SPE = value[3]; IV_SPA = value[4]; IV_SPD = value[5]; } }
|
||||
public int[] EVs => new[] { EV_HP, EV_ATK, EV_DEF, EV_SPE, EV_SPA, EV_SPD };
|
||||
public int[] CNTs => new[] { CNT_Cool, CNT_Beauty, CNT_Cute, CNT_Smart, CNT_Tough, CNT_Sheen };
|
||||
public int PSV => (int)((PID >> 16 ^ PID & 0xFFFF) >> 4);
|
||||
public int TSV => (TID ^ SID) >> 4;
|
||||
public bool IsShiny => TSV == PSV;
|
||||
public bool PKRS_Infected => PKRS_Strain > 0;
|
||||
public bool PKRS_Cured => PKRS_Days == 0 && PKRS_Strain > 0;
|
||||
|
||||
public override int PSV => (int)((PID >> 16 ^ PID & 0xFFFF) >> 4);
|
||||
public override int TSV => (TID ^ SID) >> 4;
|
||||
public bool IsUntraded => string.IsNullOrWhiteSpace(HT_Name);
|
||||
public bool IsUntradedEvent6 => Geo1_Country == 0 && Geo1_Region == 0 && Met_Location / 10000 == 4 && Gen6;
|
||||
public bool Gen6 => Version >= 24 && Version <= 29;
|
||||
public bool XY => Version == (int)GameVersion.X || Version == (int)GameVersion.Y;
|
||||
public bool AO => Version == (int)GameVersion.AS || Version == (int)GameVersion.OR;
|
||||
public bool SM => Version == (int)GameVersion.SN || Version == (int)GameVersion.MN;
|
||||
public bool Gen5 => Version >= 20 && Version <= 23;
|
||||
public bool Gen4 => Version >= 7 && Version <= 12 && Version != 9;
|
||||
public bool Gen3 => Version >= 1 && Version <= 5 || Version == 15;
|
||||
public bool GenU => !(Gen6 || Gen5 || Gen4 || Gen3);
|
||||
|
||||
public int[] Moves
|
||||
{
|
||||
get { return new[] { Move1, Move2, Move3, Move4 }; }
|
||||
set
|
||||
{
|
||||
if (value.Length > 0) Move1 = value[0];
|
||||
if (value.Length > 1) Move2 = value[1];
|
||||
if (value.Length > 2) Move3 = value[2];
|
||||
if (value.Length > 3) Move4 = value[3];
|
||||
}
|
||||
}
|
||||
|
||||
public int[] RelearnMoves
|
||||
{
|
||||
get { return new[] { RelearnMove1, RelearnMove2, RelearnMove3, RelearnMove4 }; }
|
||||
@@ -456,31 +422,10 @@ public int[] RelearnMoves
|
||||
if (value.Length > 3) RelearnMove4 = value[3];
|
||||
}
|
||||
}
|
||||
public int CurrentLevel => getLevel(Species, EXP);
|
||||
|
||||
// Complex Generated Attributes
|
||||
public Image Sprite => getSprite(this);
|
||||
public string ShowdownText => getShowdownText(this);
|
||||
public string[] QRText => getQRText(this);
|
||||
public byte[] EncryptedPartyData => Encrypt().Take(SIZE_PARTY).ToArray();
|
||||
public byte[] EncryptedBoxData => Encrypt().Take(SIZE_STORED).ToArray();
|
||||
public byte[] DecryptedPartyData => Data.Take(SIZE_PARTY).ToArray();
|
||||
public byte[] DecryptedBoxData => Data.Take(SIZE_STORED).ToArray();
|
||||
|
||||
public int HPType
|
||||
{
|
||||
get { return 15 * ((IV_HP & 1) + 2 * (IV_ATK & 1) + 4 * (IV_DEF & 1) + 8 * (IV_SPE & 1) + 16 * (IV_SPA & 1) + 32 * (IV_SPD & 1)) / 63; }
|
||||
set
|
||||
{
|
||||
IV_HP = (IV_HP & ~1) + hpivs[value, 0];
|
||||
IV_ATK = (IV_ATK & ~1) + hpivs[value, 1];
|
||||
IV_DEF = (IV_DEF & ~1) + hpivs[value, 2];
|
||||
IV_SPE = (IV_SPE & ~1) + hpivs[value, 3];
|
||||
IV_SPA = (IV_SPA & ~1) + hpivs[value, 4];
|
||||
IV_SPD = (IV_SPD & ~1) + hpivs[value, 5];
|
||||
}
|
||||
}
|
||||
public int Characteristic
|
||||
public override int Characteristic
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -495,86 +440,27 @@ public int Characteristic
|
||||
return pm6stat*5 + maxIV%5;
|
||||
}
|
||||
}
|
||||
public int PotentialRating
|
||||
{
|
||||
get
|
||||
{
|
||||
int ivTotal = IVs.Sum();
|
||||
if (ivTotal <= 90)
|
||||
return 0;
|
||||
if (ivTotal <= 120)
|
||||
return 1;
|
||||
return ivTotal <= 150 ? 2 : 3;
|
||||
}
|
||||
}
|
||||
public string FileName => getFileName(this);
|
||||
public bool ChecksumValid => Checksum == CalculateChecksum();
|
||||
|
||||
// Methods
|
||||
public void RefreshChecksum()
|
||||
public override byte[] Encrypt()
|
||||
{
|
||||
Checksum = CalculateChecksum();
|
||||
return PKX.encryptArray(Data);
|
||||
}
|
||||
public ushort CalculateChecksum()
|
||||
public override bool getGenderIsValid()
|
||||
{
|
||||
ushort chk = 0;
|
||||
for (int i = 8; i < SIZE_STORED; i += 2) // Loop through the entire PK6
|
||||
chk += BitConverter.ToUInt16(Data, i);
|
||||
int gv = PKX.Personal[Species].Gender;
|
||||
|
||||
return chk;
|
||||
}
|
||||
public byte[] Write()
|
||||
{
|
||||
RefreshChecksum();
|
||||
return Data;
|
||||
}
|
||||
public byte[] Encrypt()
|
||||
{
|
||||
Checksum = CalculateChecksum();
|
||||
return encryptArray(Data);
|
||||
}
|
||||
public void CalculateStats()
|
||||
{
|
||||
ushort[] Stats = getStats(this);
|
||||
Stat_HPMax = Stat_HPCurrent = Stats[0];
|
||||
Stat_ATK = Stats[1];
|
||||
Stat_DEF = Stats[2];
|
||||
Stat_SPE = Stats[3];
|
||||
Stat_SPA = Stats[4];
|
||||
Stat_SPD = Stats[5];
|
||||
if (gv == 255)
|
||||
return Gender == 2;
|
||||
if (gv == 254)
|
||||
return Gender == 0;
|
||||
if (gv == 0)
|
||||
return Gender == 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
// General User-error Fixes
|
||||
public void FixMoves()
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
if (Move4 != 0 && Move3 == 0)
|
||||
{
|
||||
Move3 = Move4;
|
||||
Move3_PP = Move4_PP;
|
||||
Move3_PPUps = Move4_PPUps;
|
||||
Move4 = Move4_PP = Move4_PPUps = 0;
|
||||
}
|
||||
if (Move3 != 0 && Move2 == 0)
|
||||
{
|
||||
Move2 = Move3;
|
||||
Move2_PP = Move3_PP;
|
||||
Move2_PPUps = Move3_PPUps;
|
||||
Move3 = Move3_PP = Move3_PPUps = 0;
|
||||
continue;
|
||||
}
|
||||
if (Move2 != 0 && Move1 == 0)
|
||||
{
|
||||
Move1 = Move2;
|
||||
Move1_PP = Move2_PP;
|
||||
Move1_PPUps = Move2_PPUps;
|
||||
Move2 = Move2_PP = Move2_PPUps = 0;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
public void FixRelearn()
|
||||
{
|
||||
while (true)
|
||||
@@ -743,7 +629,7 @@ public void TradeFriendshipAffection(string SAV_TRAINER)
|
||||
return;
|
||||
|
||||
// Reset
|
||||
HT_Friendship = getBaseFriendship(Species);
|
||||
HT_Friendship = PKX.getBaseFriendship(Species);
|
||||
HT_Affection = 0;
|
||||
}
|
||||
|
||||
285
PKM/PKM.cs
Normal file
@@ -0,0 +1,285 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
|
||||
namespace PKHeX
|
||||
{
|
||||
public abstract class PKM
|
||||
{
|
||||
public abstract int SIZE_PARTY { get; }
|
||||
public abstract int SIZE_STORED { get; }
|
||||
public string Extension => "pk" + Format;
|
||||
|
||||
// Internal Attributes set on creation
|
||||
public byte[] Data; // Raw Storage
|
||||
public string Identifier; // User or Form Custom Attribute
|
||||
|
||||
public byte[] EncryptedPartyData => Encrypt().Take(SIZE_PARTY).ToArray();
|
||||
public byte[] EncryptedBoxData => Encrypt().Take(SIZE_STORED).ToArray();
|
||||
public byte[] DecryptedPartyData => Write().Take(SIZE_PARTY).ToArray();
|
||||
public byte[] DecryptedBoxData => Write().Take(SIZE_STORED).ToArray();
|
||||
|
||||
protected ushort CalculateChecksum()
|
||||
{
|
||||
ushort chk = 0;
|
||||
switch (Format)
|
||||
{
|
||||
case 3:
|
||||
for (int i = 32; i < SIZE_STORED; i += 2)
|
||||
chk += BitConverter.ToUInt16(Data, i);
|
||||
return chk;
|
||||
default: // 4+
|
||||
for (int i = 8; i < SIZE_STORED; i += 2)
|
||||
chk += BitConverter.ToUInt16(Data, i);
|
||||
return chk;
|
||||
}
|
||||
}
|
||||
public abstract byte[] Encrypt();
|
||||
public abstract int Format { get; }
|
||||
public byte[] Write()
|
||||
{
|
||||
RefreshChecksum();
|
||||
return Data;
|
||||
}
|
||||
|
||||
// Surface Properties
|
||||
public abstract int Species { get; set; }
|
||||
public abstract string Nickname { get; set; }
|
||||
public abstract int HeldItem { get; set; }
|
||||
public abstract int Gender { get; set; }
|
||||
public abstract int Nature { get; set; }
|
||||
public abstract int Ability { get; set; }
|
||||
public abstract int CurrentFriendship { get; set; }
|
||||
public abstract int AltForm { get; set; }
|
||||
public abstract bool IsEgg { get; set; }
|
||||
public abstract bool IsNicknamed { get; set; }
|
||||
public abstract uint EXP { get; set; }
|
||||
public abstract int TID { get; set; }
|
||||
public abstract string OT_Name { get; set; }
|
||||
public abstract int OT_Gender { get; set; }
|
||||
public abstract int Ball { get; set; }
|
||||
public abstract int Met_Level { get; set; }
|
||||
|
||||
// Battle
|
||||
public abstract int Move1 { get; set; }
|
||||
public abstract int Move2 { get; set; }
|
||||
public abstract int Move3 { get; set; }
|
||||
public abstract int Move4 { get; set; }
|
||||
public abstract int Move1_PP { get; set; }
|
||||
public abstract int Move2_PP { get; set; }
|
||||
public abstract int Move3_PP { get; set; }
|
||||
public abstract int Move4_PP { get; set; }
|
||||
public abstract int Move1_PPUps { get; set; }
|
||||
public abstract int Move2_PPUps { get; set; }
|
||||
public abstract int Move3_PPUps { get; set; }
|
||||
public abstract int Move4_PPUps { get; set; }
|
||||
public abstract int EV_HP { get; set; }
|
||||
public abstract int EV_ATK { get; set; }
|
||||
public abstract int EV_DEF { get; set; }
|
||||
public abstract int EV_SPE { get; set; }
|
||||
public abstract int EV_SPA { get; set; }
|
||||
public abstract int EV_SPD { get; set; }
|
||||
public abstract int IV_HP { get; set; }
|
||||
public abstract int IV_ATK { get; set; }
|
||||
public abstract int IV_DEF { get; set; }
|
||||
public abstract int IV_SPE { get; set; }
|
||||
public abstract int IV_SPA { get; set; }
|
||||
public abstract int IV_SPD { get; set; }
|
||||
public abstract int Stat_Level { get; set; }
|
||||
public abstract int Stat_HPMax { get; set; }
|
||||
public abstract int Stat_HPCurrent { get; set; }
|
||||
public abstract int Stat_ATK { get; set; }
|
||||
public abstract int Stat_DEF { get; set; }
|
||||
public abstract int Stat_SPE { get; set; }
|
||||
public abstract int Stat_SPA { get; set; }
|
||||
public abstract int Stat_SPD { get; set; }
|
||||
|
||||
// Hidden Properties
|
||||
public abstract int Version { get; set; }
|
||||
public abstract int SID { get; set; }
|
||||
public abstract int PKRS_Strain { get; set; }
|
||||
public abstract int PKRS_Days { get; set; }
|
||||
public abstract int CNT_Cool { get; set; }
|
||||
public abstract int CNT_Beauty { get; set; }
|
||||
public abstract int CNT_Cute { get; set; }
|
||||
public abstract int CNT_Smart { get; set; }
|
||||
public abstract int CNT_Tough { get; set; }
|
||||
public abstract int CNT_Sheen { get; set; }
|
||||
|
||||
public abstract uint EncryptionConstant { get; set; }
|
||||
public abstract uint PID { get; set; }
|
||||
public abstract ushort Sanity { get; set; }
|
||||
public abstract ushort Checksum { get; set; }
|
||||
|
||||
// Misc Properties
|
||||
public abstract int Language { get; set; }
|
||||
public abstract bool FatefulEncounter { get; set; }
|
||||
public abstract int TSV { get; }
|
||||
public abstract int PSV { get; }
|
||||
public abstract int Characteristic { get; }
|
||||
public abstract byte MarkByte { get; protected set; }
|
||||
public abstract int Met_Location { get; set; }
|
||||
public abstract int Egg_Location { get; set; }
|
||||
public abstract int OT_Friendship { get; set; }
|
||||
|
||||
// Future Properties
|
||||
public virtual int Met_Year { get { return 0; } set { } }
|
||||
public virtual int Met_Month { get { return 0; } set { } }
|
||||
public virtual int Met_Day { get { return 0; } set { } }
|
||||
public virtual int Egg_Year { get { return 0; } set { } }
|
||||
public virtual int Egg_Month { get { return 0; } set { } }
|
||||
public virtual int Egg_Day { get { return 0; } set { } }
|
||||
public virtual int OT_Affection { get { return 0; } set { } }
|
||||
public virtual int RelearnMove1 { get { return 0; } set { } }
|
||||
public virtual int RelearnMove2 { get { return 0; } set { } }
|
||||
public virtual int RelearnMove3 { get { return 0; } set { } }
|
||||
public virtual int RelearnMove4 { get { return 0; } set { } }
|
||||
public virtual int EncounterType { get { return 0; } set { } }
|
||||
|
||||
// Exposed but not Present in all
|
||||
public abstract int CurrentHandler { get; set; }
|
||||
|
||||
// Derived
|
||||
public bool IsShiny => TSV == PSV;
|
||||
public bool Gen6 => Version >= 24 && Version <= 29;
|
||||
public bool XY => Version == (int)GameVersion.X || Version == (int)GameVersion.Y;
|
||||
public bool AO => Version == (int)GameVersion.AS || Version == (int)GameVersion.OR;
|
||||
public bool SM => Version == (int)GameVersion.SN || Version == (int)GameVersion.MN;
|
||||
public bool PtHGSS => new[] {GameVersion.Pt, GameVersion.HG, GameVersion.SS}.Contains((GameVersion)Version);
|
||||
public bool Gen5 => Version >= 20 && Version <= 23;
|
||||
public bool Gen4 => Version >= 10 && Version < 12 || Version >= 7 && Version <= 8;
|
||||
public bool Gen3 => Version >= 1 && Version <= 5 || Version == 15;
|
||||
public bool GenU => !(Gen6 || Gen5 || Gen4 || Gen3);
|
||||
public bool PKRS_Infected => PKRS_Strain > 0;
|
||||
public bool PKRS_Cured => PKRS_Days == 0 && PKRS_Strain > 0;
|
||||
public bool ChecksumValid => Checksum == CalculateChecksum();
|
||||
public int CurrentLevel => PKX.getLevel(Species, EXP);
|
||||
public bool Circle { get { return Markings[0]; } set { Markings[0] = value; } }
|
||||
public bool Triangle { get { return Markings[1]; } set { Markings[1] = value; } }
|
||||
public bool Square { get { return Markings[2]; } set { Markings[2] = value; } }
|
||||
public bool Heart { get { return Markings[3]; } set { Markings[3] = value; } }
|
||||
public bool Star { get { return Markings[4]; } set { Markings[4] = value; } }
|
||||
public bool Diamond { get { return Markings[5]; } set { Markings[5] = value; } }
|
||||
public Image Sprite => PKX.getSprite(this);
|
||||
public string ShowdownText => ShowdownSet.getShowdownText(this);
|
||||
public string[] QRText => PKX.getQRText(this);
|
||||
public string FileName => PKX.getFileName(this);
|
||||
public int[] IVs
|
||||
{
|
||||
get { return new[] { IV_HP, IV_ATK, IV_DEF, IV_SPE, IV_SPA, IV_SPD }; }
|
||||
set
|
||||
{
|
||||
if (value?.Length != 6) return;
|
||||
IV_HP = value[0]; IV_ATK = value[1]; IV_DEF = value[2];
|
||||
IV_SPE = value[3]; IV_SPA = value[4]; IV_SPD = value[5];
|
||||
}
|
||||
}
|
||||
public int[] EVs
|
||||
{
|
||||
get { return new[] { EV_HP, EV_ATK, EV_DEF, EV_SPE, EV_SPA, EV_SPD }; }
|
||||
set
|
||||
{
|
||||
if (value?.Length != 6) return;
|
||||
EV_HP = value[0]; EV_ATK = value[1]; EV_DEF = value[2];
|
||||
EV_SPE = value[3]; EV_SPA = value[4]; EV_SPD = value[5];
|
||||
}
|
||||
}
|
||||
public int[] Moves
|
||||
{
|
||||
get { return new[] { Move1, Move2, Move3, Move4 }; }
|
||||
set { if (value?.Length != 4) return; Move1 = value[0]; Move2 = value[1]; Move3 = value[2]; Move4 = value[3]; }
|
||||
}
|
||||
|
||||
public bool[] Markings
|
||||
{
|
||||
get
|
||||
{
|
||||
bool[] mark = new bool[8];
|
||||
for (int i = 0; i < 8; i++)
|
||||
mark[i] = ((MarkByte >> i) & 1) == 1;
|
||||
return mark;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value.Length > 8)
|
||||
return;
|
||||
byte b = 0;
|
||||
for (int i = 0; i < value.Length; i++)
|
||||
b |= (byte)(value[i] ? 1 << i : 0);
|
||||
MarkByte = b;
|
||||
}
|
||||
}
|
||||
|
||||
public int[] CNTs
|
||||
{
|
||||
get { return new[] { CNT_Cool, CNT_Beauty, CNT_Cute, CNT_Smart, CNT_Tough, CNT_Sheen }; }
|
||||
set { if (value?.Length != 6) return; CNT_Cool = value[0]; CNT_Beauty = value[1]; CNT_Cute = value[2]; CNT_Smart = value[3]; CNT_Tough = value[4]; CNT_Sheen = value[5]; }
|
||||
}
|
||||
public int HPType
|
||||
{
|
||||
get { return 15 * ((IV_HP & 1) + 2 * (IV_ATK & 1) + 4 * (IV_DEF & 1) + 8 * (IV_SPE & 1) + 16 * (IV_SPA & 1) + 32 * (IV_SPD & 1)) / 63; }
|
||||
set
|
||||
{
|
||||
IV_HP = (IV_HP & ~1) + PKX.hpivs[value, 0];
|
||||
IV_ATK = (IV_ATK & ~1) + PKX.hpivs[value, 1];
|
||||
IV_DEF = (IV_DEF & ~1) + PKX.hpivs[value, 2];
|
||||
IV_SPE = (IV_SPE & ~1) + PKX.hpivs[value, 3];
|
||||
IV_SPA = (IV_SPA & ~1) + PKX.hpivs[value, 4];
|
||||
IV_SPD = (IV_SPD & ~1) + PKX.hpivs[value, 5];
|
||||
}
|
||||
}
|
||||
|
||||
// Methods
|
||||
public abstract bool getGenderIsValid();
|
||||
public void RefreshChecksum() { Checksum = CalculateChecksum(); }
|
||||
public void FixMoves()
|
||||
{
|
||||
if (Move4 != 0 && Move3 == 0)
|
||||
{
|
||||
Move3 = Move4;
|
||||
Move3_PP = Move4_PP;
|
||||
Move3_PPUps = Move4_PPUps;
|
||||
Move4 = Move4_PP = Move4_PPUps = 0;
|
||||
}
|
||||
if (Move3 != 0 && Move2 == 0)
|
||||
{
|
||||
Move2 = Move3;
|
||||
Move2_PP = Move3_PP;
|
||||
Move2_PPUps = Move3_PPUps;
|
||||
Move3 = Move3_PP = Move3_PPUps = 0;
|
||||
}
|
||||
if (Move2 != 0 && Move1 == 0)
|
||||
{
|
||||
Move1 = Move2;
|
||||
Move1_PP = Move2_PP;
|
||||
Move1_PPUps = Move2_PPUps;
|
||||
Move2 = Move2_PP = Move2_PPUps = 0;
|
||||
}
|
||||
}
|
||||
public int PotentialRating
|
||||
{
|
||||
get
|
||||
{
|
||||
int ivTotal = IVs.Sum();
|
||||
if (ivTotal <= 90)
|
||||
return 0;
|
||||
if (ivTotal <= 120)
|
||||
return 1;
|
||||
return ivTotal <= 150 ? 2 : 3;
|
||||
}
|
||||
}
|
||||
|
||||
public void CalculateStats()
|
||||
{
|
||||
ushort[] Stats = PKX.getStats(this);
|
||||
Stat_HPMax = Stat_HPCurrent = Stats[0];
|
||||
Stat_ATK = Stats[1];
|
||||
Stat_DEF = Stats[2];
|
||||
Stat_SPE = Stats[3];
|
||||
Stat_SPA = Stats[4];
|
||||
Stat_SPD = Stats[5];
|
||||
}
|
||||
|
||||
public abstract PKM Clone();
|
||||
}
|
||||
}
|
||||
138
PKM/PKMConverter.cs
Normal file
@@ -0,0 +1,138 @@
|
||||
using System;
|
||||
|
||||
namespace PKHeX
|
||||
{
|
||||
internal static class PKMConverter
|
||||
{
|
||||
internal static int Country = 31;
|
||||
internal static int Region = 7;
|
||||
internal static int ConsoleRegion = 1;
|
||||
internal static string OT_Name = "PKHeX";
|
||||
internal static int OT_Gender;
|
||||
|
||||
internal static void updateConfig(int SUBREGION, int COUNTRY, int _3DSREGION, string TRAINERNAME, int TRAINERGENDER)
|
||||
{
|
||||
Region = SUBREGION;
|
||||
Country = COUNTRY;
|
||||
ConsoleRegion = _3DSREGION;
|
||||
OT_Name = TRAINERNAME;
|
||||
OT_Gender = TRAINERGENDER;
|
||||
}
|
||||
|
||||
private static int getPKMDataFormat(byte[] data)
|
||||
{
|
||||
if (!PKX.getIsPKM(data.Length))
|
||||
return -1;
|
||||
|
||||
switch (data.Length)
|
||||
{
|
||||
case PKX.SIZE_3PARTY:
|
||||
case PKX.SIZE_3STORED:
|
||||
return 3;
|
||||
case PKX.SIZE_4PARTY:
|
||||
case PKX.SIZE_4STORED:
|
||||
case PKX.SIZE_5PARTY:
|
||||
if ((BitConverter.ToUInt16(data, 0x80) >= 0x3333 || data[0x5F] >= 0x10) && BitConverter.ToUInt16(data, 0x46) == 0) // PK5
|
||||
return 5;
|
||||
return 4;
|
||||
case PKX.SIZE_6STORED:
|
||||
return 6;
|
||||
case PKX.SIZE_6PARTY: // collision with PGT, same size.
|
||||
if (BitConverter.ToUInt16(data, 0x4) != 0) // Bad Sanity?
|
||||
return -1;
|
||||
if (BitConverter.ToUInt16(data, 0x58) != 0) // Encrypted?
|
||||
{
|
||||
PKX.getCHK(data);
|
||||
for (int i = data.Length - 0x10; i < data.Length; i++) // 0x10 of 00's at the end != PK6
|
||||
if (data[i] != 0)
|
||||
break;
|
||||
return 6;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
internal static PKM getPKMfromBytes(byte[] data, string ident = null)
|
||||
{
|
||||
checkEncrypted(ref data);
|
||||
switch (getPKMDataFormat(data))
|
||||
{
|
||||
case 3:
|
||||
return new PK3(data, ident);
|
||||
case 4:
|
||||
return new PK4(data, ident);
|
||||
case 5:
|
||||
return new PK5(data, ident);
|
||||
case 6:
|
||||
return new PK6(data, ident);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
internal static PKM convertToFormat(PKM pk, int Format, out string comment)
|
||||
{
|
||||
if (pk == null)
|
||||
{
|
||||
comment = "Null input. Aborting.";
|
||||
return null;
|
||||
}
|
||||
if (pk.Format == Format)
|
||||
{
|
||||
comment = "No need to convert, current format matches requested format.";
|
||||
return pk;
|
||||
}
|
||||
if (pk.Format > Format)
|
||||
{
|
||||
comment = "Cannot convert a PKM backwards." + Environment.NewLine
|
||||
+ "Current Format: " + pk.Format + Environment.NewLine
|
||||
+ "Desired Format: " + Format;
|
||||
return null;
|
||||
}
|
||||
string currentFormat = pk.Format.ToString();
|
||||
PKM pkm = pk.Clone();
|
||||
if (pkm.IsEgg) // force hatch
|
||||
{
|
||||
pkm.IsEgg = false;
|
||||
if (pkm.AO)
|
||||
pkm.Met_Location = 318; // Battle Resort
|
||||
else if (pkm.XY)
|
||||
pkm.Met_Location = 38; // Route 7
|
||||
else if (pkm.Gen5)
|
||||
pkm.Met_Location = 16; // Route 16
|
||||
else
|
||||
pkm.Met_Location = 30001; // Pokétransfer
|
||||
}
|
||||
if (pkm.Format == 3 && Format > 3)
|
||||
pkm = (pkm as PK3).convertToPK4();
|
||||
if (pkm.Format == 4 && Format > 4)
|
||||
pkm = (pkm as PK4).convertToPK5();
|
||||
if (pkm.Format == 5 && Format > 5)
|
||||
pkm = (pkm as PK5).convertToPK6();
|
||||
comment = $"Converted from pk{currentFormat} to pk{Format}";
|
||||
return pkm;
|
||||
}
|
||||
internal static void checkEncrypted(ref byte[] pkm)
|
||||
{
|
||||
int format = getPKMDataFormat(pkm);
|
||||
ushort chk = 0;
|
||||
switch (format)
|
||||
{
|
||||
case 3: // TOneverDO, nobody exports encrypted pk3s
|
||||
return;
|
||||
case 4:
|
||||
case 5:
|
||||
for (int i = 8; i < PKX.SIZE_4STORED; i += 2)
|
||||
chk += BitConverter.ToUInt16(pkm, i);
|
||||
if (chk != BitConverter.ToUInt16(pkm, 0x06))
|
||||
pkm = PKX.decryptArray45(pkm);
|
||||
return;
|
||||
case 6:
|
||||
if (BitConverter.ToUInt16(pkm, 0xC8) != 0 && BitConverter.ToUInt16(pkm, 0x58) != 0)
|
||||
pkm = PKX.decryptArray(pkm);
|
||||
return;
|
||||
default:
|
||||
return; // bad!
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
287
PKM/ShowdownSet.cs
Normal file
@@ -0,0 +1,287 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace PKHeX
|
||||
{
|
||||
public class ShowdownSet
|
||||
{
|
||||
// String to Values
|
||||
internal static readonly string[] StatNames = { "HP", "Atk", "Def", "SpA", "SpD", "Spe" };
|
||||
public static readonly string[] types = Util.getStringList("types", "en");
|
||||
public static readonly string[] forms = Util.getStringList("forms", "en");
|
||||
private static readonly string[] species = Util.getStringList("species", "en");
|
||||
private static readonly string[] items = Util.getStringList("items", "en");
|
||||
private static readonly string[] natures = Util.getStringList("natures", "en");
|
||||
private static readonly string[] moves = Util.getStringList("moves", "en");
|
||||
private static readonly string[] abilities = Util.getStringList("abilities", "en");
|
||||
private static readonly string[] hptypes = types.Skip(1).ToArray();
|
||||
|
||||
// Default Set Data
|
||||
public string Nickname;
|
||||
public int Species;
|
||||
public string Form;
|
||||
public string Gender;
|
||||
public int Item;
|
||||
public int Ability;
|
||||
public int Level;
|
||||
public bool Shiny;
|
||||
public int Friendship;
|
||||
public int Nature;
|
||||
public int[] EVs;
|
||||
public int[] IVs;
|
||||
public int[] Moves;
|
||||
|
||||
// Parsing Utility
|
||||
public ShowdownSet(string input = null)
|
||||
{
|
||||
if (input == null)
|
||||
return;
|
||||
|
||||
Nickname = null;
|
||||
Species = -1;
|
||||
Form = null;
|
||||
Gender = null;
|
||||
Item = 0;
|
||||
Ability = 0;
|
||||
Level = 100;
|
||||
Shiny = false;
|
||||
Friendship = 255;
|
||||
Nature = 0;
|
||||
EVs = new int[6];
|
||||
IVs = new[] { 31, 31, 31, 31, 31, 31 };
|
||||
Moves = new int[4];
|
||||
|
||||
string[] lines = input.Split(new[] { "\r\n", "\n" }, StringSplitOptions.None);
|
||||
for (int i = 0; i < lines.Length; i++) lines[i] = lines[i].Replace("'", "’").Trim(); // Sanitize apostrophes
|
||||
|
||||
if (lines.Length < 3) return;
|
||||
|
||||
// Seek for start of set
|
||||
int start = -1;
|
||||
for (int i = 0; i < lines.Length; i++)
|
||||
if (lines[i].Contains(" @ ")) { start = i; break; }
|
||||
lines = lines.Skip(start).Take(lines.Length - start).ToArray();
|
||||
|
||||
// Abort if no text is found
|
||||
if (start == -1)
|
||||
{
|
||||
// Try to parse the first line if it does not have any item
|
||||
string ld = lines[0];
|
||||
// Gender Detection
|
||||
string last3 = ld.Substring(ld.Length - 3);
|
||||
if (last3 == "(M)" || last3 == "(F)")
|
||||
{
|
||||
Gender = last3.Substring(1, 1);
|
||||
ld = ld.Substring(0, ld.Length - 3);
|
||||
}
|
||||
// Nickname Detection
|
||||
string spec = ld;
|
||||
if (spec.Contains("("))
|
||||
{
|
||||
int index = spec.LastIndexOf("(", StringComparison.Ordinal);
|
||||
string n1 = spec.Substring(0, index - 1);
|
||||
string n2 = spec.Substring(index).Replace("(", "").Replace(")", "").Replace(" ", "");
|
||||
|
||||
bool inverted = Array.IndexOf(species, n2.Replace(" ", "")) > -1 || (Species = Array.IndexOf(species, n2.Split('-')[0])) > 0;
|
||||
spec = inverted ? n2 : n1;
|
||||
Nickname = inverted ? n1 : n2;
|
||||
}
|
||||
Species = Array.IndexOf(species, spec.Replace(" ", ""));
|
||||
if (
|
||||
(Species = Array.IndexOf(species, spec)) < 0 // Not an Edge Case
|
||||
&&
|
||||
(Species = Array.IndexOf(species, spec.Replace(" ", ""))) < 0 // Has Form
|
||||
)
|
||||
{
|
||||
string[] tmp = spec.Split(new[] { "-" }, StringSplitOptions.None);
|
||||
if (tmp.Length < 2) return;
|
||||
Species = Array.IndexOf(species, tmp[0].Replace(" ", ""));
|
||||
Form = tmp[1].Replace(" ", "");
|
||||
if (tmp.Length > 2)
|
||||
Form += " " + tmp[2];
|
||||
}
|
||||
if (Species < -1)
|
||||
return;
|
||||
lines = lines.Skip(1).Take(lines.Length - 1).ToArray();
|
||||
}
|
||||
int movectr = 0;
|
||||
// Detect relevant data
|
||||
foreach (string line in lines)
|
||||
{
|
||||
if (line.Length < 2) continue;
|
||||
if (line.Contains("- "))
|
||||
{
|
||||
string moveString = line.Substring(2);
|
||||
if (moveString.Contains("Hidden Power"))
|
||||
{
|
||||
if (moveString.Length > 13) // Defined Hidden Power
|
||||
{
|
||||
string type = moveString.Remove(0, 13).Replace("[", "").Replace("]", ""); // Trim out excess data
|
||||
int hpVal = Array.IndexOf(hptypes, type); // Get HP Type
|
||||
if (hpVal >= 0) IVs = PKX.setHPIVs(hpVal, IVs); // Get IVs
|
||||
}
|
||||
moveString = "Hidden Power";
|
||||
}
|
||||
Moves[movectr++] = Array.IndexOf(moves, moveString);
|
||||
if (movectr == 4)
|
||||
break; // End of moves
|
||||
continue;
|
||||
}
|
||||
|
||||
string[] brokenline = line.Split(new[] { ": " }, StringSplitOptions.None);
|
||||
switch (brokenline[0])
|
||||
{
|
||||
case "Trait":
|
||||
case "Ability": { Ability = Array.IndexOf(abilities, brokenline[1]); break; }
|
||||
case "Level": { Level = Util.ToInt32(brokenline[1]); break; }
|
||||
case "Shiny": { Shiny = brokenline[1] == "Yes"; break; }
|
||||
case "Happiness": { Friendship = Util.ToInt32(brokenline[1]); break; }
|
||||
case "EVs":
|
||||
{
|
||||
// Get EV list String
|
||||
string[] evlist = brokenline[1].Replace("SAtk", "SpA").Replace("SDef", "SpD").Replace("Spd", "Spe").Split(new[] { " / ", " " }, StringSplitOptions.None);
|
||||
for (int i = 0; i < evlist.Length / 2; i++)
|
||||
EVs[Array.IndexOf(StatNames, evlist[1 + i * 2])] = (byte)Util.ToInt32(evlist[0 + 2 * i]);
|
||||
break;
|
||||
}
|
||||
case "IVs":
|
||||
{
|
||||
// Get IV list String
|
||||
string[] ivlist = brokenline[1].Split(new[] { " / ", " " }, StringSplitOptions.None);
|
||||
for (int i = 0; i < ivlist.Length / 2; i++)
|
||||
IVs[Array.IndexOf(StatNames, ivlist[1 + i * 2])] = (byte)Util.ToInt32(ivlist[0 + 2 * i]);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
// Either Nature or Gender ItemSpecies
|
||||
if (brokenline[0].Contains(" @ "))
|
||||
{
|
||||
string[] ld = line.Split(new[] { " @ " }, StringSplitOptions.None);
|
||||
Item = Array.IndexOf(items, ld.Last());
|
||||
// Gender Detection
|
||||
string last3 = ld[0].Substring(ld[0].Length - 3);
|
||||
if (last3 == "(M)" || last3 == "(F)")
|
||||
{
|
||||
Gender = last3.Substring(1, 1);
|
||||
ld[0] = ld[0].Substring(0, ld[ld.Length - 2].Length - 3);
|
||||
}
|
||||
// Nickname Detection
|
||||
string spec = ld[0];
|
||||
if (spec.Contains("("))
|
||||
{
|
||||
int index = spec.LastIndexOf("(", StringComparison.Ordinal);
|
||||
string n1 = spec.Substring(0, index - 1);
|
||||
string n2 = spec.Substring(index).Replace("(", "").Replace(")", "").Replace(" ", "");
|
||||
|
||||
bool inverted = Array.IndexOf(species, n2.Replace(" ", "")) > -1 || (Species = Array.IndexOf(species, n2.Split('-')[0])) > 0;
|
||||
spec = inverted ? n2 : n1;
|
||||
Nickname = inverted ? n1 : n2;
|
||||
}
|
||||
if (
|
||||
(Species = Array.IndexOf(species, spec)) < 0 // Not an Edge Case
|
||||
&&
|
||||
(Species = Array.IndexOf(species, spec.Replace(" ", ""))) < 0 // Has Form
|
||||
)
|
||||
{
|
||||
string[] tmp = spec.Split(new[] { "-" }, StringSplitOptions.None);
|
||||
Species = Array.IndexOf(species, tmp[0].Replace(" ", ""));
|
||||
Form = tmp[1].Replace(" ", "");
|
||||
if (tmp.Length > 2)
|
||||
Form += " " + tmp[2];
|
||||
}
|
||||
}
|
||||
else if (brokenline[0].Contains("Nature"))
|
||||
Nature = Array.IndexOf(natures, line.Split(' ')[0]);
|
||||
else // Fallback
|
||||
Species = Array.IndexOf(species, line.Split('(')[0]);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
public string getText()
|
||||
{
|
||||
if (Species == 0 || Species > 722)
|
||||
return "";
|
||||
|
||||
// First Line: Name, Nickname, Gender, Item
|
||||
string result = string.Format(species[Species] != Nickname ? "{0} ({1})" : "{1}", Nickname,
|
||||
species[Species] + ((Form ?? "") != "" ? "-" + Form.Replace("Mega ", "Mega-") : "")) // Species (& Form if necessary)
|
||||
+ Gender + (Item != 0 ? " @ " + items[Item] : "") + Environment.NewLine;
|
||||
|
||||
// IVs
|
||||
string[] ivstr = new string[6];
|
||||
int ivctr = 0;
|
||||
int[] sIVs = { IVs[0], IVs[1], IVs[2], IVs[4], IVs[5], IVs[3] }; // Reorganize speed
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
if (sIVs[i] == 31) continue;
|
||||
ivstr[ivctr++] += $"{sIVs[i]} {StatNames[i]}";
|
||||
}
|
||||
if (ivctr > 0)
|
||||
result += "IVs: " + string.Join(" / ", ivstr.Take(ivctr)) + Environment.NewLine;
|
||||
|
||||
// EVs
|
||||
string[] evstr = new string[6];
|
||||
int[] sEVs = { EVs[0], EVs[1], EVs[2], EVs[4], EVs[5], EVs[3] }; // Reorganize speed
|
||||
int evctr = 0;
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
if (sEVs[i] == 0) continue;
|
||||
evstr[evctr++] += $"{sEVs[i]} {StatNames[i]}";
|
||||
}
|
||||
if (evctr > 0)
|
||||
result += "EVs: " + string.Join(" / ", evstr.Take(evctr)) + Environment.NewLine;
|
||||
|
||||
// Secondary Stats
|
||||
result += "Ability: " + abilities[Ability] + Environment.NewLine;
|
||||
result += "Level: " + Level + Environment.NewLine;
|
||||
if (Shiny)
|
||||
result += "Shiny: Yes" + Environment.NewLine;
|
||||
|
||||
result += natures[Nature] + " Nature" + Environment.NewLine;
|
||||
// Add in Moves
|
||||
string[] MoveLines = new string[Moves.Length];
|
||||
int movectr = 0;
|
||||
foreach (int move in Moves.Where(move => move != 0 && move < moves.Length))
|
||||
{
|
||||
MoveLines[movectr] += "- " + moves[move];
|
||||
if (move == 237) // Hidden Power
|
||||
{
|
||||
int hp = 0;
|
||||
for (int i = 0; i < 6; i++)
|
||||
hp |= (IVs[i] & 1) << i;
|
||||
hp *= 0xF; hp /= 0x3F;
|
||||
MoveLines[movectr] += $" [{hptypes[hp]}]";
|
||||
}
|
||||
movectr++;
|
||||
}
|
||||
result += string.Join(Environment.NewLine, MoveLines.Take(movectr));
|
||||
|
||||
return result;
|
||||
}
|
||||
internal static string getShowdownText(PKM pkm)
|
||||
{
|
||||
if (pkm.Species == 0) return "";
|
||||
ShowdownSet Set = new ShowdownSet
|
||||
{
|
||||
Nickname = pkm.Nickname,
|
||||
Species = pkm.Species,
|
||||
Item = pkm.HeldItem,
|
||||
Ability = pkm.Ability,
|
||||
EVs = pkm.EVs,
|
||||
IVs = pkm.IVs,
|
||||
Moves = pkm.Moves,
|
||||
Nature = pkm.Nature,
|
||||
Gender = new[] { " (M)", " (F)", "" }[pkm.Gender],
|
||||
Friendship = pkm.CurrentFriendship,
|
||||
Level = PKX.getLevel(pkm.Species, pkm.EXP),
|
||||
Shiny = pkm.IsShiny,
|
||||
Form = pkm.AltForm > 0 ? PKX.getFormList(pkm.Species, types, forms, new[] { "", "F", "" })[pkm.AltForm] : "",
|
||||
};
|
||||
if (Set.Form == "F") Set.Gender = "";
|
||||
return Set.getText();
|
||||
}
|
||||
}
|
||||
}
|
||||
636
PKX/f1-Main.Designer.cs
generated
2487
PKX/f1-Main.cs
613
PKX/f1-Main.resx
@@ -453,168 +453,27 @@
|
||||
<metadata name="PB_WarnMove4.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="PB_WarnMove4.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAeZJREFUOE+1
|
||||
kz1LI1EUhscQ0UzunTszMSoIoiKBLRSxsBHBwkb8aiy2s9TGQjsR/AmysN2CC/4DRUFETMgkZGZEEBQ/
|
||||
UgjaZQvDrvhRaDiek3snJqti5YGXufee9zlz5syM9mUxMjJct9Ld1biU6I7gOkx7lfo8yLwVax1IM+sm
|
||||
y6yiGzX7Vaom3i2KhyEUTxm26wgbPCbAjYqcSleCYFRYbWUE8Ha8ZYbgs9ExuJydA79cxPiubIGPHq1e
|
||||
HVUq8oW+nua0YV7RnR9OzwBKJTiw4+Ayfp3StEYFc5SOkh3ggmCqKPbs2ArBdNf74xOgODBj5X2Oi2X0
|
||||
ECyUX84AFzRl/WdnR5en81syk/6lHXgqFstrKupw8w49CfRSkdcB4qYeFfGY8SuASTcbm/CYz0sYZ5JG
|
||||
JU17Hb0hhcrAg3CGWb0IPVcX+LP2G/5iFwFM1xwTJV8XfQqVQe14jO9Vw6TjwSE4mpiswMFsfMaTCpXh
|
||||
cz7+P0zmi4VFuFz9AY5ZDQd5c0rhmubp4rw2KZ+5sJ+E20IBfKupBia5ushT5xpoWgjf8X2QqB5YtrUN
|
||||
Dts738DSZzzMf0s0lDtwuTnpR40NLyq2M4a14xj2Dl1p778jD727sfg0dvDmS6TvgV7ph39frW84/AKK
|
||||
SiSLGvswRQAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="PB_WarnMove3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="PB_WarnMove3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAeZJREFUOE+1
|
||||
kz1LI1EUhscQ0UzunTszMSoIoiKBLRSxsBHBwkb8aiy2s9TGQjsR/AmysN2CC/4DRUFETMgkZGZEEBQ/
|
||||
UgjaZQvDrvhRaDiek3snJqti5YGXufee9zlz5syM9mUxMjJct9Ld1biU6I7gOkx7lfo8yLwVax1IM+sm
|
||||
y6yiGzX7Vaom3i2KhyEUTxm26wgbPCbAjYqcSleCYFRYbWUE8Ha8ZYbgs9ExuJydA79cxPiubIGPHq1e
|
||||
HVUq8oW+nua0YV7RnR9OzwBKJTiw4+Ayfp3StEYFc5SOkh3ggmCqKPbs2ArBdNf74xOgODBj5X2Oi2X0
|
||||
ECyUX84AFzRl/WdnR5en81syk/6lHXgqFstrKupw8w49CfRSkdcB4qYeFfGY8SuASTcbm/CYz0sYZ5JG
|
||||
JU17Hb0hhcrAg3CGWb0IPVcX+LP2G/5iFwFM1xwTJV8XfQqVQe14jO9Vw6TjwSE4mpiswMFsfMaTCpXh
|
||||
cz7+P0zmi4VFuFz9AY5ZDQd5c0rhmubp4rw2KZ+5sJ+E20IBfKupBia5ushT5xpoWgjf8X2QqB5YtrUN
|
||||
Dts738DSZzzMf0s0lDtwuTnpR40NLyq2M4a14xj2Dl1p778jD727sfg0dvDmS6TvgV7ph39frW84/AKK
|
||||
SiSLGvswRQAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="PB_WarnMove2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="PB_WarnMove2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAeZJREFUOE+1
|
||||
kz1LI1EUhscQ0UzunTszMSoIoiKBLRSxsBHBwkb8aiy2s9TGQjsR/AmysN2CC/4DRUFETMgkZGZEEBQ/
|
||||
UgjaZQvDrvhRaDiek3snJqti5YGXufee9zlz5syM9mUxMjJct9Ld1biU6I7gOkx7lfo8yLwVax1IM+sm
|
||||
y6yiGzX7Vaom3i2KhyEUTxm26wgbPCbAjYqcSleCYFRYbWUE8Ha8ZYbgs9ExuJydA79cxPiubIGPHq1e
|
||||
HVUq8oW+nua0YV7RnR9OzwBKJTiw4+Ayfp3StEYFc5SOkh3ggmCqKPbs2ArBdNf74xOgODBj5X2Oi2X0
|
||||
ECyUX84AFzRl/WdnR5en81syk/6lHXgqFstrKupw8w49CfRSkdcB4qYeFfGY8SuASTcbm/CYz0sYZ5JG
|
||||
JU17Hb0hhcrAg3CGWb0IPVcX+LP2G/5iFwFM1xwTJV8XfQqVQe14jO9Vw6TjwSE4mpiswMFsfMaTCpXh
|
||||
cz7+P0zmi4VFuFz9AY5ZDQd5c0rhmubp4rw2KZ+5sJ+E20IBfKupBia5ushT5xpoWgjf8X2QqB5YtrUN
|
||||
Dts738DSZzzMf0s0lDtwuTnpR40NLyq2M4a14xj2Dl1p778jD727sfg0dvDmS6TvgV7ph39frW84/AKK
|
||||
SiSLGvswRQAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="PB_WarnMove1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="PB_WarnMove1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAeZJREFUOE+1
|
||||
kz1LI1EUhscQ0UzunTszMSoIoiKBLRSxsBHBwkb8aiy2s9TGQjsR/AmysN2CC/4DRUFETMgkZGZEEBQ/
|
||||
UgjaZQvDrvhRaDiek3snJqti5YGXufee9zlz5syM9mUxMjJct9Ld1biU6I7gOkx7lfo8yLwVax1IM+sm
|
||||
y6yiGzX7Vaom3i2KhyEUTxm26wgbPCbAjYqcSleCYFRYbWUE8Ha8ZYbgs9ExuJydA79cxPiubIGPHq1e
|
||||
HVUq8oW+nua0YV7RnR9OzwBKJTiw4+Ayfp3StEYFc5SOkh3ggmCqKPbs2ArBdNf74xOgODBj5X2Oi2X0
|
||||
ECyUX84AFzRl/WdnR5en81syk/6lHXgqFstrKupw8w49CfRSkdcB4qYeFfGY8SuASTcbm/CYz0sYZ5JG
|
||||
JU17Hb0hhcrAg3CGWb0IPVcX+LP2G/5iFwFM1xwTJV8XfQqVQe14jO9Vw6TjwSE4mpiswMFsfMaTCpXh
|
||||
cz7+P0zmi4VFuFz9AY5ZDQd5c0rhmubp4rw2KZ+5sJ+E20IBfKupBia5ushT5xpoWgjf8X2QqB5YtrUN
|
||||
Dts738DSZzzMf0s0lDtwuTnpR40NLyq2M4a14xj2Dl1p778jD727sfg0dvDmS6TvgV7ph39frW84/AKK
|
||||
SiSLGvswRQAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="GB_RelearnMoves.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="PB_WarnRelearn4.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="PB_WarnRelearn3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="PB_WarnRelearn2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="PB_WarnRelearn1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="CB_RelearnMove4.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="CB_RelearnMove3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="CB_RelearnMove2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="CB_RelearnMove1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="GB_CurrentMoves.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="TB_PP4.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="TB_PP3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="TB_PP2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="TB_PP1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Label_CurPP.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Label_PPups.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="CB_PPu4.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="CB_PPu3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="CB_PPu2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="CB_Move4.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="CB_PPu1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="CB_Move3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="CB_Move2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="CB_Move1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="CHK_Diamond.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="CHK_Star.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="CHK_Heart.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="CHK_Square.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="TB_EC.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="GB_nOT.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="CHK_Triangle.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="CHK_Circle.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="BTN_RerollEC.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
@@ -624,9 +483,6 @@
|
||||
<metadata name="BTN_Ribbons.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="GB_Markings.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="GB_ExtraBytes.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
@@ -636,9 +492,6 @@
|
||||
<metadata name="Label_EncryptionConstant.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Label_Diamond.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="CB_Language.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
@@ -756,6 +609,7 @@
|
||||
<metadata name="Label_IsShiny.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="Label_IsShiny.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
@@ -1009,6 +863,101 @@
|
||||
<metadata name="TB_EVTotal.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="PB_WarnMove4.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="PB_WarnMove4.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAeZJREFUOE+1
|
||||
kz1LI1EUhscQ0UzunTszMSoIoiKBLRSxsBHBwkb8aiy2s9TGQjsR/AmysN2CC/4DRUFETMgkZGZEEBQ/
|
||||
UgjaZQvDrvhRaDiek3snJqti5YGXufee9zlz5syM9mUxMjJct9Ld1biU6I7gOkx7lfo8yLwVax1IM+sm
|
||||
y6yiGzX7Vaom3i2KhyEUTxm26wgbPCbAjYqcSleCYFRYbWUE8Ha8ZYbgs9ExuJydA79cxPiubIGPHq1e
|
||||
HVUq8oW+nua0YV7RnR9OzwBKJTiw4+Ayfp3StEYFc5SOkh3ggmCqKPbs2ArBdNf74xOgODBj5X2Oi2X0
|
||||
ECyUX84AFzRl/WdnR5en81syk/6lHXgqFstrKupw8w49CfRSkdcB4qYeFfGY8SuASTcbm/CYz0sYZ5JG
|
||||
JU17Hb0hhcrAg3CGWb0IPVcX+LP2G/5iFwFM1xwTJV8XfQqVQe14jO9Vw6TjwSE4mpiswMFsfMaTCpXh
|
||||
cz7+P0zmi4VFuFz9AY5ZDQd5c0rhmubp4rw2KZ+5sJ+E20IBfKupBia5ushT5xpoWgjf8X2QqB5YtrUN
|
||||
Dts738DSZzzMf0s0lDtwuTnpR40NLyq2M4a14xj2Dl1p778jD727sfg0dvDmS6TvgV7ph39frW84/AKK
|
||||
SiSLGvswRQAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="PB_WarnMove3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="PB_WarnMove3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAeZJREFUOE+1
|
||||
kz1LI1EUhscQ0UzunTszMSoIoiKBLRSxsBHBwkb8aiy2s9TGQjsR/AmysN2CC/4DRUFETMgkZGZEEBQ/
|
||||
UgjaZQvDrvhRaDiek3snJqti5YGXufee9zlz5syM9mUxMjJct9Ld1biU6I7gOkx7lfo8yLwVax1IM+sm
|
||||
y6yiGzX7Vaom3i2KhyEUTxm26wgbPCbAjYqcSleCYFRYbWUE8Ha8ZYbgs9ExuJydA79cxPiubIGPHq1e
|
||||
HVUq8oW+nua0YV7RnR9OzwBKJTiw4+Ayfp3StEYFc5SOkh3ggmCqKPbs2ArBdNf74xOgODBj5X2Oi2X0
|
||||
ECyUX84AFzRl/WdnR5en81syk/6lHXgqFstrKupw8w49CfRSkdcB4qYeFfGY8SuASTcbm/CYz0sYZ5JG
|
||||
JU17Hb0hhcrAg3CGWb0IPVcX+LP2G/5iFwFM1xwTJV8XfQqVQe14jO9Vw6TjwSE4mpiswMFsfMaTCpXh
|
||||
cz7+P0zmi4VFuFz9AY5ZDQd5c0rhmubp4rw2KZ+5sJ+E20IBfKupBia5ushT5xpoWgjf8X2QqB5YtrUN
|
||||
Dts738DSZzzMf0s0lDtwuTnpR40NLyq2M4a14xj2Dl1p778jD727sfg0dvDmS6TvgV7ph39frW84/AKK
|
||||
SiSLGvswRQAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="PB_WarnMove2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="PB_WarnMove2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAeZJREFUOE+1
|
||||
kz1LI1EUhscQ0UzunTszMSoIoiKBLRSxsBHBwkb8aiy2s9TGQjsR/AmysN2CC/4DRUFETMgkZGZEEBQ/
|
||||
UgjaZQvDrvhRaDiek3snJqti5YGXufee9zlz5syM9mUxMjJct9Ld1biU6I7gOkx7lfo8yLwVax1IM+sm
|
||||
y6yiGzX7Vaom3i2KhyEUTxm26wgbPCbAjYqcSleCYFRYbWUE8Ha8ZYbgs9ExuJydA79cxPiubIGPHq1e
|
||||
HVUq8oW+nua0YV7RnR9OzwBKJTiw4+Ayfp3StEYFc5SOkh3ggmCqKPbs2ArBdNf74xOgODBj5X2Oi2X0
|
||||
ECyUX84AFzRl/WdnR5en81syk/6lHXgqFstrKupw8w49CfRSkdcB4qYeFfGY8SuASTcbm/CYz0sYZ5JG
|
||||
JU17Hb0hhcrAg3CGWb0IPVcX+LP2G/5iFwFM1xwTJV8XfQqVQe14jO9Vw6TjwSE4mpiswMFsfMaTCpXh
|
||||
cz7+P0zmi4VFuFz9AY5ZDQd5c0rhmubp4rw2KZ+5sJ+E20IBfKupBia5ushT5xpoWgjf8X2QqB5YtrUN
|
||||
Dts738DSZzzMf0s0lDtwuTnpR40NLyq2M4a14xj2Dl1p778jD727sfg0dvDmS6TvgV7ph39frW84/AKK
|
||||
SiSLGvswRQAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="PB_WarnMove1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="PB_WarnMove1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAeZJREFUOE+1
|
||||
kz1LI1EUhscQ0UzunTszMSoIoiKBLRSxsBHBwkb8aiy2s9TGQjsR/AmysN2CC/4DRUFETMgkZGZEEBQ/
|
||||
UgjaZQvDrvhRaDiek3snJqti5YGXufee9zlz5syM9mUxMjJct9Ld1biU6I7gOkx7lfo8yLwVax1IM+sm
|
||||
y6yiGzX7Vaom3i2KhyEUTxm26wgbPCbAjYqcSleCYFRYbWUE8Ha8ZYbgs9ExuJydA79cxPiubIGPHq1e
|
||||
HVUq8oW+nua0YV7RnR9OzwBKJTiw4+Ayfp3StEYFc5SOkh3ggmCqKPbs2ArBdNf74xOgODBj5X2Oi2X0
|
||||
ECyUX84AFzRl/WdnR5en81syk/6lHXgqFstrKupw8w49CfRSkdcB4qYeFfGY8SuASTcbm/CYz0sYZ5JG
|
||||
JU17Hb0hhcrAg3CGWb0IPVcX+LP2G/5iFwFM1xwTJV8XfQqVQe14jO9Vw6TjwSE4mpiswMFsfMaTCpXh
|
||||
cz7+P0zmi4VFuFz9AY5ZDQd5c0rhmubp4rw2KZ+5sJ+E20IBfKupBia5ushT5xpoWgjf8X2QqB5YtrUN
|
||||
Dts738DSZzzMf0s0lDtwuTnpR40NLyq2M4a14xj2Dl1p778jD727sfg0dvDmS6TvgV7ph39frW84/AKK
|
||||
SiSLGvswRQAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="GB_RelearnMoves.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="PB_WarnRelearn4.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="PB_WarnRelearn3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="PB_WarnRelearn2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="PB_WarnRelearn1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="CB_RelearnMove4.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="CB_RelearnMove3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="CB_RelearnMove2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="CB_RelearnMove1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="PB_WarnRelearn4.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
@@ -1089,6 +1038,9 @@
|
||||
<metadata name="CB_RelearnMove1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="GB_CurrentMoves.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="TB_PP4.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
@@ -1131,16 +1083,46 @@
|
||||
<metadata name="CB_Move1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="CHK_Diamond.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="TB_PP4.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="CHK_Star.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="TB_PP3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="CHK_Heart.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="TB_PP2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="CHK_Square.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="TB_PP1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Label_CurPP.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Label_PPups.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="CB_PPu4.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="CB_PPu3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="CB_PPu2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="CB_Move4.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="CB_PPu1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="CB_Move3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="CB_Move2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="CB_Move1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="TB_EC.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
@@ -1167,12 +1149,6 @@
|
||||
<metadata name="Label_PrevOT.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="CHK_Triangle.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="CHK_Circle.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="BTN_RerollEC.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
@@ -1182,9 +1158,6 @@
|
||||
<metadata name="BTN_Ribbons.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="GB_Markings.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="PB_MarkPentagon.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
@@ -1194,24 +1167,20 @@
|
||||
<metadata name="PB_MarkShiny.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="PB_Mark6.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="PB_Mark5.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="PB_Mark4.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="PB_Mark3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="PB_Mark2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="PB_Mark1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="PB_Mark6.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wwAADsMBx2+oZAAAAFVJREFUKFNjQAeKioqhUCZuoKSktAqI/wMVd0CFMAFMEQxjVYyuCIZRFCsrK6dh
|
||||
UwTDQMUuUKVgD8zEpgiIy6FKEACLYkxFMICkGLciGEBxE+mAgQEAw6cxLyPYHYMAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="PB_Mark6.InitialImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wwAADsMBx2+oZAAAAFVJREFUKFNjQAeKioqhUCZuoKSktAqI/wMVd0CFMAFMEQxjVYyuCIZRFCsrK6dh
|
||||
UwTDQMUuUKVgD8zEpgiIy6FKEACLYkxFMICkGLciGEBxE+mAgQEAw6cxLyPYHYMAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="PB_MarkPentagon.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
@@ -1229,6 +1198,38 @@
|
||||
wwAADsMBx2+oZAAAAGFJREFUKFNjIA/oVggyGJetYjCpUIKKYAEmFS5ARe8YjMv/gzGIjwGMy8vhClBx
|
||||
OVQFEBhXhGJRgISB8nCAVQEUowCjsg6sikDiKADsWywKQeIYwLhsJhCfgWMM04gCDAwAOXZIpY+syQoA
|
||||
AAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="PB_Mark3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wgAADsIBFShKgAAAABp0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuMTAw9HKhAAAAPklEQVQoU2OA
|
||||
gf///+PEcKCkpPQOF0ZRDBX8jwW/g6iAApAAmgIaKoS7EUSABNAU4FWIFaMoJAZjFcTE/xkAiduxT7wO
|
||||
KegAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="PB_Mark3.InitialImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wgAADsIBFShKgAAAABp0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuMTAw9HKhAAAAPklEQVQoU2OA
|
||||
gf///+PEcKCkpPQOF0ZRDBX8jwW/g6iAApAAmgIaKoS7EUSABNAU4FWIFaMoJAZjFcTE/xkAiduxT7wO
|
||||
KegAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="PB_Mark5.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wwAADsMBx2+oZAAAAHpJREFUKFNjQAeKioodUCZuAFTkoqSk9B9EQ4UwgZycnCBQwRmowrvKysrGUCkI
|
||||
AEqUgyRxYaCmmVClEHdhUwTEq6BKEAAouBtZEch6qBQqgLkPGUOlUAFUcreqqqoSyF0gPpBG9T3Ih0Cc
|
||||
BuWCAUgMqDAUyiUWMDAAALO6MzuvKR9eAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="PB_Mark5.InitialImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wwAADsMBx2+oZAAAAHpJREFUKFNjQAeKioodUCZuAFTkoqSk9B9EQ4UwgZycnCBQwRmowrvKysrGUCkI
|
||||
AEqUgyRxYaCmmVClEHdhUwTEq6BKEAAouBtZEch6qBQqgLkPGUOlUAFUcreqqqoSyF0gPpBG9T3Ih0Cc
|
||||
BuWCAUgMqDAUyiUWMDAAALO6MzuvKR9eAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="PB_MarkCured.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
@@ -1248,6 +1249,22 @@
|
||||
wwAADsMBx2+oZAAAAI1JREFUKFOVUEENwzAMDIViKYVBiPcogFIohXIahUKwK5VAIcSz3ZvqaPvspJMv
|
||||
vpPjpGTodAxadwqaRrtHI16URHvyDPuCPuURxnreoY82DzELkmzRdMwIQrfKL8Ts2spnmO57TbqRCGJp
|
||||
4g92E23pMYzF9rISdO29vKPDX5gnBe2bYH/jms4jjv+ilDfBD7LrZqlEjQAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="PB_Mark2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wwAADsMBx2+oZAAAAG5JREFUKFNjQAeKioqhUCZuoKysbKykpPQfREOFsAOgot0ghUBTz0CFMAFQ0gWk
|
||||
CIZxOgFkCprCu1ApBADpRlYEw0C3pkGVQABQ8B26Iih+B1UCVlSOJomCgbZ1gBWqqqoqgYIDFwbJgxUS
|
||||
BxgYAGs4NknmoWGpAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="PB_Mark2.InitialImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wwAADsMBx2+oZAAAAG5JREFUKFNjQAeKioqhUCZuoKysbKykpPQfREOFsAOgot0ghUBTz0CFMAFQ0gWk
|
||||
CIZxOgFkCprCu1ApBADpRlYEw0C3pkGVQABQ8B26Iih+B1UCVlSOJomCgbZ1gBWqqqoqgYIDFwbJgxUS
|
||||
BxgYAGs4NknmoWGpAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="PB_MarkShiny.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
@@ -1269,102 +1286,6 @@
|
||||
GigXDIB8F3QxIgADAwC7NFU/mWb72QAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="PB_Mark6.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="PB_Mark6.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wwAADsMBx2+oZAAAAFVJREFUKFNjQAeKioqhUCZuoKSktAqI/wMVd0CFMAFMEQxjVYyuCIZRFCsrK6dh
|
||||
UwTDQMUuUKVgD8zEpgiIy6FKEACLYkxFMICkGLciGEBxE+mAgQEAw6cxLyPYHYMAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="PB_Mark6.InitialImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wwAADsMBx2+oZAAAAFVJREFUKFNjQAeKioqhUCZuoKSktAqI/wMVd0CFMAFMEQxjVYyuCIZRFCsrK6dh
|
||||
UwTDQMUuUKVgD8zEpgiIy6FKEACLYkxFMICkGLciGEBxE+mAgQEAw6cxLyPYHYMAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="PB_Mark5.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="PB_Mark5.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wwAADsMBx2+oZAAAAHpJREFUKFNjQAeKioodUCZuAFTkoqSk9B9EQ4UwgZycnCBQwRmowrvKysrGUCkI
|
||||
AEqUgyRxYaCmmVClEHdhUwTEq6BKEAAouBtZEch6qBQqgLkPGUOlUAFUcreqqqoSyF0gPpBG9T3Ih0Cc
|
||||
BuWCAUgMqDAUyiUWMDAAALO6MzuvKR9eAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="PB_Mark5.InitialImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wwAADsMBx2+oZAAAAHpJREFUKFNjQAeKioodUCZuAFTkoqSk9B9EQ4UwgZycnCBQwRmowrvKysrGUCkI
|
||||
AEqUgyRxYaCmmVClEHdhUwTEq6BKEAAouBtZEch6qBQqgLkPGUOlUAFUcreqqqoSyF0gPpBG9T3Ih0Cc
|
||||
BuWCAUgMqDAUyiUWMDAAALO6MzuvKR9eAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="PB_Mark4.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="PB_Mark4.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wwAADsMBx2+oZAAAAHBJREFUKFNjgAFlZWVjOTk5QRAbRCsqKrrA+GCgqqqqBATvgPg/iEbnwxUDOeVQ
|
||||
QTAGmnQGmQ+0KQ2sECjRgSyBjkHyYIUgt2FTAMMgebBCEAA5HJsioHgoVAkCgASRFcHdhg2AJAkqggEU
|
||||
N5EOGBgAEVY/pv9ltCoAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="PB_Mark4.InitialImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wwAADsMBx2+oZAAAAHBJREFUKFNjgAFlZWVjOTk5QRAbRCsqKrrA+GCgqqqqBATvgPg/iEbnwxUDOeVQ
|
||||
QTAGmnQGmQ+0KQ2sECjRgSyBjkHyYIUgt2FTAMMgebBCEAA5HJsioHgoVAkCgASRFcHdhg2AJAkqggEU
|
||||
N5EOGBgAEVY/pv9ltCoAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="PB_Mark3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="PB_Mark3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wgAADsIBFShKgAAAABp0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuMTAw9HKhAAAAPklEQVQoU2OA
|
||||
gf///+PEcKCkpPQOF0ZRDBX8jwW/g6iAApAAmgIaKoS7EUSABNAU4FWIFaMoJAZjFcTE/xkAiduxT7wO
|
||||
KegAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="PB_Mark3.InitialImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wgAADsIBFShKgAAAABp0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuMTAw9HKhAAAAPklEQVQoU2OA
|
||||
gf///+PEcKCkpPQOF0ZRDBX8jwW/g6iAApAAmgIaKoS7EUSABNAU4FWIFaMoJAZjFcTE/xkAiduxT7wO
|
||||
KegAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="PB_Mark2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="PB_Mark2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wwAADsMBx2+oZAAAAG5JREFUKFNjQAeKioqhUCZuoKysbKykpPQfREOFsAOgot0ghUBTz0CFMAFQ0gWk
|
||||
CIZxOgFkCprCu1ApBADpRlYEw0C3pkGVQABQ8B26Iih+B1UCVlSOJomCgbZ1gBWqqqoqgYIDFwbJgxUS
|
||||
BxgYAGs4NknmoWGpAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="PB_Mark2.InitialImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wwAADsMBx2+oZAAAAG5JREFUKFNjQAeKioqhUCZuoKysbKykpPQfREOFsAOgot0ghUBTz0CFMAFQ0gWk
|
||||
CIZxOgFkCprCu1ApBADpRlYEw0C3pkGVQABQ8B26Iih+B1UCVlSOJomCgbZ1gBWqqqoqgYIDFwbJgxUS
|
||||
BxgYAGs4NknmoWGpAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="PB_Mark1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="PB_Mark1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
@@ -1379,6 +1300,22 @@
|
||||
wwAADsMBx2+oZAAAAGxJREFUKFNjQAbKysrGQJwGoqFCqEBVVVVJUVHxjJKS0n8YBvHl5OQEoUogAF0R
|
||||
smKoErAiF2yKYBjuDJCbsCmAYaBBoTCFxtgUwDCKx3C5EYh3Q5VAAMh3IEF0RRi+hgFoMLmAaKgQqYCB
|
||||
AQDOs0aM0tfjRAAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="PB_Mark4.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wwAADsMBx2+oZAAAAHBJREFUKFNjgAFlZWVjOTk5QRAbRCsqKrrA+GCgqqqqBATvgPg/iEbnwxUDOeVQ
|
||||
QTAGmnQGmQ+0KQ2sECjRgSyBjkHyYIUgt2FTAMMgebBCEAA5HJsioHgoVAkCgASRFcHdhg2AJAkqggEU
|
||||
N5EOGBgAEVY/pv9ltCoAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="PB_Mark4.InitialImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wwAADsMBx2+oZAAAAHBJREFUKFNjgAFlZWVjOTk5QRAbRCsqKrrA+GCgqqqqBATvgPg/iEbnwxUDOeVQ
|
||||
QTAGmnQGmQ+0KQ2sECjRgSyBjkHyYIUgt2FTAMMgebBCEAA5HJsioHgoVAkCgASRFcHdhg2AJAkqggEU
|
||||
N5EOGBgAEVY/pv9ltCoAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="GB_ExtraBytes.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
@@ -1444,9 +1381,6 @@
|
||||
<metadata name="Label_EncryptionConstant.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Label_Diamond.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
@@ -1903,9 +1837,6 @@
|
||||
<metadata name="ppkx6.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenSecretBase.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="GB_Daycare.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
@@ -1921,9 +1852,6 @@
|
||||
<metadata name="GB_SUBE.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenSecretBase.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="GB_Daycare.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
@@ -2077,48 +2005,99 @@
|
||||
<metadata name="B_VerifyCHK.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenHallofFame.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OUTPasserby.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenPokepuffs.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenBoxLayout.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenOPowers.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenItemPouch.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenEventFlags.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenWondercards.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenTrainerInfo.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenBerryField.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenPokedex.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="GB_SAVtools.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenSuperTraining.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="FLP_SAVtools.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="FLP_SAVtools.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenPokepuffs.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenItemPouch.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenTrainerInfo.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OUTPasserby.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenBoxLayout.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenWondercards.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenSuperTraining.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenHallofFame.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenOPowers.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenEventFlags.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenPokedex.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenBerryField.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenSecretBase.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_Pokeblocks.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenPokepuffs.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenItemPouch.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenTrainerInfo.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OUTPasserby.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenBoxLayout.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenWondercards.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenSuperTraining.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenHallofFame.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenOPowers.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenEventFlags.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenPokedex.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenBerryField.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_OpenSecretBase.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_Pokeblocks.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="dragout.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
|
||||
@@ -10,6 +10,7 @@ public partial class MemoryAmie : Form
|
||||
public MemoryAmie() // Keeping the form reference as a lot of control elements are required to operate.
|
||||
{
|
||||
InitializeComponent();
|
||||
pk6 = Main.pkm as PK6;
|
||||
cba = new[] { CB_Country0, CB_Country1, CB_Country2, CB_Country3, CB_Country4 };
|
||||
mta = new[] { CB_Region0, CB_Region1, CB_Region2, CB_Region3, CB_Region4, };
|
||||
CB_Country0.DisplayMember = CB_Country1.DisplayMember = CB_Country2.DisplayMember = CB_Country3.DisplayMember = CB_Country4.DisplayMember = "Text";
|
||||
@@ -38,70 +39,69 @@ public partial class MemoryAmie : Form
|
||||
getLangStrings();
|
||||
loadFields();
|
||||
}
|
||||
public string[] feeling;
|
||||
public string[] quality;
|
||||
bool init;
|
||||
|
||||
private bool init;
|
||||
private readonly ComboBox[] cba;
|
||||
private readonly ComboBox[] mta;
|
||||
private readonly PK6 pk6;
|
||||
|
||||
// Load/Save Actions
|
||||
private void loadFields()
|
||||
{
|
||||
// Load the region/country values.
|
||||
CB_Country0.SelectedValue = Main.pk6.Geo1_Country;
|
||||
CB_Country1.SelectedValue = Main.pk6.Geo2_Country;
|
||||
CB_Country2.SelectedValue = Main.pk6.Geo3_Country;
|
||||
CB_Country3.SelectedValue = Main.pk6.Geo4_Country;
|
||||
CB_Country4.SelectedValue = Main.pk6.Geo5_Country;
|
||||
CB_Region0.SelectedValue = Main.pk6.Geo1_Region;
|
||||
CB_Region1.SelectedValue = Main.pk6.Geo2_Region;
|
||||
CB_Region2.SelectedValue = Main.pk6.Geo3_Region;
|
||||
CB_Region3.SelectedValue = Main.pk6.Geo4_Region;
|
||||
CB_Region4.SelectedValue = Main.pk6.Geo5_Region;
|
||||
CB_Country0.SelectedValue = pk6.Geo1_Country;
|
||||
CB_Country1.SelectedValue = pk6.Geo2_Country;
|
||||
CB_Country2.SelectedValue = pk6.Geo3_Country;
|
||||
CB_Country3.SelectedValue = pk6.Geo4_Country;
|
||||
CB_Country4.SelectedValue = pk6.Geo5_Country;
|
||||
CB_Region0.SelectedValue = pk6.Geo1_Region;
|
||||
CB_Region1.SelectedValue = pk6.Geo2_Region;
|
||||
CB_Region2.SelectedValue = pk6.Geo3_Region;
|
||||
CB_Region3.SelectedValue = pk6.Geo4_Region;
|
||||
CB_Region4.SelectedValue = pk6.Geo5_Region;
|
||||
|
||||
// Load the Fullness, and Enjoyment
|
||||
M_Fullness.Text = Main.pk6.Fullness.ToString();
|
||||
M_Enjoyment.Text = Main.pk6.Enjoyment.ToString();
|
||||
M_Fullness.Text = pk6.Fullness.ToString();
|
||||
M_Enjoyment.Text = pk6.Enjoyment.ToString();
|
||||
|
||||
// Load the CT Memories
|
||||
M_CT_Friendship.Text = Main.pk6.HT_Friendship.ToString();
|
||||
M_CT_Affection.Text = Main.pk6.HT_Affection.ToString();
|
||||
CB_CTQual.SelectedIndex = Math.Max(0, Main.pk6.HT_Intensity - 1);
|
||||
CB_CTMemory.SelectedValue = Main.pk6.HT_Memory;
|
||||
CB_CTVar.SelectedValue = Main.pk6.HT_TextVar;
|
||||
CB_CTFeel.SelectedIndex = Main.pk6.HT_Feeling;
|
||||
M_CT_Friendship.Text = pk6.HT_Friendship.ToString();
|
||||
M_CT_Affection.Text = pk6.HT_Affection.ToString();
|
||||
CB_CTQual.SelectedIndex = Math.Max(0, pk6.HT_Intensity - 1);
|
||||
CB_CTMemory.SelectedValue = pk6.HT_Memory;
|
||||
CB_CTVar.SelectedValue = pk6.HT_TextVar;
|
||||
CB_CTFeel.SelectedIndex = pk6.HT_Feeling;
|
||||
|
||||
// Load the OT Memories
|
||||
M_OT_Friendship.Text = Main.pk6.OT_Friendship.ToString();
|
||||
M_OT_Affection.Text = Main.pk6.OT_Affection.ToString();
|
||||
CB_OTQual.SelectedIndex = Math.Max(0, Main.pk6.OT_Intensity - 1);
|
||||
CB_OTMemory.SelectedValue = Main.pk6.OT_Memory;
|
||||
CB_OTVar.SelectedValue = Main.pk6.OT_TextVar;
|
||||
CB_OTFeel.SelectedIndex = Main.pk6.OT_Feeling;
|
||||
M_OT_Friendship.Text = pk6.OT_Friendship.ToString();
|
||||
M_OT_Affection.Text = pk6.OT_Affection.ToString();
|
||||
CB_OTQual.SelectedIndex = Math.Max(0, pk6.OT_Intensity - 1);
|
||||
CB_OTMemory.SelectedValue = pk6.OT_Memory;
|
||||
CB_OTVar.SelectedValue = pk6.OT_TextVar;
|
||||
CB_OTFeel.SelectedIndex = pk6.OT_Feeling;
|
||||
|
||||
CB_Handler.Items.Clear();
|
||||
CB_Handler.Items.AddRange(new object[] {$"{Main.pk6.OT_Name} ({args[2]})"}); // OTNAME : OT
|
||||
CB_Handler.Items.AddRange(new object[] {$"{pk6.OT_Name} ({args[2]})"}); // OTNAME : OT
|
||||
|
||||
if (Util.TrimFromZero(Main.pk6.HT_Name) != "")
|
||||
CB_Handler.Items.AddRange(new object[] { Main.pk6.HT_Name });
|
||||
if (Util.TrimFromZero(pk6.HT_Name) != "")
|
||||
CB_Handler.Items.AddRange(new object[] { pk6.HT_Name });
|
||||
else
|
||||
Main.pk6.CurrentHandler = 0;
|
||||
pk6.CurrentHandler = 0;
|
||||
|
||||
tabControl1.SelectedIndex = CB_Handler.SelectedIndex = Main.pk6.CurrentHandler;
|
||||
tabControl1.SelectedIndex = CB_Handler.SelectedIndex = pk6.CurrentHandler;
|
||||
|
||||
GB_M_OT.Enabled = GB_M_CT.Enabled = GB_Residence.Enabled =
|
||||
BTN_Save.Enabled = M_Fullness.Enabled = M_Enjoyment.Enabled =
|
||||
L_Fullness.Enabled = L_Enjoyment.Enabled = !Main.pk6.IsEgg;
|
||||
L_Fullness.Enabled = L_Enjoyment.Enabled = !pk6.IsEgg;
|
||||
|
||||
if (!Main.pk6.IsEgg)
|
||||
if (!pk6.IsEgg)
|
||||
{
|
||||
bool enable;
|
||||
if (!Main.pk6.Gen6)
|
||||
if (!pk6.Gen6)
|
||||
{
|
||||
// Previous Generation Mon
|
||||
GB_M_OT.Text = $"{args[3]} {Main.pk6.OT_Name}: {args[2]}"; // Past Gen OT : OTNAME
|
||||
GB_M_CT.Text = $"{args[4]} {Main.pk6.HT_Name}"; // Memories with : HTNAME
|
||||
GB_M_OT.Text = $"{args[3]} {pk6.OT_Name}: {args[2]}"; // Past Gen OT : OTNAME
|
||||
GB_M_CT.Text = $"{args[4]} {pk6.HT_Name}"; // Memories with : HTNAME
|
||||
enable = false;
|
||||
// Reset to no memory
|
||||
M_OT_Affection.Text = "0";
|
||||
@@ -111,9 +111,9 @@ private void loadFields()
|
||||
else
|
||||
{
|
||||
enable = true;
|
||||
GB_M_OT.Text = $"{args[4]} {Main.pk6.OT_Name} ({args[2]})"; // Memories with : OTNAME
|
||||
GB_M_CT.Text = $"{args[4]} {Main.pk6.HT_Name}"; // Memories with : HTNAME
|
||||
if (Main.pk6.HT_Name == "")
|
||||
GB_M_OT.Text = $"{args[4]} {pk6.OT_Name} ({args[2]})"; // Memories with : OTNAME
|
||||
GB_M_CT.Text = $"{args[4]} {pk6.HT_Name}"; // Memories with : HTNAME
|
||||
if (pk6.HT_Name == "")
|
||||
{
|
||||
CB_Country1.Enabled = CB_Country2.Enabled = CB_Country3.Enabled = CB_Country4.Enabled =
|
||||
CB_Region1.Enabled = CB_Region2.Enabled = CB_Region3.Enabled = CB_Region4.Enabled =
|
||||
@@ -121,7 +121,7 @@ private void loadFields()
|
||||
GB_M_CT.Text = $"{args[1]} {args[2]} - {args[0]}"; // Never Left : OT : Disabled
|
||||
}
|
||||
else
|
||||
GB_M_CT.Text = args[4] + " " + Main.pk6.HT_Name;
|
||||
GB_M_CT.Text = args[4] + " " + pk6.HT_Name;
|
||||
}
|
||||
RTB_OT.Visible = CB_OTQual.Enabled = CB_OTMemory.Enabled = CB_OTFeel.Enabled = CB_OTVar.Enabled = M_OT_Affection.Enabled = enable;
|
||||
}
|
||||
@@ -131,41 +131,43 @@ private void loadFields()
|
||||
init = true;
|
||||
|
||||
// Manually load the Memory Parse
|
||||
RTB_CT.Text = getMemoryString(CB_CTMemory, CB_CTVar, CB_CTQual, CB_CTFeel, Main.pk6.HT_Name);
|
||||
RTB_OT.Text = getMemoryString(CB_OTMemory, CB_OTVar, CB_OTQual, CB_OTFeel, Main.pk6.OT_Name);
|
||||
RTB_CT.Text = getMemoryString(CB_CTMemory, CB_CTVar, CB_CTQual, CB_CTFeel, pk6.HT_Name);
|
||||
RTB_OT.Text = getMemoryString(CB_OTMemory, CB_OTVar, CB_OTQual, CB_OTFeel, pk6.OT_Name);
|
||||
}
|
||||
private void saveFields()
|
||||
{
|
||||
// Save Region & Country Data
|
||||
Main.pk6.Geo1_Region = Util.getIndex(CB_Region0);
|
||||
Main.pk6.Geo2_Region = Util.getIndex(CB_Region1);
|
||||
Main.pk6.Geo3_Region = Util.getIndex(CB_Region2);
|
||||
Main.pk6.Geo4_Region = Util.getIndex(CB_Region3);
|
||||
Main.pk6.Geo5_Region = Util.getIndex(CB_Region4);
|
||||
Main.pk6.Geo1_Country = Util.getIndex(CB_Country0);
|
||||
Main.pk6.Geo2_Country = Util.getIndex(CB_Country1);
|
||||
Main.pk6.Geo3_Country = Util.getIndex(CB_Country2);
|
||||
Main.pk6.Geo4_Country = Util.getIndex(CB_Country3);
|
||||
Main.pk6.Geo5_Country = Util.getIndex(CB_Country4);
|
||||
pk6.Geo1_Region = Util.getIndex(CB_Region0);
|
||||
pk6.Geo2_Region = Util.getIndex(CB_Region1);
|
||||
pk6.Geo3_Region = Util.getIndex(CB_Region2);
|
||||
pk6.Geo4_Region = Util.getIndex(CB_Region3);
|
||||
pk6.Geo5_Region = Util.getIndex(CB_Region4);
|
||||
pk6.Geo1_Country = Util.getIndex(CB_Country0);
|
||||
pk6.Geo2_Country = Util.getIndex(CB_Country1);
|
||||
pk6.Geo3_Country = Util.getIndex(CB_Country2);
|
||||
pk6.Geo4_Country = Util.getIndex(CB_Country3);
|
||||
pk6.Geo5_Country = Util.getIndex(CB_Country4);
|
||||
|
||||
// Save 0-255 stats
|
||||
Main.pk6.HT_Friendship = Util.ToInt32(M_CT_Friendship.Text);
|
||||
Main.pk6.HT_Affection = Util.ToInt32(M_CT_Affection.Text);
|
||||
Main.pk6.OT_Friendship = Util.ToInt32(M_OT_Friendship.Text);
|
||||
Main.pk6.OT_Affection = Util.ToInt32(M_OT_Affection.Text);
|
||||
Main.pk6.Fullness = (byte)Util.ToInt32(M_Fullness.Text);
|
||||
Main.pk6.Enjoyment = (byte)Util.ToInt32(M_Enjoyment.Text);
|
||||
pk6.HT_Friendship = Util.ToInt32(M_CT_Friendship.Text);
|
||||
pk6.HT_Affection = Util.ToInt32(M_CT_Affection.Text);
|
||||
pk6.OT_Friendship = Util.ToInt32(M_OT_Friendship.Text);
|
||||
pk6.OT_Affection = Util.ToInt32(M_OT_Affection.Text);
|
||||
pk6.Fullness = (byte)Util.ToInt32(M_Fullness.Text);
|
||||
pk6.Enjoyment = (byte)Util.ToInt32(M_Enjoyment.Text);
|
||||
|
||||
// Save Memories
|
||||
Main.pk6.HT_Memory = Util.getIndex(CB_CTMemory);
|
||||
Main.pk6.HT_TextVar = CB_CTVar.Enabled ? Util.getIndex(CB_CTVar) : 0;
|
||||
Main.pk6.HT_Intensity = CB_CTFeel.Enabled ? CB_CTQual.SelectedIndex + 1 : 0;
|
||||
Main.pk6.HT_Feeling = CB_CTFeel.Enabled ? CB_CTFeel.SelectedIndex : 0;
|
||||
pk6.HT_Memory = Util.getIndex(CB_CTMemory);
|
||||
pk6.HT_TextVar = CB_CTVar.Enabled ? Util.getIndex(CB_CTVar) : 0;
|
||||
pk6.HT_Intensity = CB_CTFeel.Enabled ? CB_CTQual.SelectedIndex + 1 : 0;
|
||||
pk6.HT_Feeling = CB_CTFeel.Enabled ? CB_CTFeel.SelectedIndex : 0;
|
||||
|
||||
Main.pk6.OT_Memory = Util.getIndex(CB_OTMemory);
|
||||
Main.pk6.OT_TextVar = CB_OTVar.Enabled ? Util.getIndex(CB_OTVar) : 0;
|
||||
Main.pk6.OT_Intensity = CB_OTFeel.Enabled ? CB_OTQual.SelectedIndex + 1 : 0;
|
||||
Main.pk6.OT_Feeling = CB_OTFeel.Enabled ? CB_OTFeel.SelectedIndex : 0;
|
||||
pk6.OT_Memory = Util.getIndex(CB_OTMemory);
|
||||
pk6.OT_TextVar = CB_OTVar.Enabled ? Util.getIndex(CB_OTVar) : 0;
|
||||
pk6.OT_Intensity = CB_OTFeel.Enabled ? CB_OTQual.SelectedIndex + 1 : 0;
|
||||
pk6.OT_Feeling = CB_OTFeel.Enabled ? CB_OTFeel.SelectedIndex : 0;
|
||||
|
||||
Main.pkm = pk6;
|
||||
}
|
||||
|
||||
// Event Actions
|
||||
@@ -300,7 +302,7 @@ private void getMemoryArguments(string ARG, ComboBox sender)
|
||||
private string getMemoryString(ComboBox m, ComboBox arg, ComboBox q, ComboBox f, string tr)
|
||||
{
|
||||
string result;
|
||||
string nn = Main.pk6.Nickname;
|
||||
string nn = pk6.Nickname;
|
||||
string a = (Util.cbItem)arg.SelectedItem == null ? arg.Text ?? "ERROR" : ((Util.cbItem)arg.SelectedItem).Text;
|
||||
int mem = Util.getIndex(m);
|
||||
|
||||
@@ -403,8 +405,8 @@ private void changeMemory(object sender, EventArgs e)
|
||||
}
|
||||
|
||||
if (!init) return;
|
||||
RTB_OT.Text = getMemoryString(CB_OTMemory, CB_OTVar, CB_OTQual, CB_OTFeel, Main.pk6.OT_Name);
|
||||
RTB_CT.Text = getMemoryString(CB_CTMemory, CB_CTVar, CB_CTQual, CB_CTFeel, Main.pk6.HT_Name);
|
||||
RTB_OT.Text = getMemoryString(CB_OTMemory, CB_OTVar, CB_OTQual, CB_OTFeel, pk6.OT_Name);
|
||||
RTB_CT.Text = getMemoryString(CB_CTMemory, CB_CTVar, CB_CTQual, CB_CTFeel, pk6.HT_Name);
|
||||
}
|
||||
private void changeCountryIndex(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ public partial class RibbMedal : Form
|
||||
public RibbMedal()
|
||||
{
|
||||
InitializeComponent();
|
||||
pk6 = Main.pk6; // cache copy
|
||||
pk6 = Main.pkm as PK6; // cache copy
|
||||
pba = new[] {
|
||||
PB_10, PB_11, PB_12, PB_13,
|
||||
PB_14, PB_15, PB_16, PB_17,
|
||||
@@ -283,7 +283,7 @@ private void buttonFlag(bool b)
|
||||
foreach (var chk in cba.Skip(32))
|
||||
chk.Checked = b;
|
||||
|
||||
if (Main.pk6.Version >= 0x10) return; // No Memory Ribbons for Pokémon from Generation 4+
|
||||
if (Main.pkm.Version >= 0x10) return; // No Memory Ribbons for Pokémon from Generation 4+
|
||||
TB_PastContest.Text = (b ? 40 : 0).ToString();
|
||||
TB_PastBattle.Text = (b ? 8 : 0).ToString();
|
||||
}
|
||||
@@ -316,7 +316,7 @@ private void buttonFlag(bool b)
|
||||
private void B_Save_Click(object sender, EventArgs e)
|
||||
{
|
||||
setData();
|
||||
Main.pk6 = pk6; // set back
|
||||
Main.pkm = pk6; // set back
|
||||
Close();
|
||||
}
|
||||
private void B_Cancel_Click(object sender, EventArgs e)
|
||||
|
||||
711
Properties/Resources.Designer.cs
generated
@@ -9070,6 +9070,16 @@ internal class Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap about {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("about", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
@@ -9260,6 +9270,16 @@ internal class Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap bak {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("bak", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
@@ -9739,6 +9759,18 @@ internal class Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 60 Ash
|
||||
///21 Test1
|
||||
///22 Test2
|
||||
///24 Test3.
|
||||
/// </summary>
|
||||
internal static string const_oras {
|
||||
get {
|
||||
return ResourceManager.GetString("const_oras", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
@@ -9786,6 +9818,26 @@ internal class Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap data {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("data", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap database {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("database", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
@@ -9796,6 +9848,16 @@ internal class Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap dump {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("dump", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
@@ -9906,6 +9968,16 @@ internal class Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap exit {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("exit", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
@@ -9916,6 +9988,80 @@ internal class Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap export {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("export", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 0648 (OR) Groudon Defeated
|
||||
///2839 (OR) Groudon Captured
|
||||
///0647 (AS) Kyogre Defeated
|
||||
///2840 (AS) Kyogre Captured
|
||||
///0208 (OR) Ho-Oh Defeated
|
||||
///2815 (OR) Ho-Oh Captured
|
||||
///0209 (AS) Lugia Defeated
|
||||
///2814 (AS) Lugia Captured
|
||||
///2819 (AS) Dialga Captured
|
||||
///2820 (OR) Palkia Captured
|
||||
///2828 (OR) Tornadus Captured
|
||||
///2829 (AS) Thundurus Captured
|
||||
///2832 Landorus Captured
|
||||
///0182 (OR) Reshiram Defeated
|
||||
///2830 (OR) Reshiram Captured
|
||||
///0183 (AS) Zekrom Defeated
|
||||
///2831 (AS) Zekrom Captured
|
||||
///0419 (OR) Latias Defeated
|
||||
///2834 (OR) Latias Captu [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string flags_oras {
|
||||
get {
|
||||
return ResourceManager.GetString("flags_oras", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 2237 2237
|
||||
///2238 2238
|
||||
///2239 2239
|
||||
///0963 Mewtwo Defeated
|
||||
///0115 Mewtwo Captured
|
||||
///0114 Zygarde Captured
|
||||
///0790 Zygarde Defeated
|
||||
///0285 Singles Statuette
|
||||
///0286 Doubles Statuette
|
||||
///0287 Triples Statuette
|
||||
///0288 Rotation Statuette
|
||||
///0289 Multi Statuette
|
||||
///0290 Super Singles Unlocked
|
||||
///0291 Super Doubles Unlocked
|
||||
///0292 Super Triples Unlocked
|
||||
///0293 Super Rotation Unlocked
|
||||
///0294 Super Multi Unlocked
|
||||
///0675 50: Beat Chatelaine
|
||||
///2546 Pokédex Obtained.
|
||||
/// </summary>
|
||||
internal static string flags_xy {
|
||||
get {
|
||||
return ResourceManager.GetString("flags_xy", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap folder {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("folder", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
@@ -9976,6 +10122,16 @@ internal class Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap import {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("import", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
@@ -14323,6 +14479,16 @@ internal class Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap language {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("language", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to ID,Language
|
||||
///1,JPN (日本語)
|
||||
@@ -14349,6 +14515,16 @@ internal class Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap load {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("load", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
@@ -14379,6 +14555,16 @@ internal class Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap main {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("main", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
@@ -14399,6 +14585,36 @@ internal class Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap nocheck {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("nocheck", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap open {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("open", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap other {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("other", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
@@ -14504,6 +14720,16 @@ internal class Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap report {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("report", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
@@ -14584,6 +14810,36 @@ internal class Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap savePKM {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("savePKM", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap saveSAV {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("saveSAV", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap settings {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("settings", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
@@ -14624,6 +14880,16 @@ internal class Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap showdown {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("showdown", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
@@ -17379,7 +17645,7 @@ internal class Resources {
|
||||
/// Looks up a localized string similar to ----------
|
||||
///谜的地点
|
||||
///遥远的地点
|
||||
///\xf000Ā\x0001\x0000の\xf000ą\x0001\x0001
|
||||
///\xf000Ā\x0001\x0000的\xf000ą\x0001\x0001
|
||||
///鹿子镇
|
||||
///唐草镇
|
||||
///三曜市
|
||||
@@ -18668,19 +18934,19 @@ internal class Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to None
|
||||
///Rock Smash (HGSS)
|
||||
///Tall Grass
|
||||
/// Looks up a localized string similar to æ—
|
||||
///碎岩 (HGSS)
|
||||
///高è‰ä¸›
|
||||
///
|
||||
///Dialga/Palkia
|
||||
///Cave/Hall of Origin
|
||||
///å¸ç‰™å¢å¡/帕路奇犽
|
||||
///æ´žç©´/åˆå§‹ä¹‹é—´
|
||||
///
|
||||
///Surfing/Fishing
|
||||
///冲浪/钓鱼
|
||||
///
|
||||
///Building/Enigma Stone
|
||||
///Marsh/Safari
|
||||
///åšç‰©é¦†/神秘水晶
|
||||
///大湿地/狩猎
|
||||
///
|
||||
///Starter/Fossil/Gift (DP)
|
||||
///御三家/化石/礼物 (DP)
|
||||
///
|
||||
///
|
||||
///
|
||||
@@ -18691,8 +18957,8 @@ internal class Resources {
|
||||
///
|
||||
///
|
||||
///
|
||||
///Distortion World (Pt)
|
||||
///Starter/Fossil/Gift (Pt/DP Trio).
|
||||
///ç ´æ ¼çš„ä¸–ç•Œ(Pt)
|
||||
///御三家/化石/礼物 (Pt/DP Trio).
|
||||
/// </summary>
|
||||
internal static string text_encountertype_zh {
|
||||
get {
|
||||
@@ -20741,7 +21007,7 @@ internal class Resources {
|
||||
///
|
||||
///
|
||||
///
|
||||
///あるすがた
|
||||
///字母形态
|
||||
///
|
||||
///
|
||||
///
|
||||
@@ -20793,7 +21059,8 @@ internal class Resources {
|
||||
///
|
||||
///
|
||||
///
|
||||
///
/// [rest of string was truncated]";.
|
||||
///
|
||||
/// [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string text_forms_zh {
|
||||
get {
|
||||
@@ -21080,8 +21347,8 @@ internal class Resources {
|
||||
///黑2
|
||||
///X
|
||||
///Y
|
||||
///AS
|
||||
///OR
|
||||
///始源蓝宝石
|
||||
///终极红宝石
|
||||
///.
|
||||
/// </summary>
|
||||
internal static string text_games_zh {
|
||||
@@ -21419,70 +21686,77 @@ internal class Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to どこか
|
||||
///さいしょのまち
|
||||
///うち
|
||||
///ともだちのいえ
|
||||
///ひとのうち
|
||||
///にぎやかなまち
|
||||
///ブティック
|
||||
///ショップ
|
||||
///そぼくなまち
|
||||
///ポケモンセンター
|
||||
///おしろ
|
||||
///ホテル
|
||||
///ふしぎなふんいきのまち
|
||||
///かぜのふくまち
|
||||
///ゲート
|
||||
///かわべりのまち
|
||||
///けんきゅうじょ
|
||||
///すいぞくかん
|
||||
///がけにあるまち
|
||||
///はなやかなまち
|
||||
///ポケモンジム
|
||||
///がっこう
|
||||
///きょだいなまち
|
||||
///ビル
|
||||
///オシャレなカフェ
|
||||
///アジト
|
||||
///びじゅつかん
|
||||
///スタジオ
|
||||
///えき
|
||||
///たたかいのば
|
||||
///びようしつ
|
||||
///レストラン
|
||||
///こうきゅうレストラン
|
||||
///うみべのまち
|
||||
///たかいたてもののなか
|
||||
///ふしぎなふんいきのまち
|
||||
///かわぞいのまち
|
||||
///ゆきのふりつもるまち
|
||||
///ポケモンリーグ
|
||||
///きゅうでん
|
||||
///どうくつ
|
||||
///もり
|
||||
///がいろじゅのつづくみち
|
||||
///かわぞいのみち
|
||||
///のどかなみち
|
||||
///はなさくみち
|
||||
///そだてや
|
||||
///けわしいやまみち
|
||||
///いしのたちならぶばしょ
|
||||
///うみのみえるみち
|
||||
///ぬかるんだみち
|
||||
///すなのふきあれるみち
|
||||
///おちばみち
|
||||
///ゆきみち
|
||||
///こうじょう
|
||||
///チャンピオンロード
|
||||
///ゆきやま
|
||||
///はつでんしょ
|
||||
///はたけ
|
||||
///はいきょ
|
||||
///すいどう
|
||||
///サファリ
|
||||
///ひみつきち
|
||||
///コンテストライブかい [rest of string was truncated]";.
|
||||
/// Looks up a localized string similar to 某处
|
||||
///第一个城镇
|
||||
///家
|
||||
///朋友的家
|
||||
///别人的房子
|
||||
///热闹的小镇
|
||||
///精品屋
|
||||
///商店
|
||||
///普通小镇
|
||||
///精灵中心
|
||||
///城堡
|
||||
///酒店
|
||||
///雾气的小镇
|
||||
///微风吹过的小镇
|
||||
///门
|
||||
///河边小镇
|
||||
///实验室
|
||||
///水族馆
|
||||
///悬崖上的小镇
|
||||
///华丽的城市
|
||||
///精灵健身房
|
||||
///学校
|
||||
///大城市
|
||||
///建筑
|
||||
///时尚咖啡厅
|
||||
///藏身处
|
||||
///博物馆
|
||||
///工作室
|
||||
///车站
|
||||
///战场
|
||||
///美容院
|
||||
///餐厅
|
||||
///高档餐厅
|
||||
///海滨城市
|
||||
///高大建筑物内
|
||||
///神秘气息的城市
|
||||
///河畔城市
|
||||
///白雪皑皑的城市
|
||||
///精灵联赛
|
||||
///宫殿
|
||||
///山洞
|
||||
///森林
|
||||
///绿树成荫的道路
|
||||
///滨江路
|
||||
///宁静的道路
|
||||
///盛开的道路
|
||||
///饲育屋
|
||||
///崎岖山路
|
||||
///满是石头的路
|
||||
///海边道路
|
||||
///泥泞的路
|
||||
///沙子路
|
||||
///落叶路
|
||||
///雪扫路
|
||||
///工厂
|
||||
///冠军之路
|
||||
///雪山
|
||||
///发电厂
|
||||
///田地
|
||||
///废墟
|
||||
///水路
|
||||
///野生动物园
|
||||
///秘密基地
|
||||
///华丽大赛会场
|
||||
///海洋深处
|
||||
///幻之位置
|
||||
///大船
|
||||
///火山小径
|
||||
///小岛
|
||||
///神秘的地方
|
||||
///天空.
|
||||
/// </summary>
|
||||
internal static string text_genloc_zh {
|
||||
get {
|
||||
@@ -21889,7 +22163,7 @@ internal class Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to ----
|
||||
/// Looks up a localized string similar to 迷之地方
|
||||
///双叶镇
|
||||
///真砂镇
|
||||
///苑之镇
|
||||
@@ -22551,110 +22825,6 @@ internal class Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Items
|
||||
///Medizin
|
||||
///TM & VM
|
||||
///Beeren
|
||||
///Basis-Items.
|
||||
/// </summary>
|
||||
internal static string text_itempouch_de {
|
||||
get {
|
||||
return ResourceManager.GetString("text_itempouch_de", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to ITEMS
|
||||
///MEDICINE
|
||||
///TMs & HMs
|
||||
///BERRIES
|
||||
///KEY ITEMS.
|
||||
/// </summary>
|
||||
internal static string text_itempouch_en {
|
||||
get {
|
||||
return ResourceManager.GetString("text_itempouch_en", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Objetos
|
||||
///Botiquín
|
||||
///MT/MO
|
||||
///Bayas
|
||||
///Objetos Clave.
|
||||
/// </summary>
|
||||
internal static string text_itempouch_es {
|
||||
get {
|
||||
return ResourceManager.GetString("text_itempouch_es", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to OBJETS
|
||||
///PV/PP
|
||||
///CT & CS
|
||||
///BAIES
|
||||
///OBJETS RARES.
|
||||
/// </summary>
|
||||
internal static string text_itempouch_fr {
|
||||
get {
|
||||
return ResourceManager.GetString("text_itempouch_fr", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Strumenti
|
||||
///Rimedi
|
||||
///MT e MN
|
||||
///Bacche
|
||||
///Strumenti Base.
|
||||
/// </summary>
|
||||
internal static string text_itempouch_it {
|
||||
get {
|
||||
return ResourceManager.GetString("text_itempouch_it", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to どうぐ
|
||||
///かいふく
|
||||
///わざマシン
|
||||
///きのみ
|
||||
///たいせつなもの.
|
||||
/// </summary>
|
||||
internal static string text_itempouch_ja {
|
||||
get {
|
||||
return ResourceManager.GetString("text_itempouch_ja", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 도구
|
||||
///회복
|
||||
///기술머신
|
||||
///나무열매
|
||||
///중요한 물건.
|
||||
/// </summary>
|
||||
internal static string text_itempouch_ko {
|
||||
get {
|
||||
return ResourceManager.GetString("text_itempouch_ko", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 道具
|
||||
///恢复
|
||||
///技能学习器
|
||||
///树果
|
||||
///重要物品.
|
||||
/// </summary>
|
||||
internal static string text_itempouch_zh {
|
||||
get {
|
||||
return ResourceManager.GetString("text_itempouch_zh", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Kein
|
||||
///Meisterball
|
||||
@@ -23427,45 +23597,50 @@ internal class Resources {
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to
|
||||
///
|
||||
///おもいで らしいわ
|
||||
///おもいで らしいわ
|
||||
///おもいで らしいわ
|
||||
///おもいで らしいわ
|
||||
///きおくにのこる おもいで らしいわ
|
||||
///かんがいぶかい おもいで だって
|
||||
///さいこうの おもいで だって!
|
||||
///神奇宝贝记得
|
||||
///神奇宝贝记得
|
||||
///神奇宝贝记得
|
||||
///神奇宝贝记得
|
||||
///神奇宝贝清晰得记得
|
||||
///神奇宝贝肯定得记得
|
||||
///神奇宝贝美美得记得
|
||||
///
|
||||
///うれしかった
|
||||
///たのしかった
|
||||
///よろこんだ
|
||||
///ニヤニヤした
|
||||
///たまらない きもちになった
|
||||
///なんともいえない きもちだった
|
||||
///いい きぶんになった
|
||||
///うるうるした
|
||||
///うかれてしまった
|
||||
///きんちょうした
|
||||
///きもちよかった
|
||||
///もぞもぞした
|
||||
///クセになりそうに なった
|
||||
///もうしわけない きぶんになった
|
||||
///せつない きもちになった
|
||||
///なつかしい きもちになった
|
||||
///てこずった
|
||||
///きつかった
|
||||
///すなおに なれなかった
|
||||
///ほこらしく おもった
|
||||
///けんあくな ムードになった
|
||||
///おこってしまった
|
||||
///しっとした
|
||||
///ねむくなった
|
||||
///它很高兴
|
||||
///它玩的开心
|
||||
///它很开心
|
||||
///它咧嘴笑
|
||||
///它变得不知所措
|
||||
///它的感觉难以形容
|
||||
///它感觉很好
|
||||
///它变得饱含泪水
|
||||
///它感到轻松
|
||||
///它感到紧张了
|
||||
///它感觉很舒服
|
||||
///它感到焦躁不安
|
||||
///它变得有点得意忘形
|
||||
///它感到惋惜
|
||||
///它变得很敏感
|
||||
///它变得很怀旧
|
||||
///它遇到了一些困难
|
||||
///它感到精疲力尽
|
||||
///它感觉不像是真的
|
||||
///它感到骄傲
|
||||
///他们以坏心情收场
|
||||
///它变得愤怒
|
||||
///它感到嫉妒
|
||||
///它想睡觉
|
||||
///
|
||||
///なにかのどうぐ
|
||||
///なにかのわざ
|
||||
///だれか
|
||||
///いい おもいでが あるようだけど ちょっと おもいおこせないみたい……
|
||||
///{0}は {1}に {2}で であい モンスターボールを なげられて いっしょに たびする ことになり {3}ことが {4}
|
||||
///{0}は {2}で タマゴの からをやぶって [rest of string was truncated]";.
|
||||
///某一道具
|
||||
///某一技能
|
||||
///神奇宝贝
|
||||
///这只神奇宝贝好像有很美好的回忆,但是它似乎想不起来了……
|
||||
///{0}和{1}的第一次相遇在……{2}。{1}朝它使用了神奇宝贝球,之后他们就开始一起旅行了。
|
||||
///{0}从蛋中孵化并且看见{1}第一眼的地方是在……{2}。
|
||||
///{0}和{1}相遇的地方是……{2}。
|
||||
///{0}在{2}通过通讯交换遇见了{1},他们随后成了朋友。
|
||||
///{0}和{1}一起去了宝可梦中心/友好商店,购买了{2}。
|
||||
///{0}和{1}一起去了{2}的宝可梦中心并且恢复了它疲惫的身体。
|
||||
///{0 [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string text_memories_zh {
|
||||
get {
|
||||
@@ -24270,29 +24445,29 @@ internal class Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 努力/实干
|
||||
///寂寞/孤僻
|
||||
/// Looks up a localized string similar to 努力
|
||||
///孤独
|
||||
///勇敢
|
||||
///固执
|
||||
///顽皮/调皮
|
||||
///调皮
|
||||
///大胆
|
||||
///坦率
|
||||
///直率
|
||||
///悠闲
|
||||
///淘气
|
||||
///无虑
|
||||
///乐天
|
||||
///胆小
|
||||
///急躁
|
||||
///认真
|
||||
///开朗
|
||||
///天真
|
||||
///谨慎/保守
|
||||
///温和/稳重
|
||||
///保守
|
||||
///稳重
|
||||
///冷静
|
||||
///腼腆/害羞
|
||||
///害羞
|
||||
///马虎
|
||||
///安静/沉着
|
||||
///沉着
|
||||
///温顺
|
||||
///傲慢/狂妄
|
||||
///狂妄
|
||||
///慎重
|
||||
///浮躁.
|
||||
/// </summary>
|
||||
@@ -24528,37 +24703,57 @@ internal class Resources {
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 能量方块盒
|
||||
///树果混合器
|
||||
///ポロックを あげる
|
||||
///あげる
|
||||
///ポロックを つくる
|
||||
///つくる
|
||||
///给与一个能量方块
|
||||
///给与
|
||||
///制作能量方块
|
||||
///制作
|
||||
///[~ 6]
|
||||
///いろ
|
||||
///颜色
|
||||
///[VAR NUM3(0000)]
|
||||
///[VAR PKNICK(0000)]
|
||||
///[VAR MOVE(0000)]
|
||||
///どのポケモンに あげますか?
|
||||
///[VAR PKNICK(0000)]に ポロックを あげた!
|
||||
///しぼりこむ いろを えらんでください
|
||||
///ポロックを えらんでください
|
||||
///ポロックを どうしますか?
|
||||
///まぜる きのみを えらんでください
|
||||
///给哪个精灵?
|
||||
///你把能量块给了[VAR PKNICK(0000)]!
|
||||
///请选择筛选颜色
|
||||
///选择一个能量方块
|
||||
///要对能量方块做些什么?
|
||||
///选择需要混合的树果
|
||||
///[~ 17]
|
||||
///[VAR 01A3(0000)]が [VAR NUM1(0001)]コ できた![VAR BE05(0000)][VAR BE05(0001)]
|
||||
///[VAR PKNICK(0000)]に ポロックをあげますか?
|
||||
///タマゴは たべられません!
|
||||
///どのポケモンに あげますか?
|
||||
///4つ までしか いれられません!
|
||||
///あか で しぼりこみました
|
||||
///あお で しぼりこみました
|
||||
///ももいろ で しぼりこみました
|
||||
///みどり で しぼりこみました
|
||||
///きいろ で しぼりこみました
|
||||
///ブレンドスタート
|
||||
///きのみを もどす
|
||||
///ポケモンにあげる
|
||||
///やめる
|
||||
///はい
/// [rest of string was truncated]";.
|
||||
///你做出了[VAR 01A3(0000)]个[VAR NUM1(0001)]![VAR BE05(0000)][VAR BE05(0001)]
|
||||
///把能量方块给[VAR PKNICK(0000)]?
|
||||
///蛋不能吃能量方块!
|
||||
///给哪个精灵?
|
||||
///你不能混合超过4个树果!
|
||||
///按红色筛选
|
||||
///按蓝色筛选
|
||||
///按粉色筛选
|
||||
///按绿色筛选
|
||||
///按黄色筛选
|
||||
///开始混合
|
||||
///返回树果
|
||||
///给与
|
||||
///退出
|
||||
///是
|
||||
///否
|
||||
///全部
|
||||
///红
|
||||
///蓝
|
||||
///粉
|
||||
///绿
|
||||
///黄
|
||||
///[~ 40]
|
||||
///[~ 41]
|
||||
///[~ 42]
|
||||
///[~ 43]
|
||||
///[~ 44]
|
||||
///[~ 45]
|
||||
///[~ 46]
|
||||
///[~ 47]
|
||||
///[~ 48]
|
||||
///[~ 49]
|
||||
///[~ 50]
|
||||
///[VAR 01A3(0000)]
|
||||
/// [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string text_pokeblock_zh {
|
||||
get {
|
||||
|
||||
@@ -5395,30 +5395,6 @@
|
||||
<data name="text_hgss_03000_zh" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\text\zh\text_hgss_03000_zh.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="text_itempouch_de" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\text\de\text_ItemPouch_de.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="text_itempouch_en" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\text\en\text_ItemPouch_en.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="text_itempouch_es" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\text\es\text_ItemPouch_es.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="text_itempouch_fr" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\text\fr\text_ItemPouch_fr.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="text_itempouch_it" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\text\it\text_ItemPouch_it.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="text_itempouch_ja" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\text\ja\text_ItemPouch_ja.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="text_itempouch_ko" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\text\ko\text_ItemPouch_ko.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="text_itempouch_zh" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\text\zh\text_ItemPouch_zh.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="text_items_de" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\text\de\text_Items_de.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
@@ -5824,4 +5800,73 @@
|
||||
<data name="wc6full" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\byte\wc6full.pkl;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="const_oras" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\text\other\const_oras.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="flags_oras" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\text\other\flags_oras.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="flags_xy" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\text\other\flags_xy.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="about" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\img\Program\about.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="bak" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\img\Program\bak.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="data" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\img\Program\data.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="database" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\img\Program\database.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="dump" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\img\Program\dump.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="exit" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\img\Program\exit.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="export" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\img\Program\export.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="folder" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\img\Program\folder.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="import" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\img\Program\import.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="language" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\img\Program\language.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="load" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\img\Program\load.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="main" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\img\Program\main.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="nocheck" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\img\Program\nocheck.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="open" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\img\Program\open.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="other" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\img\Program\other.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="report" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\img\Program\report.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="savePKM" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\img\Program\savePKM.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="saveSAV" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\img\Program\saveSAV.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="settings" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\img\Program\settings.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="showdown" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\img\Program\showdown.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
27
README.md
@@ -1,26 +1,25 @@
|
||||
PKHeX
|
||||
=====
|
||||
|
||||
Pokémon X/Y/OR/AS SAV/PKX file editor, programmed in [C#](https://en.wikipedia.org/wiki/C_Sharp_%28programming_language%29).
|
||||
Pokémon NDS/3DS save editor, programmed in [C#](https://en.wikipedia.org/wiki/C_Sharp_%28programming_language%29).
|
||||
|
||||
Supports binary file loading of the following files originating from the Nintendo 3DS:
|
||||
* Decrypted Save files (1MB/Cyber Save 0x65600/0x76000 Bytes)
|
||||
* Individual entity files (232/260 bytes), saved as .pk6 and .ek6
|
||||
* Conversion of Event Gift files (.wc6) to .pk6
|
||||
* Decrypted Battle Videos
|
||||
|
||||
The following files from previous generations of games are supported:
|
||||
* Transferring of previous generation entities (.pkm) to .pk6
|
||||
* Conversion of Event Files (.pgt, .pcd, .pgf) to .pk6
|
||||
Supports the following files originating from the Nintendo NDS & 3DS:
|
||||
* Save files ("main", .sav)
|
||||
* Individual Pokémon entity files (.pk*)
|
||||
* Mystery Gift files (.pgt, .pcd, .pgf, .wc6) including conversion to .pk*
|
||||
* Importing teams from Decrypted Battle Videos (X/Y/OR/AS only)
|
||||
* Transferring of previous generation entities (.pkm) to future generation formats and save files
|
||||
|
||||
Data is then displayed in a meaningful view, and can be edited and saved back to binary data.
|
||||
Since the Nintendo 3DS savedata containers use an AES MAC that cannot be emulated without the 3DS's keys, a resigning service is required (svdt, save_manager, or SaveDataFiler).
|
||||
Data is displayed in a view which can be edited and saved.
|
||||
The interface can be translated with resource/external text files so that different languages can be supported.
|
||||
|
||||
The interface is translatable with resource/external text files so that different languages can be supported.
|
||||
Pokémon Showdown sets can be imported/exported in addition to QR codes.
|
||||
|
||||
Nintendo 3DS savedata containers use an AES MAC that cannot be emulated without the 3DS's keys, thus a resigning service is required (svdt, save_manager, or SaveDataFiler).
|
||||
|
||||
## Screenshots
|
||||
|
||||

|
||||

|
||||
|
||||
### License
|
||||
|
||||
|
||||
BIN
Resources/img/Bag/Bag_Balls.png
Normal file
|
After Width: | Height: | Size: 283 B |
BIN
Resources/img/Bag/Bag_Battle.png
Normal file
|
After Width: | Height: | Size: 305 B |
BIN
Resources/img/Bag/Bag_Berries.png
Normal file
|
After Width: | Height: | Size: 291 B |
BIN
Resources/img/Bag/Bag_Items.png
Normal file
|
After Width: | Height: | Size: 257 B |
BIN
Resources/img/Bag/Bag_Key.png
Normal file
|
After Width: | Height: | Size: 286 B |
BIN
Resources/img/Bag/Bag_Mail.png
Normal file
|
After Width: | Height: | Size: 225 B |
BIN
Resources/img/Bag/Bag_Medicine.png
Normal file
|
After Width: | Height: | Size: 216 B |
BIN
Resources/img/Bag/Bag_TMHM.png
Normal file
|
After Width: | Height: | Size: 311 B |
BIN
Resources/img/Program/about.png
Normal file
|
After Width: | Height: | Size: 367 B |
BIN
Resources/img/Program/bak.png
Normal file
|
After Width: | Height: | Size: 352 B |
BIN
Resources/img/Program/data.png
Normal file
|
After Width: | Height: | Size: 168 B |
BIN
Resources/img/Program/database.png
Normal file
|
After Width: | Height: | Size: 134 B |
BIN
Resources/img/Program/dump.png
Normal file
|
After Width: | Height: | Size: 203 B |
BIN
Resources/img/Program/exit.png
Normal file
|
After Width: | Height: | Size: 288 B |
BIN
Resources/img/Program/export.png
Normal file
|
After Width: | Height: | Size: 253 B |
BIN
Resources/img/Program/folder.png
Normal file
|
After Width: | Height: | Size: 177 B |
BIN
Resources/img/Program/import.png
Normal file
|
After Width: | Height: | Size: 372 B |
BIN
Resources/img/Program/language.png
Normal file
|
After Width: | Height: | Size: 439 B |
BIN
Resources/img/Program/load.png
Normal file
|
After Width: | Height: | Size: 206 B |
BIN
Resources/img/Program/main.png
Normal file
|
After Width: | Height: | Size: 274 B |
BIN
Resources/img/Program/nocheck.png
Normal file
|
After Width: | Height: | Size: 224 B |
BIN
Resources/img/Program/open.png
Normal file
|
After Width: | Height: | Size: 180 B |
BIN
Resources/img/Program/other.png
Normal file
|
After Width: | Height: | Size: 357 B |
BIN
Resources/img/Program/report.png
Normal file
|
After Width: | Height: | Size: 297 B |
BIN
Resources/img/Program/savePKM.png
Normal file
|
After Width: | Height: | Size: 334 B |
BIN
Resources/img/Program/saveSAV.png
Normal file
|
After Width: | Height: | Size: 289 B |
BIN
Resources/img/Program/settings.png
Normal file
|
After Width: | Height: | Size: 354 B |
BIN
Resources/img/Program/showdown.png
Normal file
|
After Width: | Height: | Size: 289 B |
@@ -1,5 +0,0 @@
|
||||
Items
|
||||
Medizin
|
||||
TM & VM
|
||||
Beeren
|
||||
Basis-Items
|
||||
@@ -1,5 +0,0 @@
|
||||
ITEMS
|
||||
MEDICINE
|
||||
TMs & HMs
|
||||
BERRIES
|
||||
KEY ITEMS
|
||||
@@ -1,5 +0,0 @@
|
||||
Objetos
|
||||
Botiquín
|
||||
MT/MO
|
||||
Bayas
|
||||
Objetos Clave
|
||||
@@ -1,5 +0,0 @@
|
||||
OBJETS
|
||||
PV/PP
|
||||
CT & CS
|
||||
BAIES
|
||||
OBJETS RARES
|
||||
@@ -1,5 +0,0 @@
|
||||
Strumenti
|
||||
Rimedi
|
||||
MT e MN
|
||||
Bacche
|
||||
Strumenti Base
|
||||
@@ -1,5 +0,0 @@
|
||||
どうぐ
|
||||
かいふく
|
||||
わざマシン
|
||||
きのみ
|
||||
たいせつなもの
|
||||
@@ -1,5 +0,0 @@
|
||||
도구
|
||||
회복
|
||||
기술머신
|
||||
나무열매
|
||||
중요한 물건
|
||||
4
Resources/text/other/const_oras.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
60 Ash
|
||||
21 Test1
|
||||
22 Test2
|
||||
24 Test3
|
||||
66
Resources/text/other/flags_oras.txt
Normal file
@@ -0,0 +1,66 @@
|
||||
0648 (OR) Groudon Defeated
|
||||
2839 (OR) Groudon Captured
|
||||
0647 (AS) Kyogre Defeated
|
||||
2840 (AS) Kyogre Captured
|
||||
0208 (OR) Ho-Oh Defeated
|
||||
2815 (OR) Ho-Oh Captured
|
||||
0209 (AS) Lugia Defeated
|
||||
2814 (AS) Lugia Captured
|
||||
2819 (AS) Dialga Captured
|
||||
2820 (OR) Palkia Captured
|
||||
2828 (OR) Tornadus Captured
|
||||
2829 (AS) Thundurus Captured
|
||||
2832 Landorus Captured
|
||||
0182 (OR) Reshiram Defeated
|
||||
2830 (OR) Reshiram Captured
|
||||
0183 (AS) Zekrom Defeated
|
||||
2831 (AS) Zekrom Captured
|
||||
0419 (OR) Latias Defeated
|
||||
2834 (OR) Latias Captured
|
||||
0420 (AS) Latios Defeated
|
||||
2835 (AS) Latios Captured
|
||||
0945 Deoxys Defeated @ Sky Tower
|
||||
2842 Deoxys Captured @ Sky Tower
|
||||
0173 Raikou Defeated
|
||||
2811 Raikou Captured
|
||||
0174 Entei Defeated
|
||||
2812 Entei Captured
|
||||
0175 Suicune Defeated
|
||||
2813 Suicune Captured
|
||||
0176 Cobalion Defeated
|
||||
2825 Cobalion Captured
|
||||
0177 Terrakion Defeated
|
||||
2826 Terrakion Captured
|
||||
0178 Virizion Defeated
|
||||
2827 Virizion Captured
|
||||
0184 Kyurem Defeated
|
||||
2833 Kyurem Captured
|
||||
0179 Uxie Defeated
|
||||
2816 Uxie Captured
|
||||
0180 Mesprit Defeated
|
||||
2817 Mesprit Captured
|
||||
0181 Azelf Defeated
|
||||
2818 Azelf Captured
|
||||
0172 Cresselia Defeated
|
||||
2824 Cresselia Captured
|
||||
2823 Giratina Captured
|
||||
0260 Heatran Defeated
|
||||
2821 Heatran Captured
|
||||
0956 Regirock Defeated
|
||||
2836 Regirock Captured
|
||||
0957 Regice Defeated
|
||||
2837 Regice Captured
|
||||
0958 Registeel Defeated
|
||||
2838 Registeel Captured
|
||||
0252 Regigigas Defeated
|
||||
2822 Regigigas Captured
|
||||
0284 Singles Statuette
|
||||
0285 Doubles Statuette
|
||||
0286 Triples Statuette
|
||||
0287 Rotation Statuette
|
||||
0288 Multi Statuette
|
||||
0289 Super Singles Unlocked
|
||||
0290 Super Doubles Unlocked
|
||||
0291 Super Triples Unlocked
|
||||
0292 Super Rotation Unlocked
|
||||
0293 Super Multi Unlocked
|
||||
19
Resources/text/other/flags_xy.txt
Normal file
@@ -0,0 +1,19 @@
|
||||
2237 2237
|
||||
2238 2238
|
||||
2239 2239
|
||||
0963 Mewtwo Defeated
|
||||
0115 Mewtwo Captured
|
||||
0114 Zygarde Captured
|
||||
0790 Zygarde Defeated
|
||||
0285 Singles Statuette
|
||||
0286 Doubles Statuette
|
||||
0287 Triples Statuette
|
||||
0288 Rotation Statuette
|
||||
0289 Multi Statuette
|
||||
0290 Super Singles Unlocked
|
||||
0291 Super Doubles Unlocked
|
||||
0292 Super Triples Unlocked
|
||||
0293 Super Rotation Unlocked
|
||||
0294 Super Multi Unlocked
|
||||
0675 50: Beat Chatelaine
|
||||
2546 Pokédex Obtained
|
||||
@@ -1,5 +0,0 @@
|
||||
道具
|
||||
恢复
|
||||
技能学习器
|
||||
树果
|
||||
重要物品
|
||||
@@ -11,21 +11,21 @@ public SAV_BerryFieldXY()
|
||||
Util.TranslateInterface(this, Main.curlanguage);
|
||||
listBox1.SelectedIndex = 0;
|
||||
}
|
||||
private readonly byte[] sav = (byte[])Main.SAV.Data.Clone();
|
||||
private readonly SAV6 SAV = new SAV6(Main.SAV.Data);
|
||||
|
||||
private void changefield(object sender, EventArgs e)
|
||||
{
|
||||
// Change Berry Field
|
||||
|
||||
// Gather Data
|
||||
int berry = BitConverter.ToUInt16(sav, Main.SAV.BerryField + 0xC + listBox1.SelectedIndex*0x18 + 1 * 0);
|
||||
int u1 = BitConverter.ToUInt16(sav, Main.SAV.BerryField + 0xC + listBox1.SelectedIndex * 0x18 + 1 * 2);
|
||||
int u2 = BitConverter.ToUInt16(sav, Main.SAV.BerryField + 0xC + listBox1.SelectedIndex * 0x18 + 2 * 2);
|
||||
int u3 = BitConverter.ToUInt16(sav, Main.SAV.BerryField + 0xC + listBox1.SelectedIndex * 0x18 + 3 * 2);
|
||||
int u4 = BitConverter.ToUInt16(sav, Main.SAV.BerryField + 0xC + listBox1.SelectedIndex * 0x18 + 4 * 2);
|
||||
int u5 = BitConverter.ToUInt16(sav, Main.SAV.BerryField + 0xC + listBox1.SelectedIndex * 0x18 + 5 * 2);
|
||||
int u6 = BitConverter.ToUInt16(sav, Main.SAV.BerryField + 0xC + listBox1.SelectedIndex * 0x18 + 6 * 2);
|
||||
int u7 = BitConverter.ToUInt16(sav, Main.SAV.BerryField + 0xC + listBox1.SelectedIndex * 0x18 + 7 * 2);
|
||||
int berry = BitConverter.ToUInt16(SAV.Data, SAV.BerryField + 0xC + listBox1.SelectedIndex*0x18 + 1 * 0);
|
||||
int u1 = BitConverter.ToUInt16(SAV.Data, SAV.BerryField + 0xC + listBox1.SelectedIndex * 0x18 + 1 * 2);
|
||||
int u2 = BitConverter.ToUInt16(SAV.Data, SAV.BerryField + 0xC + listBox1.SelectedIndex * 0x18 + 2 * 2);
|
||||
int u3 = BitConverter.ToUInt16(SAV.Data, SAV.BerryField + 0xC + listBox1.SelectedIndex * 0x18 + 3 * 2);
|
||||
int u4 = BitConverter.ToUInt16(SAV.Data, SAV.BerryField + 0xC + listBox1.SelectedIndex * 0x18 + 4 * 2);
|
||||
int u5 = BitConverter.ToUInt16(SAV.Data, SAV.BerryField + 0xC + listBox1.SelectedIndex * 0x18 + 5 * 2);
|
||||
int u6 = BitConverter.ToUInt16(SAV.Data, SAV.BerryField + 0xC + listBox1.SelectedIndex * 0x18 + 6 * 2);
|
||||
int u7 = BitConverter.ToUInt16(SAV.Data, SAV.BerryField + 0xC + listBox1.SelectedIndex * 0x18 + 7 * 2);
|
||||
|
||||
|
||||
// Display Data
|
||||
|
||||
@@ -18,28 +18,28 @@ public SAV_BoxLayout(int box)
|
||||
CB_BG.Items.Add(wallpaper);
|
||||
|
||||
// Go
|
||||
MT_BG1.Text = sav.Data[sav.PCFlags + 0].ToString();
|
||||
CB_Unlocked.SelectedIndex = sav.Data[sav.PCFlags + 1] - 1;
|
||||
MT_BG2.Text = sav.Data[sav.PCFlags + 2].ToString();
|
||||
MT_BG1.Text = SAV.Data[SAV.PCFlags + 0].ToString();
|
||||
CB_Unlocked.SelectedIndex = SAV.Data[SAV.PCFlags + 1] - 1;
|
||||
MT_BG2.Text = SAV.Data[SAV.PCFlags + 2].ToString();
|
||||
LB_BoxSelect.SelectedIndex = box;
|
||||
}
|
||||
private readonly SAV6 sav = new SAV6((byte[])Main.SAV.Data.Clone());
|
||||
private readonly SAV6 SAV = new SAV6(Main.SAV.Data);
|
||||
private bool editing;
|
||||
|
||||
private void changeBox(object sender, EventArgs e)
|
||||
{
|
||||
editing = true;
|
||||
|
||||
int bgoff = sav.PCBackgrounds + LB_BoxSelect.SelectedIndex;
|
||||
CB_BG.SelectedIndex = sav.Data[bgoff];
|
||||
TB_BoxName.Text = sav.getBoxName(LB_BoxSelect.SelectedIndex);
|
||||
int bgoff = SAV.PCBackgrounds + LB_BoxSelect.SelectedIndex;
|
||||
CB_BG.SelectedIndex = SAV.Data[bgoff];
|
||||
TB_BoxName.Text = SAV.getBoxName(LB_BoxSelect.SelectedIndex);
|
||||
|
||||
editing = false;
|
||||
}
|
||||
private void changeBoxDetails(object sender, EventArgs e)
|
||||
{
|
||||
if (!editing)
|
||||
sav.setBoxName(LB_BoxSelect.SelectedIndex, TB_BoxName.Text);
|
||||
SAV.setBoxName(LB_BoxSelect.SelectedIndex, TB_BoxName.Text);
|
||||
}
|
||||
private void B_Cancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -47,11 +47,11 @@ private void B_Cancel_Click(object sender, EventArgs e)
|
||||
}
|
||||
private void B_Save_Click(object sender, EventArgs e)
|
||||
{
|
||||
sav.Data[sav.PCFlags + 0] = (byte)Util.ToUInt32(MT_BG1.Text);
|
||||
sav.Data[sav.PCFlags + 1] = (byte)Util.ToUInt32(CB_Unlocked.Text);
|
||||
sav.Data[sav.PCFlags + 2] = (byte)Util.ToUInt32(MT_BG2.Text);
|
||||
SAV.Data[SAV.PCFlags + 0] = (byte)Util.ToUInt32(MT_BG1.Text);
|
||||
SAV.Data[SAV.PCFlags + 1] = (byte)Util.ToUInt32(CB_Unlocked.Text);
|
||||
SAV.Data[SAV.PCFlags + 2] = (byte)Util.ToUInt32(MT_BG2.Text);
|
||||
|
||||
Array.Copy(sav.Data, Main.SAV.Data, sav.Data.Length);
|
||||
Array.Copy(SAV.Data, Main.SAV.Data, SAV.Data.Length);
|
||||
Main.SAV.Edited = true;
|
||||
Close();
|
||||
}
|
||||
@@ -59,9 +59,9 @@ private void B_Save_Click(object sender, EventArgs e)
|
||||
private void changeBoxBG(object sender, EventArgs e)
|
||||
{
|
||||
if (!editing)
|
||||
sav.Data[Main.SAV.PCBackgrounds + LB_BoxSelect.SelectedIndex] = (byte)CB_BG.SelectedIndex;
|
||||
SAV.Data[SAV.PCBackgrounds + LB_BoxSelect.SelectedIndex] = (byte)CB_BG.SelectedIndex;
|
||||
|
||||
string imagename = "box_wp" + (CB_BG.SelectedIndex + 1).ToString("00"); if (sav.ORAS && CB_BG.SelectedIndex + 1 > 16) imagename += "o";
|
||||
string imagename = "box_wp" + (CB_BG.SelectedIndex + 1).ToString("00"); if (SAV.ORAS && CB_BG.SelectedIndex + 1 > 16) imagename += "o";
|
||||
PAN_BG.BackgroundImage = (Image)Properties.Resources.ResourceManager.GetObject(imagename);
|
||||
}
|
||||
}
|
||||
|
||||
504
SAV/SAV_Database.Designer.cs
generated
@@ -128,8 +128,6 @@ private void InitializeComponent()
|
||||
this.CB_HPType = new System.Windows.Forms.ComboBox();
|
||||
this.Label_HiddenPowerPrefix = new System.Windows.Forms.Label();
|
||||
this.CB_GameOrigin = new System.Windows.Forms.ComboBox();
|
||||
this.CHK_IsEgg = new System.Windows.Forms.CheckBox();
|
||||
this.CHK_Shiny = new System.Windows.Forms.CheckBox();
|
||||
this.CB_IV = new System.Windows.Forms.ComboBox();
|
||||
this.B_Search = new System.Windows.Forms.Button();
|
||||
this.CB_Level = new System.Windows.Forms.ComboBox();
|
||||
@@ -141,12 +139,19 @@ private void InitializeComponent()
|
||||
this.L_Potential = new System.Windows.Forms.Label();
|
||||
this.L_EVTraining = new System.Windows.Forms.Label();
|
||||
this.B_Reset = new System.Windows.Forms.Button();
|
||||
this.MT_ESV = new System.Windows.Forms.MaskedTextBox();
|
||||
this.L_ESV = new System.Windows.Forms.Label();
|
||||
this.L_Count = new System.Windows.Forms.Label();
|
||||
this.L_Generation = new System.Windows.Forms.Label();
|
||||
this.CB_Generation = new System.Windows.Forms.ComboBox();
|
||||
this.L_Viewed = new System.Windows.Forms.Label();
|
||||
this.FLP_Egg = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.CHK_IsEgg = new System.Windows.Forms.CheckBox();
|
||||
this.L_ESV = new System.Windows.Forms.Label();
|
||||
this.MT_ESV = new System.Windows.Forms.MaskedTextBox();
|
||||
this.CHK_Shiny = new System.Windows.Forms.CheckBox();
|
||||
this.TLP_Filters = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.FLP_Level = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.CB_Format = new System.Windows.Forms.ComboBox();
|
||||
this.L_Format = new System.Windows.Forms.Label();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx30)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx29)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx28)).BeginInit();
|
||||
@@ -216,6 +221,9 @@ private void InitializeComponent()
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx63)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx62)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx61)).BeginInit();
|
||||
this.FLP_Egg.SuspendLayout();
|
||||
this.TLP_Filters.SuspendLayout();
|
||||
this.FLP_Level.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// SCR_Box
|
||||
@@ -911,6 +919,7 @@ private void InitializeComponent()
|
||||
//
|
||||
// Menu_Exit
|
||||
//
|
||||
this.Menu_Exit.Image = global::PKHeX.Properties.Resources.exit;
|
||||
this.Menu_Exit.Name = "Menu_Exit";
|
||||
this.Menu_Exit.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.E)));
|
||||
this.Menu_Exit.ShowShortcutKeys = false;
|
||||
@@ -936,6 +945,7 @@ private void InitializeComponent()
|
||||
this.Menu_SearchDatabase,
|
||||
this.Menu_SearchLegal,
|
||||
this.Menu_SearchIllegal});
|
||||
this.Menu_SearchSettings.Image = global::PKHeX.Properties.Resources.settings;
|
||||
this.Menu_SearchSettings.Name = "Menu_SearchSettings";
|
||||
this.Menu_SearchSettings.Size = new System.Drawing.Size(197, 22);
|
||||
this.Menu_SearchSettings.Text = "Search Settings";
|
||||
@@ -978,6 +988,7 @@ private void InitializeComponent()
|
||||
//
|
||||
// Menu_OpenDB
|
||||
//
|
||||
this.Menu_OpenDB.Image = global::PKHeX.Properties.Resources.folder;
|
||||
this.Menu_OpenDB.Name = "Menu_OpenDB";
|
||||
this.Menu_OpenDB.Size = new System.Drawing.Size(197, 22);
|
||||
this.Menu_OpenDB.Text = "Open Database Folder";
|
||||
@@ -985,6 +996,7 @@ private void InitializeComponent()
|
||||
//
|
||||
// Menu_Report
|
||||
//
|
||||
this.Menu_Report.Image = global::PKHeX.Properties.Resources.report;
|
||||
this.Menu_Report.Name = "Menu_Report";
|
||||
this.Menu_Report.Size = new System.Drawing.Size(197, 22);
|
||||
this.Menu_Report.Text = "Create Data Report";
|
||||
@@ -992,6 +1004,7 @@ private void InitializeComponent()
|
||||
//
|
||||
// Menu_Export
|
||||
//
|
||||
this.Menu_Export.Image = global::PKHeX.Properties.Resources.export;
|
||||
this.Menu_Export.Name = "Menu_Export";
|
||||
this.Menu_Export.Size = new System.Drawing.Size(197, 22);
|
||||
this.Menu_Export.Text = "Export Results to Folder";
|
||||
@@ -1151,99 +1164,108 @@ private void InitializeComponent()
|
||||
//
|
||||
// CB_Ability
|
||||
//
|
||||
this.CB_Ability.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.CB_Ability.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.CB_Ability.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
|
||||
this.CB_Ability.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
|
||||
this.CB_Ability.FormattingEnabled = true;
|
||||
this.CB_Ability.Items.AddRange(new object[] {
|
||||
"Item"});
|
||||
this.CB_Ability.Location = new System.Drawing.Point(400, 89);
|
||||
this.CB_Ability.Location = new System.Drawing.Point(83, 83);
|
||||
this.CB_Ability.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.CB_Ability.Name = "CB_Ability";
|
||||
this.CB_Ability.Size = new System.Drawing.Size(122, 21);
|
||||
this.CB_Ability.TabIndex = 70;
|
||||
//
|
||||
// CB_HeldItem
|
||||
//
|
||||
this.CB_HeldItem.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.CB_HeldItem.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.CB_HeldItem.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
|
||||
this.CB_HeldItem.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
|
||||
this.CB_HeldItem.FormattingEnabled = true;
|
||||
this.CB_HeldItem.Location = new System.Drawing.Point(400, 68);
|
||||
this.CB_HeldItem.Location = new System.Drawing.Point(83, 62);
|
||||
this.CB_HeldItem.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.CB_HeldItem.Name = "CB_HeldItem";
|
||||
this.CB_HeldItem.Size = new System.Drawing.Size(122, 21);
|
||||
this.CB_HeldItem.TabIndex = 69;
|
||||
//
|
||||
// CB_Nature
|
||||
//
|
||||
this.CB_Nature.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.CB_Nature.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.CB_Nature.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
|
||||
this.CB_Nature.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
|
||||
this.CB_Nature.FormattingEnabled = true;
|
||||
this.CB_Nature.Location = new System.Drawing.Point(400, 47);
|
||||
this.CB_Nature.Location = new System.Drawing.Point(83, 41);
|
||||
this.CB_Nature.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.CB_Nature.Name = "CB_Nature";
|
||||
this.CB_Nature.Size = new System.Drawing.Size(122, 21);
|
||||
this.CB_Nature.TabIndex = 68;
|
||||
//
|
||||
// CB_Species
|
||||
//
|
||||
this.CB_Species.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.CB_Species.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.CB_Species.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
|
||||
this.CB_Species.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
|
||||
this.CB_Species.FormattingEnabled = true;
|
||||
this.CB_Species.Location = new System.Drawing.Point(400, 26);
|
||||
this.CB_Species.Location = new System.Drawing.Point(83, 20);
|
||||
this.CB_Species.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.CB_Species.Name = "CB_Species";
|
||||
this.CB_Species.Size = new System.Drawing.Size(122, 21);
|
||||
this.CB_Species.TabIndex = 67;
|
||||
//
|
||||
// CB_Move4
|
||||
//
|
||||
this.CB_Move4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.CB_Move4.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.CB_Move4.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
|
||||
this.CB_Move4.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
|
||||
this.CB_Move4.FormattingEnabled = true;
|
||||
this.CB_Move4.Location = new System.Drawing.Point(400, 277);
|
||||
this.CB_Move4.Location = new System.Drawing.Point(83, 251);
|
||||
this.CB_Move4.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.CB_Move4.Name = "CB_Move4";
|
||||
this.CB_Move4.Size = new System.Drawing.Size(122, 21);
|
||||
this.CB_Move4.TabIndex = 74;
|
||||
//
|
||||
// CB_Move3
|
||||
//
|
||||
this.CB_Move3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.CB_Move3.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.CB_Move3.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
|
||||
this.CB_Move3.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
|
||||
this.CB_Move3.FormattingEnabled = true;
|
||||
this.CB_Move3.Location = new System.Drawing.Point(400, 256);
|
||||
this.CB_Move3.Location = new System.Drawing.Point(83, 230);
|
||||
this.CB_Move3.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.CB_Move3.Name = "CB_Move3";
|
||||
this.CB_Move3.Size = new System.Drawing.Size(122, 21);
|
||||
this.CB_Move3.TabIndex = 73;
|
||||
//
|
||||
// CB_Move2
|
||||
//
|
||||
this.CB_Move2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.CB_Move2.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.CB_Move2.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
|
||||
this.CB_Move2.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
|
||||
this.CB_Move2.FormattingEnabled = true;
|
||||
this.CB_Move2.Location = new System.Drawing.Point(400, 235);
|
||||
this.CB_Move2.Location = new System.Drawing.Point(83, 209);
|
||||
this.CB_Move2.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.CB_Move2.Name = "CB_Move2";
|
||||
this.CB_Move2.Size = new System.Drawing.Size(122, 21);
|
||||
this.CB_Move2.TabIndex = 72;
|
||||
//
|
||||
// CB_Move1
|
||||
//
|
||||
this.CB_Move1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.CB_Move1.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.CB_Move1.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
|
||||
this.CB_Move1.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
|
||||
this.CB_Move1.FormattingEnabled = true;
|
||||
this.CB_Move1.Location = new System.Drawing.Point(400, 214);
|
||||
this.CB_Move1.Location = new System.Drawing.Point(83, 188);
|
||||
this.CB_Move1.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.CB_Move1.Name = "CB_Move1";
|
||||
this.CB_Move1.Size = new System.Drawing.Size(122, 21);
|
||||
this.CB_Move1.TabIndex = 71;
|
||||
//
|
||||
// TB_Level
|
||||
//
|
||||
this.TB_Level.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.TB_Level.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.TB_Level.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.TB_Level.Location = new System.Drawing.Point(400, 117);
|
||||
this.TB_Level.Location = new System.Drawing.Point(0, 0);
|
||||
this.TB_Level.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.TB_Level.Mask = "000";
|
||||
this.TB_Level.Name = "TB_Level";
|
||||
this.TB_Level.Size = new System.Drawing.Size(22, 20);
|
||||
@@ -1252,57 +1274,67 @@ private void InitializeComponent()
|
||||
//
|
||||
// Label_CurLevel
|
||||
//
|
||||
this.Label_CurLevel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.Label_CurLevel.Location = new System.Drawing.Point(319, 116);
|
||||
this.Label_CurLevel.Anchor = System.Windows.Forms.AnchorStyles.Right;
|
||||
this.Label_CurLevel.AutoSize = true;
|
||||
this.Label_CurLevel.Location = new System.Drawing.Point(44, 108);
|
||||
this.Label_CurLevel.Margin = new System.Windows.Forms.Padding(3);
|
||||
this.Label_CurLevel.Name = "Label_CurLevel";
|
||||
this.Label_CurLevel.Size = new System.Drawing.Size(75, 17);
|
||||
this.Label_CurLevel.Size = new System.Drawing.Size(36, 13);
|
||||
this.Label_CurLevel.TabIndex = 88;
|
||||
this.Label_CurLevel.Text = "Level:";
|
||||
this.Label_CurLevel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// Label_HeldItem
|
||||
//
|
||||
this.Label_HeldItem.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.Label_HeldItem.Location = new System.Drawing.Point(317, 71);
|
||||
this.Label_HeldItem.Anchor = System.Windows.Forms.AnchorStyles.Right;
|
||||
this.Label_HeldItem.AutoSize = true;
|
||||
this.Label_HeldItem.Location = new System.Drawing.Point(25, 66);
|
||||
this.Label_HeldItem.Margin = new System.Windows.Forms.Padding(3);
|
||||
this.Label_HeldItem.Name = "Label_HeldItem";
|
||||
this.Label_HeldItem.Size = new System.Drawing.Size(77, 13);
|
||||
this.Label_HeldItem.Size = new System.Drawing.Size(55, 13);
|
||||
this.Label_HeldItem.TabIndex = 93;
|
||||
this.Label_HeldItem.Text = "Held Item:";
|
||||
this.Label_HeldItem.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// Label_Ability
|
||||
//
|
||||
this.Label_Ability.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.Label_Ability.Location = new System.Drawing.Point(317, 92);
|
||||
this.Label_Ability.Anchor = System.Windows.Forms.AnchorStyles.Right;
|
||||
this.Label_Ability.AutoSize = true;
|
||||
this.Label_Ability.Location = new System.Drawing.Point(43, 87);
|
||||
this.Label_Ability.Margin = new System.Windows.Forms.Padding(3);
|
||||
this.Label_Ability.Name = "Label_Ability";
|
||||
this.Label_Ability.Size = new System.Drawing.Size(77, 13);
|
||||
this.Label_Ability.Size = new System.Drawing.Size(37, 13);
|
||||
this.Label_Ability.TabIndex = 92;
|
||||
this.Label_Ability.Text = "Ability:";
|
||||
this.Label_Ability.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// Label_Nature
|
||||
//
|
||||
this.Label_Nature.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.Label_Nature.Location = new System.Drawing.Point(317, 50);
|
||||
this.Label_Nature.Anchor = System.Windows.Forms.AnchorStyles.Right;
|
||||
this.Label_Nature.AutoSize = true;
|
||||
this.Label_Nature.Location = new System.Drawing.Point(38, 45);
|
||||
this.Label_Nature.Margin = new System.Windows.Forms.Padding(3);
|
||||
this.Label_Nature.Name = "Label_Nature";
|
||||
this.Label_Nature.Size = new System.Drawing.Size(77, 13);
|
||||
this.Label_Nature.Size = new System.Drawing.Size(42, 13);
|
||||
this.Label_Nature.TabIndex = 91;
|
||||
this.Label_Nature.Text = "Nature:";
|
||||
this.Label_Nature.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// Label_Species
|
||||
//
|
||||
this.Label_Species.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.Label_Species.Location = new System.Drawing.Point(317, 29);
|
||||
this.Label_Species.Anchor = System.Windows.Forms.AnchorStyles.Right;
|
||||
this.Label_Species.AutoSize = true;
|
||||
this.Label_Species.Location = new System.Drawing.Point(32, 24);
|
||||
this.Label_Species.Margin = new System.Windows.Forms.Padding(3);
|
||||
this.Label_Species.Name = "Label_Species";
|
||||
this.Label_Species.Size = new System.Drawing.Size(77, 13);
|
||||
this.Label_Species.Size = new System.Drawing.Size(48, 13);
|
||||
this.Label_Species.TabIndex = 90;
|
||||
this.Label_Species.Text = "Species:";
|
||||
this.Label_Species.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// CB_EVTrain
|
||||
//
|
||||
this.CB_EVTrain.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.CB_EVTrain.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.CB_EVTrain.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.CB_EVTrain.DropDownWidth = 85;
|
||||
this.CB_EVTrain.FormattingEnabled = true;
|
||||
@@ -1312,78 +1344,52 @@ private void InitializeComponent()
|
||||
"Some (127-0)",
|
||||
"Half (128-507)",
|
||||
"Full (508+)"});
|
||||
this.CB_EVTrain.Location = new System.Drawing.Point(400, 160);
|
||||
this.CB_EVTrain.Location = new System.Drawing.Point(83, 146);
|
||||
this.CB_EVTrain.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.CB_EVTrain.Name = "CB_EVTrain";
|
||||
this.CB_EVTrain.Size = new System.Drawing.Size(94, 21);
|
||||
this.CB_EVTrain.TabIndex = 94;
|
||||
//
|
||||
// CB_HPType
|
||||
//
|
||||
this.CB_HPType.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.CB_HPType.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.CB_HPType.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
|
||||
this.CB_HPType.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
|
||||
this.CB_HPType.DropDownWidth = 80;
|
||||
this.CB_HPType.FormattingEnabled = true;
|
||||
this.CB_HPType.Location = new System.Drawing.Point(400, 188);
|
||||
this.CB_HPType.Location = new System.Drawing.Point(83, 167);
|
||||
this.CB_HPType.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.CB_HPType.Name = "CB_HPType";
|
||||
this.CB_HPType.Size = new System.Drawing.Size(122, 21);
|
||||
this.CB_HPType.TabIndex = 96;
|
||||
//
|
||||
// Label_HiddenPowerPrefix
|
||||
//
|
||||
this.Label_HiddenPowerPrefix.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.Label_HiddenPowerPrefix.Location = new System.Drawing.Point(314, 190);
|
||||
this.Label_HiddenPowerPrefix.Anchor = System.Windows.Forms.AnchorStyles.Right;
|
||||
this.Label_HiddenPowerPrefix.AutoSize = true;
|
||||
this.Label_HiddenPowerPrefix.Location = new System.Drawing.Point(3, 171);
|
||||
this.Label_HiddenPowerPrefix.Margin = new System.Windows.Forms.Padding(3);
|
||||
this.Label_HiddenPowerPrefix.Name = "Label_HiddenPowerPrefix";
|
||||
this.Label_HiddenPowerPrefix.Size = new System.Drawing.Size(80, 14);
|
||||
this.Label_HiddenPowerPrefix.Size = new System.Drawing.Size(77, 13);
|
||||
this.Label_HiddenPowerPrefix.TabIndex = 95;
|
||||
this.Label_HiddenPowerPrefix.Text = "Hidden Power:";
|
||||
this.Label_HiddenPowerPrefix.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// CB_GameOrigin
|
||||
//
|
||||
this.CB_GameOrigin.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.CB_GameOrigin.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.CB_GameOrigin.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.CB_GameOrigin.FormattingEnabled = true;
|
||||
this.CB_GameOrigin.Location = new System.Drawing.Point(400, 301);
|
||||
this.CB_GameOrigin.Location = new System.Drawing.Point(83, 272);
|
||||
this.CB_GameOrigin.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.CB_GameOrigin.Name = "CB_GameOrigin";
|
||||
this.CB_GameOrigin.Size = new System.Drawing.Size(122, 21);
|
||||
this.CB_GameOrigin.TabIndex = 97;
|
||||
this.CB_GameOrigin.SelectedIndexChanged += new System.EventHandler(this.changeGame);
|
||||
//
|
||||
// CHK_IsEgg
|
||||
//
|
||||
this.CHK_IsEgg.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.CHK_IsEgg.AutoSize = true;
|
||||
this.CHK_IsEgg.Checked = true;
|
||||
this.CHK_IsEgg.CheckState = System.Windows.Forms.CheckState.Indeterminate;
|
||||
this.CHK_IsEgg.Location = new System.Drawing.Point(400, 7);
|
||||
this.CHK_IsEgg.Name = "CHK_IsEgg";
|
||||
this.CHK_IsEgg.Size = new System.Drawing.Size(45, 17);
|
||||
this.CHK_IsEgg.TabIndex = 98;
|
||||
this.CHK_IsEgg.Text = "Egg";
|
||||
this.CHK_IsEgg.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
this.CHK_IsEgg.ThreeState = true;
|
||||
this.CHK_IsEgg.UseVisualStyleBackColor = true;
|
||||
this.CHK_IsEgg.CheckedChanged += new System.EventHandler(this.toggleESV);
|
||||
//
|
||||
// CHK_Shiny
|
||||
//
|
||||
this.CHK_Shiny.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.CHK_Shiny.AutoSize = true;
|
||||
this.CHK_Shiny.Checked = true;
|
||||
this.CHK_Shiny.CheckState = System.Windows.Forms.CheckState.Indeterminate;
|
||||
this.CHK_Shiny.Location = new System.Drawing.Point(342, 7);
|
||||
this.CHK_Shiny.Name = "CHK_Shiny";
|
||||
this.CHK_Shiny.Size = new System.Drawing.Size(52, 17);
|
||||
this.CHK_Shiny.TabIndex = 99;
|
||||
this.CHK_Shiny.Text = "Shiny";
|
||||
this.CHK_Shiny.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
this.CHK_Shiny.ThreeState = true;
|
||||
this.CHK_Shiny.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// CB_IV
|
||||
//
|
||||
this.CB_IV.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.CB_IV.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.CB_IV.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.CB_IV.DropDownWidth = 85;
|
||||
this.CB_IV.FormattingEnabled = true;
|
||||
@@ -1395,7 +1401,8 @@ private void InitializeComponent()
|
||||
"151-179",
|
||||
"180+",
|
||||
"== 186"});
|
||||
this.CB_IV.Location = new System.Drawing.Point(400, 138);
|
||||
this.CB_IV.Location = new System.Drawing.Point(83, 125);
|
||||
this.CB_IV.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.CB_IV.Name = "CB_IV";
|
||||
this.CB_IV.Size = new System.Drawing.Size(94, 21);
|
||||
this.CB_IV.TabIndex = 100;
|
||||
@@ -1403,9 +1410,9 @@ private void InitializeComponent()
|
||||
// B_Search
|
||||
//
|
||||
this.B_Search.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.B_Search.Location = new System.Drawing.Point(317, 347);
|
||||
this.B_Search.Location = new System.Drawing.Point(317, 350);
|
||||
this.B_Search.Name = "B_Search";
|
||||
this.B_Search.Size = new System.Drawing.Size(206, 32);
|
||||
this.B_Search.Size = new System.Drawing.Size(206, 30);
|
||||
this.B_Search.TabIndex = 102;
|
||||
this.B_Search.Text = "Search!";
|
||||
this.B_Search.UseVisualStyleBackColor = true;
|
||||
@@ -1413,7 +1420,7 @@ private void InitializeComponent()
|
||||
//
|
||||
// CB_Level
|
||||
//
|
||||
this.CB_Level.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.CB_Level.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.CB_Level.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.CB_Level.DropDownWidth = 85;
|
||||
this.CB_Level.FormattingEnabled = true;
|
||||
@@ -1422,7 +1429,8 @@ private void InitializeComponent()
|
||||
">=",
|
||||
"==",
|
||||
"<="});
|
||||
this.CB_Level.Location = new System.Drawing.Point(428, 116);
|
||||
this.CB_Level.Location = new System.Drawing.Point(22, 0);
|
||||
this.CB_Level.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.CB_Level.Name = "CB_Level";
|
||||
this.CB_Level.Size = new System.Drawing.Size(66, 21);
|
||||
this.CB_Level.TabIndex = 103;
|
||||
@@ -1430,70 +1438,84 @@ private void InitializeComponent()
|
||||
//
|
||||
// L_Version
|
||||
//
|
||||
this.L_Version.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.L_Version.Location = new System.Drawing.Point(318, 303);
|
||||
this.L_Version.Anchor = System.Windows.Forms.AnchorStyles.Right;
|
||||
this.L_Version.AutoSize = true;
|
||||
this.L_Version.Location = new System.Drawing.Point(17, 276);
|
||||
this.L_Version.Margin = new System.Windows.Forms.Padding(3);
|
||||
this.L_Version.Name = "L_Version";
|
||||
this.L_Version.Size = new System.Drawing.Size(80, 14);
|
||||
this.L_Version.Size = new System.Drawing.Size(63, 13);
|
||||
this.L_Version.TabIndex = 104;
|
||||
this.L_Version.Text = "OT Version:";
|
||||
this.L_Version.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// L_Move1
|
||||
//
|
||||
this.L_Move1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.L_Move1.Location = new System.Drawing.Point(314, 216);
|
||||
this.L_Move1.Anchor = System.Windows.Forms.AnchorStyles.Right;
|
||||
this.L_Move1.AutoSize = true;
|
||||
this.L_Move1.Location = new System.Drawing.Point(34, 192);
|
||||
this.L_Move1.Margin = new System.Windows.Forms.Padding(3);
|
||||
this.L_Move1.Name = "L_Move1";
|
||||
this.L_Move1.Size = new System.Drawing.Size(80, 14);
|
||||
this.L_Move1.Size = new System.Drawing.Size(46, 13);
|
||||
this.L_Move1.TabIndex = 105;
|
||||
this.L_Move1.Text = "Move 1:";
|
||||
this.L_Move1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// L_Move2
|
||||
//
|
||||
this.L_Move2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.L_Move2.Location = new System.Drawing.Point(314, 237);
|
||||
this.L_Move2.Anchor = System.Windows.Forms.AnchorStyles.Right;
|
||||
this.L_Move2.AutoSize = true;
|
||||
this.L_Move2.Location = new System.Drawing.Point(34, 213);
|
||||
this.L_Move2.Margin = new System.Windows.Forms.Padding(3);
|
||||
this.L_Move2.Name = "L_Move2";
|
||||
this.L_Move2.Size = new System.Drawing.Size(80, 14);
|
||||
this.L_Move2.Size = new System.Drawing.Size(46, 13);
|
||||
this.L_Move2.TabIndex = 106;
|
||||
this.L_Move2.Text = "Move 2:";
|
||||
this.L_Move2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// L_Move3
|
||||
//
|
||||
this.L_Move3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.L_Move3.Location = new System.Drawing.Point(314, 258);
|
||||
this.L_Move3.Anchor = System.Windows.Forms.AnchorStyles.Right;
|
||||
this.L_Move3.AutoSize = true;
|
||||
this.L_Move3.Location = new System.Drawing.Point(34, 234);
|
||||
this.L_Move3.Margin = new System.Windows.Forms.Padding(3);
|
||||
this.L_Move3.Name = "L_Move3";
|
||||
this.L_Move3.Size = new System.Drawing.Size(80, 14);
|
||||
this.L_Move3.Size = new System.Drawing.Size(46, 13);
|
||||
this.L_Move3.TabIndex = 107;
|
||||
this.L_Move3.Text = "Move 3:";
|
||||
this.L_Move3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// L_Move4
|
||||
//
|
||||
this.L_Move4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.L_Move4.Location = new System.Drawing.Point(314, 279);
|
||||
this.L_Move4.Anchor = System.Windows.Forms.AnchorStyles.Right;
|
||||
this.L_Move4.AutoSize = true;
|
||||
this.L_Move4.Location = new System.Drawing.Point(34, 255);
|
||||
this.L_Move4.Margin = new System.Windows.Forms.Padding(3);
|
||||
this.L_Move4.Name = "L_Move4";
|
||||
this.L_Move4.Size = new System.Drawing.Size(80, 14);
|
||||
this.L_Move4.Size = new System.Drawing.Size(46, 13);
|
||||
this.L_Move4.TabIndex = 108;
|
||||
this.L_Move4.Text = "Move 4:";
|
||||
this.L_Move4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// L_Potential
|
||||
//
|
||||
this.L_Potential.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.L_Potential.Location = new System.Drawing.Point(319, 139);
|
||||
this.L_Potential.Anchor = System.Windows.Forms.AnchorStyles.Right;
|
||||
this.L_Potential.AutoSize = true;
|
||||
this.L_Potential.Location = new System.Drawing.Point(16, 129);
|
||||
this.L_Potential.Margin = new System.Windows.Forms.Padding(3);
|
||||
this.L_Potential.Name = "L_Potential";
|
||||
this.L_Potential.Size = new System.Drawing.Size(75, 17);
|
||||
this.L_Potential.Size = new System.Drawing.Size(64, 13);
|
||||
this.L_Potential.TabIndex = 109;
|
||||
this.L_Potential.Text = "IV Potential:";
|
||||
this.L_Potential.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// L_EVTraining
|
||||
//
|
||||
this.L_EVTraining.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.L_EVTraining.Location = new System.Drawing.Point(319, 161);
|
||||
this.L_EVTraining.Anchor = System.Windows.Forms.AnchorStyles.Right;
|
||||
this.L_EVTraining.AutoSize = true;
|
||||
this.L_EVTraining.Location = new System.Drawing.Point(15, 150);
|
||||
this.L_EVTraining.Margin = new System.Windows.Forms.Padding(3);
|
||||
this.L_EVTraining.Name = "L_EVTraining";
|
||||
this.L_EVTraining.Size = new System.Drawing.Size(75, 17);
|
||||
this.L_EVTraining.Size = new System.Drawing.Size(65, 13);
|
||||
this.L_EVTraining.TabIndex = 110;
|
||||
this.L_EVTraining.Text = "EV Training:";
|
||||
this.L_EVTraining.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
@@ -1508,29 +1530,6 @@ private void InitializeComponent()
|
||||
this.B_Reset.UseVisualStyleBackColor = true;
|
||||
this.B_Reset.Click += new System.EventHandler(this.resetFilters);
|
||||
//
|
||||
// MT_ESV
|
||||
//
|
||||
this.MT_ESV.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.MT_ESV.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.MT_ESV.Location = new System.Drawing.Point(491, 6);
|
||||
this.MT_ESV.Mask = "0000";
|
||||
this.MT_ESV.Name = "MT_ESV";
|
||||
this.MT_ESV.Size = new System.Drawing.Size(31, 20);
|
||||
this.MT_ESV.TabIndex = 112;
|
||||
this.MT_ESV.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
this.MT_ESV.Visible = false;
|
||||
//
|
||||
// L_ESV
|
||||
//
|
||||
this.L_ESV.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.L_ESV.Location = new System.Drawing.Point(445, 7);
|
||||
this.L_ESV.Name = "L_ESV";
|
||||
this.L_ESV.Size = new System.Drawing.Size(43, 17);
|
||||
this.L_ESV.TabIndex = 113;
|
||||
this.L_ESV.Text = "ESV:";
|
||||
this.L_ESV.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
this.L_ESV.Visible = false;
|
||||
//
|
||||
// L_Count
|
||||
//
|
||||
this.L_Count.Location = new System.Drawing.Point(99, 11);
|
||||
@@ -1542,17 +1541,19 @@ private void InitializeComponent()
|
||||
//
|
||||
// L_Generation
|
||||
//
|
||||
this.L_Generation.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.L_Generation.Location = new System.Drawing.Point(318, 325);
|
||||
this.L_Generation.Anchor = System.Windows.Forms.AnchorStyles.Right;
|
||||
this.L_Generation.AutoSize = true;
|
||||
this.L_Generation.Location = new System.Drawing.Point(18, 297);
|
||||
this.L_Generation.Margin = new System.Windows.Forms.Padding(3);
|
||||
this.L_Generation.Name = "L_Generation";
|
||||
this.L_Generation.Size = new System.Drawing.Size(80, 14);
|
||||
this.L_Generation.Size = new System.Drawing.Size(62, 13);
|
||||
this.L_Generation.TabIndex = 116;
|
||||
this.L_Generation.Text = "Generation:";
|
||||
this.L_Generation.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// CB_Generation
|
||||
//
|
||||
this.CB_Generation.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.CB_Generation.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.CB_Generation.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.CB_Generation.FormattingEnabled = true;
|
||||
this.CB_Generation.Items.AddRange(new object[] {
|
||||
@@ -1561,7 +1562,8 @@ private void InitializeComponent()
|
||||
"Gen 5 (BW/B2W2)",
|
||||
"Gen 4 (DPPt/HGSS)",
|
||||
"Gen 3 (RSE/FRLG/CXD)"});
|
||||
this.CB_Generation.Location = new System.Drawing.Point(400, 323);
|
||||
this.CB_Generation.Location = new System.Drawing.Point(83, 293);
|
||||
this.CB_Generation.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.CB_Generation.Name = "CB_Generation";
|
||||
this.CB_Generation.Size = new System.Drawing.Size(122, 21);
|
||||
this.CB_Generation.TabIndex = 115;
|
||||
@@ -1577,50 +1579,197 @@ private void InitializeComponent()
|
||||
this.L_Viewed.Text = "Last Viewed: {0}";
|
||||
this.L_Viewed.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// FLP_Egg
|
||||
//
|
||||
this.FLP_Egg.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.FLP_Egg.AutoSize = true;
|
||||
this.FLP_Egg.Controls.Add(this.CHK_IsEgg);
|
||||
this.FLP_Egg.Controls.Add(this.L_ESV);
|
||||
this.FLP_Egg.Controls.Add(this.MT_ESV);
|
||||
this.FLP_Egg.Location = new System.Drawing.Point(83, 0);
|
||||
this.FLP_Egg.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.FLP_Egg.Name = "FLP_Egg";
|
||||
this.FLP_Egg.Size = new System.Drawing.Size(119, 20);
|
||||
this.FLP_Egg.TabIndex = 120;
|
||||
//
|
||||
// CHK_IsEgg
|
||||
//
|
||||
this.CHK_IsEgg.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.CHK_IsEgg.AutoSize = true;
|
||||
this.CHK_IsEgg.Checked = true;
|
||||
this.CHK_IsEgg.CheckState = System.Windows.Forms.CheckState.Indeterminate;
|
||||
this.CHK_IsEgg.Location = new System.Drawing.Point(0, 1);
|
||||
this.CHK_IsEgg.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.CHK_IsEgg.Name = "CHK_IsEgg";
|
||||
this.CHK_IsEgg.Size = new System.Drawing.Size(45, 17);
|
||||
this.CHK_IsEgg.TabIndex = 98;
|
||||
this.CHK_IsEgg.Text = "Egg";
|
||||
this.CHK_IsEgg.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
this.CHK_IsEgg.ThreeState = true;
|
||||
this.CHK_IsEgg.UseVisualStyleBackColor = true;
|
||||
this.CHK_IsEgg.CheckedChanged += new System.EventHandler(this.toggleESV);
|
||||
//
|
||||
// L_ESV
|
||||
//
|
||||
this.L_ESV.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.L_ESV.Location = new System.Drawing.Point(45, 1);
|
||||
this.L_ESV.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.L_ESV.Name = "L_ESV";
|
||||
this.L_ESV.Size = new System.Drawing.Size(43, 17);
|
||||
this.L_ESV.TabIndex = 113;
|
||||
this.L_ESV.Text = "ESV:";
|
||||
this.L_ESV.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
this.L_ESV.Visible = false;
|
||||
//
|
||||
// MT_ESV
|
||||
//
|
||||
this.MT_ESV.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.MT_ESV.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.MT_ESV.Location = new System.Drawing.Point(88, 0);
|
||||
this.MT_ESV.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.MT_ESV.Mask = "0000";
|
||||
this.MT_ESV.Name = "MT_ESV";
|
||||
this.MT_ESV.Size = new System.Drawing.Size(31, 20);
|
||||
this.MT_ESV.TabIndex = 112;
|
||||
this.MT_ESV.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
this.MT_ESV.Visible = false;
|
||||
//
|
||||
// CHK_Shiny
|
||||
//
|
||||
this.CHK_Shiny.Anchor = System.Windows.Forms.AnchorStyles.Right;
|
||||
this.CHK_Shiny.AutoSize = true;
|
||||
this.CHK_Shiny.Checked = true;
|
||||
this.CHK_Shiny.CheckState = System.Windows.Forms.CheckState.Indeterminate;
|
||||
this.CHK_Shiny.Location = new System.Drawing.Point(31, 1);
|
||||
this.CHK_Shiny.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.CHK_Shiny.Name = "CHK_Shiny";
|
||||
this.CHK_Shiny.Size = new System.Drawing.Size(52, 17);
|
||||
this.CHK_Shiny.TabIndex = 99;
|
||||
this.CHK_Shiny.Text = "Shiny";
|
||||
this.CHK_Shiny.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
this.CHK_Shiny.ThreeState = true;
|
||||
this.CHK_Shiny.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// TLP_Filters
|
||||
//
|
||||
this.TLP_Filters.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.TLP_Filters.AutoScroll = true;
|
||||
this.TLP_Filters.AutoScrollMargin = new System.Drawing.Size(3, 3);
|
||||
this.TLP_Filters.AutoSize = true;
|
||||
this.TLP_Filters.ColumnCount = 2;
|
||||
this.TLP_Filters.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.TLP_Filters.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.TLP_Filters.Controls.Add(this.L_Format, 0, 15);
|
||||
this.TLP_Filters.Controls.Add(this.FLP_Egg, 1, 0);
|
||||
this.TLP_Filters.Controls.Add(this.CHK_Shiny, 0, 0);
|
||||
this.TLP_Filters.Controls.Add(this.Label_Species, 0, 1);
|
||||
this.TLP_Filters.Controls.Add(this.CB_Species, 1, 1);
|
||||
this.TLP_Filters.Controls.Add(this.Label_Nature, 0, 2);
|
||||
this.TLP_Filters.Controls.Add(this.CB_Nature, 1, 2);
|
||||
this.TLP_Filters.Controls.Add(this.Label_HeldItem, 0, 3);
|
||||
this.TLP_Filters.Controls.Add(this.CB_HeldItem, 1, 3);
|
||||
this.TLP_Filters.Controls.Add(this.Label_Ability, 0, 4);
|
||||
this.TLP_Filters.Controls.Add(this.CB_Ability, 1, 4);
|
||||
this.TLP_Filters.Controls.Add(this.FLP_Level, 1, 5);
|
||||
this.TLP_Filters.Controls.Add(this.Label_CurLevel, 0, 5);
|
||||
this.TLP_Filters.Controls.Add(this.L_Potential, 0, 6);
|
||||
this.TLP_Filters.Controls.Add(this.CB_IV, 1, 6);
|
||||
this.TLP_Filters.Controls.Add(this.L_EVTraining, 0, 7);
|
||||
this.TLP_Filters.Controls.Add(this.CB_EVTrain, 1, 7);
|
||||
this.TLP_Filters.Controls.Add(this.Label_HiddenPowerPrefix, 0, 8);
|
||||
this.TLP_Filters.Controls.Add(this.CB_HPType, 1, 8);
|
||||
this.TLP_Filters.Controls.Add(this.L_Move1, 0, 9);
|
||||
this.TLP_Filters.Controls.Add(this.CB_Move1, 1, 9);
|
||||
this.TLP_Filters.Controls.Add(this.L_Move2, 0, 10);
|
||||
this.TLP_Filters.Controls.Add(this.CB_Move2, 1, 10);
|
||||
this.TLP_Filters.Controls.Add(this.L_Move3, 0, 11);
|
||||
this.TLP_Filters.Controls.Add(this.CB_Move3, 1, 11);
|
||||
this.TLP_Filters.Controls.Add(this.L_Move4, 0, 12);
|
||||
this.TLP_Filters.Controls.Add(this.CB_Move4, 1, 12);
|
||||
this.TLP_Filters.Controls.Add(this.L_Version, 0, 13);
|
||||
this.TLP_Filters.Controls.Add(this.CB_GameOrigin, 1, 13);
|
||||
this.TLP_Filters.Controls.Add(this.L_Generation, 0, 14);
|
||||
this.TLP_Filters.Controls.Add(this.CB_Generation, 1, 14);
|
||||
this.TLP_Filters.Controls.Add(this.CB_Format, 1, 15);
|
||||
this.TLP_Filters.Location = new System.Drawing.Point(304, 11);
|
||||
this.TLP_Filters.Name = "TLP_Filters";
|
||||
this.TLP_Filters.RowCount = 17;
|
||||
this.TLP_Filters.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.TLP_Filters.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.TLP_Filters.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.TLP_Filters.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.TLP_Filters.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.TLP_Filters.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.TLP_Filters.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.TLP_Filters.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.TLP_Filters.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.TLP_Filters.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.TLP_Filters.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.TLP_Filters.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.TLP_Filters.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.TLP_Filters.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.TLP_Filters.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.TLP_Filters.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.TLP_Filters.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.TLP_Filters.Size = new System.Drawing.Size(228, 354);
|
||||
this.TLP_Filters.TabIndex = 118;
|
||||
//
|
||||
// FLP_Level
|
||||
//
|
||||
this.FLP_Level.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.FLP_Level.AutoSize = true;
|
||||
this.FLP_Level.Controls.Add(this.TB_Level);
|
||||
this.FLP_Level.Controls.Add(this.CB_Level);
|
||||
this.FLP_Level.Location = new System.Drawing.Point(83, 104);
|
||||
this.FLP_Level.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.FLP_Level.Name = "FLP_Level";
|
||||
this.FLP_Level.Size = new System.Drawing.Size(88, 21);
|
||||
this.FLP_Level.TabIndex = 119;
|
||||
//
|
||||
// CB_Format
|
||||
//
|
||||
this.CB_Format.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.CB_Format.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.CB_Format.FormattingEnabled = true;
|
||||
this.CB_Format.Items.AddRange(new object[] {
|
||||
"Any",
|
||||
">=pk6",
|
||||
">=pk5",
|
||||
">=pk4",
|
||||
">=pk3"});
|
||||
this.CB_Format.Location = new System.Drawing.Point(83, 314);
|
||||
this.CB_Format.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.CB_Format.Name = "CB_Format";
|
||||
this.CB_Format.Size = new System.Drawing.Size(122, 21);
|
||||
this.CB_Format.TabIndex = 121;
|
||||
//
|
||||
// L_Format
|
||||
//
|
||||
this.L_Format.Anchor = System.Windows.Forms.AnchorStyles.Right;
|
||||
this.L_Format.AutoSize = true;
|
||||
this.L_Format.Location = new System.Drawing.Point(38, 318);
|
||||
this.L_Format.Margin = new System.Windows.Forms.Padding(3);
|
||||
this.L_Format.Name = "L_Format";
|
||||
this.L_Format.Size = new System.Drawing.Size(42, 13);
|
||||
this.L_Format.TabIndex = 122;
|
||||
this.L_Format.Text = "Format:";
|
||||
this.L_Format.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// SAV_Database
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(544, 396);
|
||||
this.Controls.Add(this.L_Viewed);
|
||||
this.Controls.Add(this.L_Generation);
|
||||
this.Controls.Add(this.CB_Generation);
|
||||
this.Controls.Add(this.L_Count);
|
||||
this.Controls.Add(this.L_ESV);
|
||||
this.Controls.Add(this.MT_ESV);
|
||||
this.Controls.Add(this.B_Reset);
|
||||
this.Controls.Add(this.L_EVTraining);
|
||||
this.Controls.Add(this.L_Potential);
|
||||
this.Controls.Add(this.L_Move4);
|
||||
this.Controls.Add(this.L_Move3);
|
||||
this.Controls.Add(this.L_Move2);
|
||||
this.Controls.Add(this.L_Move1);
|
||||
this.Controls.Add(this.L_Version);
|
||||
this.Controls.Add(this.CB_Level);
|
||||
this.Controls.Add(this.B_Search);
|
||||
this.Controls.Add(this.CB_IV);
|
||||
this.Controls.Add(this.CHK_IsEgg);
|
||||
this.Controls.Add(this.CHK_Shiny);
|
||||
this.Controls.Add(this.CB_GameOrigin);
|
||||
this.Controls.Add(this.CB_HPType);
|
||||
this.Controls.Add(this.Label_HiddenPowerPrefix);
|
||||
this.Controls.Add(this.CB_EVTrain);
|
||||
this.Controls.Add(this.Label_HeldItem);
|
||||
this.Controls.Add(this.Label_Ability);
|
||||
this.Controls.Add(this.Label_Nature);
|
||||
this.Controls.Add(this.Label_Species);
|
||||
this.Controls.Add(this.TB_Level);
|
||||
this.Controls.Add(this.Label_CurLevel);
|
||||
this.Controls.Add(this.CB_Move4);
|
||||
this.Controls.Add(this.CB_Move3);
|
||||
this.Controls.Add(this.CB_Move2);
|
||||
this.Controls.Add(this.CB_Move1);
|
||||
this.Controls.Add(this.CB_Ability);
|
||||
this.Controls.Add(this.CB_HeldItem);
|
||||
this.Controls.Add(this.CB_Nature);
|
||||
this.Controls.Add(this.CB_Species);
|
||||
this.Controls.Add(this.TLP_Filters);
|
||||
this.Controls.Add(this.L_Viewed);
|
||||
this.Controls.Add(this.L_Count);
|
||||
this.Controls.Add(this.B_Reset);
|
||||
this.Controls.Add(this.P_Results);
|
||||
this.Controls.Add(this.menuStrip1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.MaximumSize = new System.Drawing.Size(800, 435);
|
||||
@@ -1699,6 +1848,12 @@ private void InitializeComponent()
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx63)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx62)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bpkx61)).EndInit();
|
||||
this.FLP_Egg.ResumeLayout(false);
|
||||
this.FLP_Egg.PerformLayout();
|
||||
this.TLP_Filters.ResumeLayout(false);
|
||||
this.TLP_Filters.PerformLayout();
|
||||
this.FLP_Level.ResumeLayout(false);
|
||||
this.FLP_Level.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
@@ -1792,8 +1947,6 @@ private void InitializeComponent()
|
||||
private System.Windows.Forms.ComboBox CB_HPType;
|
||||
private System.Windows.Forms.Label Label_HiddenPowerPrefix;
|
||||
private System.Windows.Forms.ComboBox CB_GameOrigin;
|
||||
public System.Windows.Forms.CheckBox CHK_IsEgg;
|
||||
public System.Windows.Forms.CheckBox CHK_Shiny;
|
||||
private System.Windows.Forms.ComboBox CB_IV;
|
||||
private System.Windows.Forms.Button B_Search;
|
||||
private System.Windows.Forms.ComboBox CB_Level;
|
||||
@@ -1805,8 +1958,6 @@ private void InitializeComponent()
|
||||
private System.Windows.Forms.Label L_Potential;
|
||||
private System.Windows.Forms.Label L_EVTraining;
|
||||
private System.Windows.Forms.Button B_Reset;
|
||||
private System.Windows.Forms.MaskedTextBox MT_ESV;
|
||||
private System.Windows.Forms.Label L_ESV;
|
||||
private System.Windows.Forms.Label L_Count;
|
||||
private System.Windows.Forms.Panel PAN_Box;
|
||||
private System.Windows.Forms.PictureBox bpkx66;
|
||||
@@ -1824,5 +1975,14 @@ private void InitializeComponent()
|
||||
private System.Windows.Forms.ToolStripMenuItem Menu_SearchDatabase;
|
||||
private System.Windows.Forms.ToolStripMenuItem Menu_SearchLegal;
|
||||
private System.Windows.Forms.ToolStripMenuItem Menu_SearchIllegal;
|
||||
private System.Windows.Forms.TableLayoutPanel TLP_Filters;
|
||||
public System.Windows.Forms.CheckBox CHK_Shiny;
|
||||
private System.Windows.Forms.MaskedTextBox MT_ESV;
|
||||
private System.Windows.Forms.Label L_ESV;
|
||||
public System.Windows.Forms.CheckBox CHK_IsEgg;
|
||||
private System.Windows.Forms.FlowLayoutPanel FLP_Egg;
|
||||
private System.Windows.Forms.FlowLayoutPanel FLP_Level;
|
||||
private System.Windows.Forms.ComboBox CB_Format;
|
||||
private System.Windows.Forms.Label L_Format;
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@ public SAV_Database(Main f1)
|
||||
{
|
||||
m_parent = f1;
|
||||
InitializeComponent();
|
||||
CB_Format.SelectedIndex = MAXFORMAT - Main.SAV.Generation + 1;
|
||||
PKXBOXES = new[]
|
||||
{
|
||||
bpkx1, bpkx2, bpkx3, bpkx4, bpkx5, bpkx6,
|
||||
@@ -81,20 +82,21 @@ public SAV_Database(Main f1)
|
||||
{
|
||||
Version = 0,
|
||||
Title = "Misc",
|
||||
Description = "Individual pk6 files present in the db/sav.",
|
||||
Description = "Individual pkm files present in the db/sav.",
|
||||
});
|
||||
|
||||
// Load databases
|
||||
foreach (string file in Directory.GetFiles(DatabasePath, "*", SearchOption.AllDirectories))
|
||||
{
|
||||
if (new FileInfo(file).Extension == ".pk6")
|
||||
Database[0].Slot.Add(new PK6(File.ReadAllBytes(file), file));
|
||||
FileInfo fi = new FileInfo(file);
|
||||
if (fi.Extension.Contains(".pk") && PKX.getIsPKM(fi.Length))
|
||||
Database[0].Slot.Add(PKMConverter.getPKMfromBytes(File.ReadAllBytes(file), file));
|
||||
else
|
||||
loadDatabase(File.ReadAllBytes(file));
|
||||
}
|
||||
// Fetch from save file
|
||||
foreach (var pk6 in Main.SAV.BoxData.Where(pk => pk.Species != 0))
|
||||
Database[0].Slot.Add(pk6);
|
||||
foreach (var pkm in Main.SAV.BoxData.Where(pk => pk.Species != 0))
|
||||
Database[0].Slot.Add(pkm);
|
||||
|
||||
// Prepare Database
|
||||
prepareDBForSearch();
|
||||
@@ -103,20 +105,22 @@ public SAV_Database(Main f1)
|
||||
if (e.CloseReason == ToolStripDropDownCloseReason.ItemClicked)
|
||||
e.Cancel = true;
|
||||
};
|
||||
B_Search.PerformClick();
|
||||
CenterToParent();
|
||||
}
|
||||
private readonly Main m_parent;
|
||||
private readonly PictureBox[] PKXBOXES;
|
||||
private readonly string DatabasePath = Main.DatabasePath;
|
||||
private readonly List<DatabaseList> Database = new List<DatabaseList>();
|
||||
private List<PK6> Results;
|
||||
private List<PK6> RawDB;
|
||||
private List<PKM> Results;
|
||||
private List<PKM> RawDB;
|
||||
private int slotSelected = -1; // = null;
|
||||
private Image slotColor;
|
||||
private const int RES_MAX = 66;
|
||||
private const int RES_MIN = 6;
|
||||
private readonly string Counter;
|
||||
private readonly string Viewed;
|
||||
private const int MAXFORMAT = 6;
|
||||
|
||||
// Important Events
|
||||
private void clickView(object sender, EventArgs e)
|
||||
@@ -129,7 +133,7 @@ private void clickView(object sender, EventArgs e)
|
||||
System.Media.SystemSounds.Exclamation.Play();
|
||||
else
|
||||
{
|
||||
m_parent.populateFields(new PK6(dataArr[index].Data), false);
|
||||
m_parent.populateFields(dataArr[index], false);
|
||||
slotSelected = index + SCR_Box.Value * RES_MIN;
|
||||
slotColor = Properties.Resources.slotView;
|
||||
FillPKXBoxes(SCR_Box.Value);
|
||||
@@ -161,12 +165,12 @@ private void clickDelete(object sender, EventArgs e)
|
||||
int box = Convert.ToInt32(split[0].Substring(1)) - 1;
|
||||
int slot = Convert.ToInt32(split[1]) - 1;
|
||||
int spot = box*30 + slot;
|
||||
int offset = Main.SAV.Box + spot*PK6.SIZE_STORED;
|
||||
var pkSAV = Main.SAV.getPK6Stored(offset);
|
||||
int offset = Main.SAV.getBoxOffset(0) + spot*Main.SAV.SIZE_STORED;
|
||||
PKM pkSAV = Main.SAV.getStoredSlot(offset);
|
||||
|
||||
if (pkSAV.Data.SequenceEqual(pk.Data))
|
||||
{
|
||||
Main.SAV.setEK6Stored(Main.blankEK6, offset);
|
||||
Main.SAV.setStoredSlot(Main.SAV.BlankPKM, offset);
|
||||
m_parent.setPKXBoxes();
|
||||
}
|
||||
else
|
||||
@@ -188,10 +192,10 @@ private void clickDelete(object sender, EventArgs e)
|
||||
private void clickSet(object sender, EventArgs e)
|
||||
{
|
||||
// Don't care what slot was clicked, just add it to the database
|
||||
if (!m_parent.verifiedPKX())
|
||||
if (!m_parent.verifiedPKM())
|
||||
return;
|
||||
|
||||
PK6 pk = m_parent.preparepkx();
|
||||
PKM pk = m_parent.preparePKM();
|
||||
if (!Directory.Exists(DatabasePath))
|
||||
Directory.CreateDirectory(DatabasePath);
|
||||
|
||||
@@ -203,12 +207,12 @@ private void clickSet(object sender, EventArgs e)
|
||||
return;
|
||||
}
|
||||
|
||||
File.WriteAllBytes(path, pk.Data.Take(PK6.SIZE_STORED).ToArray());
|
||||
File.WriteAllBytes(path, pk.Data.Take(pk.SIZE_STORED).ToArray());
|
||||
pk.Identifier = path;
|
||||
|
||||
int pre = RawDB.Count;
|
||||
RawDB.Add(pk);
|
||||
RawDB = new List<PK6>(RawDB.Distinct()); // just in case
|
||||
RawDB = new List<PKM>(RawDB.Distinct()); // just in case
|
||||
int post = RawDB.Count;
|
||||
if (pre == post)
|
||||
{ Util.Alert("Pokémon already exists in database."); return; }
|
||||
@@ -317,7 +321,7 @@ private void generateDBReport(object sender, EventArgs e)
|
||||
// IO Usage
|
||||
private class DatabaseList
|
||||
{
|
||||
public readonly List<PK6> Slot = new List<PK6>();
|
||||
public readonly List<PKM> Slot = new List<PKM>();
|
||||
public int Version;
|
||||
private readonly bool Unicode;
|
||||
private readonly byte[] Unused;
|
||||
@@ -380,13 +384,13 @@ private void loadDatabase(byte[] data)
|
||||
}
|
||||
private void prepareDBForSearch()
|
||||
{
|
||||
RawDB = new List<PK6>();
|
||||
RawDB = new List<PKM>();
|
||||
|
||||
foreach (var db in Database)
|
||||
RawDB.AddRange(db.Slot);
|
||||
|
||||
RawDB = new List<PK6>(RawDB.Where(pk => pk.ChecksumValid && pk.Species != 0 && pk.Sanity == 0));
|
||||
RawDB = new List<PK6>(RawDB.Distinct());
|
||||
RawDB = new List<PKM>(RawDB.Where(pk => pk.ChecksumValid && pk.Species != 0 && pk.Sanity == 0));
|
||||
RawDB = new List<PKM>(RawDB.Distinct());
|
||||
setResults(RawDB);
|
||||
}
|
||||
private void openDB(object sender, EventArgs e)
|
||||
@@ -410,16 +414,36 @@ private void Menu_Export_Click(object sender, EventArgs e)
|
||||
if (!Directory.Exists(path)) // just in case...
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
foreach (PK6 pk6 in Results)
|
||||
File.WriteAllBytes(Path.Combine(path, Util.CleanFileName(pk6.FileName)),
|
||||
pk6.Data.Take(0xE8).ToArray());
|
||||
foreach (PKM pkm in Results)
|
||||
File.WriteAllBytes(Path.Combine(path, Util.CleanFileName(pkm.FileName)),
|
||||
pkm.Data.Take(0xE8).ToArray());
|
||||
}
|
||||
|
||||
// View Updates
|
||||
private void B_Search_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Populate Search Query Result
|
||||
IEnumerable<PK6> res = RawDB;
|
||||
IEnumerable<PKM> res = RawDB;
|
||||
|
||||
int format = MAXFORMAT + 1 - CB_Format.SelectedIndex;
|
||||
res = res.Where(pk => pk.Format <= format);
|
||||
|
||||
switch (CB_Generation.SelectedIndex)
|
||||
{
|
||||
case 0: break; // Do nothing
|
||||
case 1: // Gen 6
|
||||
res = res.Where(pk => pk.Gen6);
|
||||
break;
|
||||
case 2: // Gen 5
|
||||
res = res.Where(pk => pk.Gen5);
|
||||
break;
|
||||
case 3: // Gen 4
|
||||
res = res.Where(pk => pk.Gen4);
|
||||
break;
|
||||
case 4: // Gen 3
|
||||
res = res.Where(pk => pk.Gen3);
|
||||
break;
|
||||
}
|
||||
|
||||
// Primary Searchables
|
||||
int species = Util.getIndex(CB_Species);
|
||||
@@ -508,22 +532,6 @@ private void B_Search_Click(object sender, EventArgs e)
|
||||
res = res.Where(pk => pk.EVs.Sum() >= 508);
|
||||
break;
|
||||
}
|
||||
switch (CB_Generation.SelectedIndex)
|
||||
{
|
||||
case 0: break; // Do nothing
|
||||
case 1: // Gen 6
|
||||
res = res.Where(pk => pk.Gen6);
|
||||
break;
|
||||
case 2: // Gen 5
|
||||
res = res.Where(pk => pk.Gen5);
|
||||
break;
|
||||
case 3: // Gen 4
|
||||
res = res.Where(pk => pk.Gen4);
|
||||
break;
|
||||
case 4: // Gen 3
|
||||
res = res.Where(pk => pk.Gen3);
|
||||
break;
|
||||
}
|
||||
|
||||
// Filter for Selected Source
|
||||
if (!Menu_SearchBoxes.Checked)
|
||||
@@ -534,9 +542,9 @@ private void B_Search_Click(object sender, EventArgs e)
|
||||
slotSelected = -1; // reset the slot last viewed
|
||||
|
||||
if (Menu_SearchLegal.Checked && !Menu_SearchIllegal.Checked) // Legal Only
|
||||
res = res.Where(pk => pk.Gen6 && new LegalityAnalysis(pk).Valid);
|
||||
res = res.Where(pk => pk.Gen6 && pk is PK6 && new LegalityAnalysis(pk as PK6).Valid);
|
||||
if (!Menu_SearchLegal.Checked && Menu_SearchIllegal.Checked) // Illegal Only
|
||||
res = res.Where(pk => pk.Gen6 && !new LegalityAnalysis(pk).Valid);
|
||||
res = res.Where(pk => pk.Gen6 && pk is PK6 && !new LegalityAnalysis(pk as PK6).Valid);
|
||||
|
||||
var results = res.ToArray();
|
||||
if (results.Length == 0)
|
||||
@@ -546,7 +554,7 @@ private void B_Search_Click(object sender, EventArgs e)
|
||||
else
|
||||
Util.Alert("No results found!");
|
||||
}
|
||||
setResults(new List<PK6>(results)); // updates Count Label as well.
|
||||
setResults(new List<PKM>(results)); // updates Count Label as well.
|
||||
System.Media.SystemSounds.Asterisk.Play();
|
||||
}
|
||||
private void updateScroll(object sender, ScrollEventArgs e)
|
||||
@@ -554,9 +562,9 @@ private void updateScroll(object sender, ScrollEventArgs e)
|
||||
if (e.OldValue != e.NewValue)
|
||||
FillPKXBoxes(e.NewValue);
|
||||
}
|
||||
private void setResults(List<PK6> res)
|
||||
private void setResults(List<PKM> res)
|
||||
{
|
||||
Results = new List<PK6>(res);
|
||||
Results = new List<PKM>(res);
|
||||
|
||||
SCR_Box.Maximum = (int)Math.Ceiling((decimal)Results.Count / RES_MIN);
|
||||
if (SCR_Box.Maximum > 0) SCR_Box.Maximum -= 1;
|
||||
@@ -571,7 +579,7 @@ private void FillPKXBoxes(int start)
|
||||
if (Results == null)
|
||||
for (int i = 0; i < RES_MAX; i++)
|
||||
PKXBOXES[i].Image = null;
|
||||
PK6[] data = Results.Skip(start * RES_MIN).Take(RES_MAX).ToArray();
|
||||
PKM[] data = Results.Skip(start * RES_MIN).Take(RES_MAX).ToArray();
|
||||
for (int i = 0; i < data.Length; i++)
|
||||
PKXBOXES[i].Image = data[i].Sprite;
|
||||
for (int i = data.Length; i < RES_MAX; i++)
|
||||
|
||||
382
SAV/SAV_EventFlags.Designer.cs
generated
Normal file
@@ -0,0 +1,382 @@
|
||||
namespace PKHeX
|
||||
{
|
||||
partial class SAV_EventFlags
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SAV_EventFlags));
|
||||
this.c_CustomFlag = new System.Windows.Forms.CheckBox();
|
||||
this.B_Cancel = new System.Windows.Forms.Button();
|
||||
this.GB_FlagStatus = new System.Windows.Forms.GroupBox();
|
||||
this.nud = new System.Windows.Forms.NumericUpDown();
|
||||
this.CHK_CustomFlag = new System.Windows.Forms.Label();
|
||||
this.L_Value = new System.Windows.Forms.Label();
|
||||
this.CB_Stats = new System.Windows.Forms.ComboBox();
|
||||
this.MT_Stat = new System.Windows.Forms.MaskedTextBox();
|
||||
this.L_Stats = new System.Windows.Forms.Label();
|
||||
this.B_Save = new System.Windows.Forms.Button();
|
||||
this.GB_Researcher = new System.Windows.Forms.GroupBox();
|
||||
this.L_UnSet = new System.Windows.Forms.Label();
|
||||
this.L_IsSet = new System.Windows.Forms.Label();
|
||||
this.TB_NewSAV = new System.Windows.Forms.TextBox();
|
||||
this.TB_OldSAV = new System.Windows.Forms.TextBox();
|
||||
this.TB_UnSet = new System.Windows.Forms.TextBox();
|
||||
this.TB_IsSet = new System.Windows.Forms.TextBox();
|
||||
this.B_LoadNew = new System.Windows.Forms.Button();
|
||||
this.B_LoadOld = new System.Windows.Forms.Button();
|
||||
this.GB_Flags = new System.Windows.Forms.GroupBox();
|
||||
this.GB_Constants = new System.Windows.Forms.GroupBox();
|
||||
this.TLP_Const = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.TLP_Flags = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.GB_FlagStatus.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nud)).BeginInit();
|
||||
this.GB_Researcher.SuspendLayout();
|
||||
this.GB_Flags.SuspendLayout();
|
||||
this.GB_Constants.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// c_CustomFlag
|
||||
//
|
||||
this.c_CustomFlag.AutoSize = true;
|
||||
this.c_CustomFlag.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
this.c_CustomFlag.Location = new System.Drawing.Point(138, 15);
|
||||
this.c_CustomFlag.Name = "c_CustomFlag";
|
||||
this.c_CustomFlag.Size = new System.Drawing.Size(15, 14);
|
||||
this.c_CustomFlag.TabIndex = 1;
|
||||
this.c_CustomFlag.UseVisualStyleBackColor = true;
|
||||
this.c_CustomFlag.CheckedChanged += new System.EventHandler(this.changeCustomBool);
|
||||
//
|
||||
// B_Cancel
|
||||
//
|
||||
this.B_Cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.B_Cancel.Location = new System.Drawing.Point(289, 320);
|
||||
this.B_Cancel.Name = "B_Cancel";
|
||||
this.B_Cancel.Size = new System.Drawing.Size(75, 23);
|
||||
this.B_Cancel.TabIndex = 2;
|
||||
this.B_Cancel.Text = "Cancel";
|
||||
this.B_Cancel.UseVisualStyleBackColor = true;
|
||||
this.B_Cancel.Click += new System.EventHandler(this.B_Cancel_Click);
|
||||
//
|
||||
// GB_FlagStatus
|
||||
//
|
||||
this.GB_FlagStatus.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.GB_FlagStatus.Controls.Add(this.nud);
|
||||
this.GB_FlagStatus.Controls.Add(this.CHK_CustomFlag);
|
||||
this.GB_FlagStatus.Controls.Add(this.L_Value);
|
||||
this.GB_FlagStatus.Controls.Add(this.CB_Stats);
|
||||
this.GB_FlagStatus.Controls.Add(this.MT_Stat);
|
||||
this.GB_FlagStatus.Controls.Add(this.L_Stats);
|
||||
this.GB_FlagStatus.Controls.Add(this.c_CustomFlag);
|
||||
this.GB_FlagStatus.Location = new System.Drawing.Point(288, 228);
|
||||
this.GB_FlagStatus.Name = "GB_FlagStatus";
|
||||
this.GB_FlagStatus.Size = new System.Drawing.Size(159, 81);
|
||||
this.GB_FlagStatus.TabIndex = 3;
|
||||
this.GB_FlagStatus.TabStop = false;
|
||||
this.GB_FlagStatus.Text = "Check Status";
|
||||
//
|
||||
// nud
|
||||
//
|
||||
this.nud.Location = new System.Drawing.Point(87, 12);
|
||||
this.nud.Maximum = new decimal(new int[] {
|
||||
3072,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nud.Name = "nud";
|
||||
this.nud.Size = new System.Drawing.Size(45, 20);
|
||||
this.nud.TabIndex = 9;
|
||||
this.nud.ValueChanged += new System.EventHandler(this.changeCustomFlag);
|
||||
this.nud.KeyUp += new System.Windows.Forms.KeyEventHandler(this.changeCustomFlag);
|
||||
//
|
||||
// CHK_CustomFlag
|
||||
//
|
||||
this.CHK_CustomFlag.Location = new System.Drawing.Point(9, 12);
|
||||
this.CHK_CustomFlag.Name = "CHK_CustomFlag";
|
||||
this.CHK_CustomFlag.Size = new System.Drawing.Size(72, 20);
|
||||
this.CHK_CustomFlag.TabIndex = 2;
|
||||
this.CHK_CustomFlag.Text = "Flag:";
|
||||
this.CHK_CustomFlag.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// L_Value
|
||||
//
|
||||
this.L_Value.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.L_Value.Location = new System.Drawing.Point(6, 56);
|
||||
this.L_Value.Name = "L_Value";
|
||||
this.L_Value.Size = new System.Drawing.Size(75, 20);
|
||||
this.L_Value.TabIndex = 35;
|
||||
this.L_Value.Text = "Value:";
|
||||
this.L_Value.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// CB_Stats
|
||||
//
|
||||
this.CB_Stats.DropDownHeight = 156;
|
||||
this.CB_Stats.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.CB_Stats.DropDownWidth = 180;
|
||||
this.CB_Stats.FormattingEnabled = true;
|
||||
this.CB_Stats.IntegralHeight = false;
|
||||
this.CB_Stats.Location = new System.Drawing.Point(87, 35);
|
||||
this.CB_Stats.Name = "CB_Stats";
|
||||
this.CB_Stats.Size = new System.Drawing.Size(66, 21);
|
||||
this.CB_Stats.TabIndex = 36;
|
||||
this.CB_Stats.SelectedIndexChanged += new System.EventHandler(this.changeConstantIndex);
|
||||
//
|
||||
// MT_Stat
|
||||
//
|
||||
this.MT_Stat.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.MT_Stat.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.MT_Stat.Location = new System.Drawing.Point(87, 57);
|
||||
this.MT_Stat.Mask = "00000";
|
||||
this.MT_Stat.Name = "MT_Stat";
|
||||
this.MT_Stat.Size = new System.Drawing.Size(34, 20);
|
||||
this.MT_Stat.TabIndex = 34;
|
||||
this.MT_Stat.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
|
||||
this.MT_Stat.TextChanged += new System.EventHandler(this.changeCustomConst);
|
||||
//
|
||||
// L_Stats
|
||||
//
|
||||
this.L_Stats.Location = new System.Drawing.Point(9, 36);
|
||||
this.L_Stats.Name = "L_Stats";
|
||||
this.L_Stats.Size = new System.Drawing.Size(72, 20);
|
||||
this.L_Stats.TabIndex = 37;
|
||||
this.L_Stats.Text = "Constant:";
|
||||
this.L_Stats.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// B_Save
|
||||
//
|
||||
this.B_Save.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.B_Save.Location = new System.Drawing.Point(372, 320);
|
||||
this.B_Save.Name = "B_Save";
|
||||
this.B_Save.Size = new System.Drawing.Size(75, 23);
|
||||
this.B_Save.TabIndex = 9;
|
||||
this.B_Save.Text = "Save";
|
||||
this.B_Save.UseVisualStyleBackColor = true;
|
||||
this.B_Save.Click += new System.EventHandler(this.B_Save_Click);
|
||||
//
|
||||
// GB_Researcher
|
||||
//
|
||||
this.GB_Researcher.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.GB_Researcher.Controls.Add(this.L_UnSet);
|
||||
this.GB_Researcher.Controls.Add(this.L_IsSet);
|
||||
this.GB_Researcher.Controls.Add(this.TB_NewSAV);
|
||||
this.GB_Researcher.Controls.Add(this.TB_OldSAV);
|
||||
this.GB_Researcher.Controls.Add(this.TB_UnSet);
|
||||
this.GB_Researcher.Controls.Add(this.TB_IsSet);
|
||||
this.GB_Researcher.Controls.Add(this.B_LoadNew);
|
||||
this.GB_Researcher.Controls.Add(this.B_LoadOld);
|
||||
this.GB_Researcher.Location = new System.Drawing.Point(12, 228);
|
||||
this.GB_Researcher.Name = "GB_Researcher";
|
||||
this.GB_Researcher.Size = new System.Drawing.Size(268, 120);
|
||||
this.GB_Researcher.TabIndex = 13;
|
||||
this.GB_Researcher.TabStop = false;
|
||||
this.GB_Researcher.Text = "FlagDiff Researcher";
|
||||
//
|
||||
// L_UnSet
|
||||
//
|
||||
this.L_UnSet.Location = new System.Drawing.Point(3, 94);
|
||||
this.L_UnSet.Name = "L_UnSet";
|
||||
this.L_UnSet.Size = new System.Drawing.Size(51, 21);
|
||||
this.L_UnSet.TabIndex = 7;
|
||||
this.L_UnSet.Text = "UnSet:";
|
||||
this.L_UnSet.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// L_IsSet
|
||||
//
|
||||
this.L_IsSet.Location = new System.Drawing.Point(6, 73);
|
||||
this.L_IsSet.Name = "L_IsSet";
|
||||
this.L_IsSet.Size = new System.Drawing.Size(48, 20);
|
||||
this.L_IsSet.TabIndex = 6;
|
||||
this.L_IsSet.Text = "IsSet:";
|
||||
this.L_IsSet.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// TB_NewSAV
|
||||
//
|
||||
this.TB_NewSAV.Location = new System.Drawing.Point(93, 47);
|
||||
this.TB_NewSAV.Name = "TB_NewSAV";
|
||||
this.TB_NewSAV.ReadOnly = true;
|
||||
this.TB_NewSAV.Size = new System.Drawing.Size(169, 20);
|
||||
this.TB_NewSAV.TabIndex = 5;
|
||||
this.TB_NewSAV.TextChanged += new System.EventHandler(this.changeSAV);
|
||||
//
|
||||
// TB_OldSAV
|
||||
//
|
||||
this.TB_OldSAV.Location = new System.Drawing.Point(93, 21);
|
||||
this.TB_OldSAV.Name = "TB_OldSAV";
|
||||
this.TB_OldSAV.ReadOnly = true;
|
||||
this.TB_OldSAV.Size = new System.Drawing.Size(169, 20);
|
||||
this.TB_OldSAV.TabIndex = 4;
|
||||
this.TB_OldSAV.TextChanged += new System.EventHandler(this.changeSAV);
|
||||
//
|
||||
// TB_UnSet
|
||||
//
|
||||
this.TB_UnSet.Location = new System.Drawing.Point(56, 94);
|
||||
this.TB_UnSet.Name = "TB_UnSet";
|
||||
this.TB_UnSet.ReadOnly = true;
|
||||
this.TB_UnSet.Size = new System.Drawing.Size(206, 20);
|
||||
this.TB_UnSet.TabIndex = 3;
|
||||
//
|
||||
// TB_IsSet
|
||||
//
|
||||
this.TB_IsSet.Location = new System.Drawing.Point(56, 73);
|
||||
this.TB_IsSet.Name = "TB_IsSet";
|
||||
this.TB_IsSet.ReadOnly = true;
|
||||
this.TB_IsSet.Size = new System.Drawing.Size(206, 20);
|
||||
this.TB_IsSet.TabIndex = 2;
|
||||
//
|
||||
// B_LoadNew
|
||||
//
|
||||
this.B_LoadNew.Location = new System.Drawing.Point(12, 45);
|
||||
this.B_LoadNew.Name = "B_LoadNew";
|
||||
this.B_LoadNew.Size = new System.Drawing.Size(75, 23);
|
||||
this.B_LoadNew.TabIndex = 1;
|
||||
this.B_LoadNew.Text = "Load New";
|
||||
this.B_LoadNew.UseVisualStyleBackColor = true;
|
||||
this.B_LoadNew.Click += new System.EventHandler(this.openSAV);
|
||||
//
|
||||
// B_LoadOld
|
||||
//
|
||||
this.B_LoadOld.Location = new System.Drawing.Point(12, 19);
|
||||
this.B_LoadOld.Name = "B_LoadOld";
|
||||
this.B_LoadOld.Size = new System.Drawing.Size(75, 23);
|
||||
this.B_LoadOld.TabIndex = 0;
|
||||
this.B_LoadOld.Text = "Load Old";
|
||||
this.B_LoadOld.UseVisualStyleBackColor = true;
|
||||
this.B_LoadOld.Click += new System.EventHandler(this.openSAV);
|
||||
//
|
||||
// GB_Flags
|
||||
//
|
||||
this.GB_Flags.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.GB_Flags.Controls.Add(this.TLP_Flags);
|
||||
this.GB_Flags.Location = new System.Drawing.Point(12, 12);
|
||||
this.GB_Flags.Name = "GB_Flags";
|
||||
this.GB_Flags.Size = new System.Drawing.Size(212, 210);
|
||||
this.GB_Flags.TabIndex = 39;
|
||||
this.GB_Flags.TabStop = false;
|
||||
this.GB_Flags.Text = "Event Flags";
|
||||
//
|
||||
// GB_Constants
|
||||
//
|
||||
this.GB_Constants.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.GB_Constants.Controls.Add(this.TLP_Const);
|
||||
this.GB_Constants.Location = new System.Drawing.Point(235, 12);
|
||||
this.GB_Constants.Name = "GB_Constants";
|
||||
this.GB_Constants.Size = new System.Drawing.Size(212, 210);
|
||||
this.GB_Constants.TabIndex = 40;
|
||||
this.GB_Constants.TabStop = false;
|
||||
this.GB_Constants.Text = "Event Constants";
|
||||
//
|
||||
// TLP_Const
|
||||
//
|
||||
this.TLP_Const.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.TLP_Const.AutoScroll = true;
|
||||
this.TLP_Const.ColumnCount = 2;
|
||||
this.TLP_Const.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.TLP_Const.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.TLP_Const.Location = new System.Drawing.Point(6, 19);
|
||||
this.TLP_Const.Name = "TLP_Const";
|
||||
this.TLP_Const.RowCount = 1;
|
||||
this.TLP_Const.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.TLP_Const.Size = new System.Drawing.Size(200, 184);
|
||||
this.TLP_Const.TabIndex = 0;
|
||||
//
|
||||
// TLP_Flags
|
||||
//
|
||||
this.TLP_Flags.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.TLP_Flags.AutoScroll = true;
|
||||
this.TLP_Flags.ColumnCount = 2;
|
||||
this.TLP_Flags.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.TLP_Flags.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.TLP_Flags.Location = new System.Drawing.Point(6, 19);
|
||||
this.TLP_Flags.Name = "TLP_Flags";
|
||||
this.TLP_Flags.RowCount = 2;
|
||||
this.TLP_Flags.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.TLP_Flags.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.TLP_Flags.Size = new System.Drawing.Size(200, 184);
|
||||
this.TLP_Flags.TabIndex = 0;
|
||||
//
|
||||
// SAV_EventFlags
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(454, 351);
|
||||
this.Controls.Add(this.GB_Constants);
|
||||
this.Controls.Add(this.GB_Flags);
|
||||
this.Controls.Add(this.GB_Researcher);
|
||||
this.Controls.Add(this.GB_FlagStatus);
|
||||
this.Controls.Add(this.B_Save);
|
||||
this.Controls.Add(this.B_Cancel);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.MaximumSize = new System.Drawing.Size(470, 600);
|
||||
this.MinimizeBox = false;
|
||||
this.MinimumSize = new System.Drawing.Size(470, 390);
|
||||
this.Name = "SAV_EventFlags";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Event Flag Editor";
|
||||
this.GB_FlagStatus.ResumeLayout(false);
|
||||
this.GB_FlagStatus.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nud)).EndInit();
|
||||
this.GB_Researcher.ResumeLayout(false);
|
||||
this.GB_Researcher.PerformLayout();
|
||||
this.GB_Flags.ResumeLayout(false);
|
||||
this.GB_Constants.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.CheckBox c_CustomFlag;
|
||||
private System.Windows.Forms.Button B_Cancel;
|
||||
private System.Windows.Forms.GroupBox GB_FlagStatus;
|
||||
private System.Windows.Forms.Label CHK_CustomFlag;
|
||||
private System.Windows.Forms.NumericUpDown nud;
|
||||
private System.Windows.Forms.Button B_Save;
|
||||
private System.Windows.Forms.GroupBox GB_Researcher;
|
||||
private System.Windows.Forms.Label L_UnSet;
|
||||
private System.Windows.Forms.Label L_IsSet;
|
||||
private System.Windows.Forms.TextBox TB_NewSAV;
|
||||
private System.Windows.Forms.TextBox TB_OldSAV;
|
||||
private System.Windows.Forms.TextBox TB_UnSet;
|
||||
private System.Windows.Forms.TextBox TB_IsSet;
|
||||
private System.Windows.Forms.Button B_LoadNew;
|
||||
private System.Windows.Forms.Button B_LoadOld;
|
||||
private System.Windows.Forms.Label L_Stats;
|
||||
private System.Windows.Forms.ComboBox CB_Stats;
|
||||
private System.Windows.Forms.Label L_Value;
|
||||
private System.Windows.Forms.MaskedTextBox MT_Stat;
|
||||
private System.Windows.Forms.GroupBox GB_Flags;
|
||||
private System.Windows.Forms.GroupBox GB_Constants;
|
||||
private System.Windows.Forms.TableLayoutPanel TLP_Const;
|
||||
private System.Windows.Forms.TableLayoutPanel TLP_Flags;
|
||||
}
|
||||
}
|
||||
358
SAV/SAV_EventFlags.cs
Normal file
@@ -0,0 +1,358 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace PKHeX
|
||||
{
|
||||
public partial class SAV_EventFlags : Form
|
||||
{
|
||||
public SAV_EventFlags()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
DragEnter += tabMain_DragEnter;
|
||||
DragDrop += tabMain_DragDrop;
|
||||
|
||||
flags = SAV.EventFlags;
|
||||
Constants = SAV.EventConsts;
|
||||
|
||||
CB_Stats.Items.Clear();
|
||||
for (int i = 0; i < Constants.Length; i++)
|
||||
CB_Stats.Items.Add(i.ToString());
|
||||
|
||||
TLP_Flags.Controls.Clear();
|
||||
TLP_Const.Controls.Clear();
|
||||
addFlagList(getStringList("flags"));
|
||||
addConstList(getStringList("const"));
|
||||
|
||||
Util.TranslateInterface(this, Main.curlanguage);
|
||||
|
||||
CB_Stats.SelectedIndex = 0;
|
||||
nud.Maximum = flags.Length - 1;
|
||||
nud.Text = "0";
|
||||
}
|
||||
|
||||
private readonly SaveFile SAV = Main.SAV.Clone();
|
||||
private readonly bool[] flags;
|
||||
private readonly ushort[] Constants;
|
||||
private const string flagTag = "bool_";
|
||||
private const string constTag = "const_";
|
||||
private const string flagLabelTag = "flag_";
|
||||
private const string constLabelTag = "L_";
|
||||
private bool editing;
|
||||
private int constEntry = -1;
|
||||
|
||||
private void B_Cancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
private void B_Save_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Gather Updated Flags
|
||||
foreach (CheckBox flag in TLP_Flags.Controls)
|
||||
flags[getControlNum(flag)] = flag.Checked;
|
||||
SAV.EventFlags = flags;
|
||||
|
||||
// Copy back Constants
|
||||
changeConstantIndex(null, null); // Trigger Saving
|
||||
SAV.EventConsts = Constants;
|
||||
|
||||
Close();
|
||||
}
|
||||
|
||||
private string[] getStringList(string type)
|
||||
{
|
||||
string[] text = null;
|
||||
if (SAV.ORAS)
|
||||
text = Util.getStringList($"{type}_oras");
|
||||
else if (SAV.XY)
|
||||
text = Util.getStringList($"{type}_xy");
|
||||
return text;
|
||||
}
|
||||
private void addFlagList(string[] list)
|
||||
{
|
||||
if (list == null || list.Length == 0)
|
||||
{
|
||||
TLP_Flags.Controls.Add(new Label { Text = "Needs more research.", Name = "TLP_Flags_Research", ForeColor = Color.Red, AutoSize = true }, 0, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
// Get list
|
||||
List<int> num = new List<int>();
|
||||
List<string> desc = new List<string>();
|
||||
|
||||
foreach (string[] split in list.Select(s => s.Split('\t')).Where(split => split.Length == 2))
|
||||
{
|
||||
try
|
||||
{
|
||||
int n = Convert.ToInt32(split[0]);
|
||||
if (num.Contains(n))
|
||||
continue;
|
||||
num.Add(n);
|
||||
desc.Add(split[1]);
|
||||
} catch { }
|
||||
}
|
||||
if (num.Count == 0)
|
||||
{
|
||||
TLP_Flags.Controls.Add(new Label { Text = "Needs more research.", Name = "TLP_Flags_Research", ForeColor = Color.Red, AutoSize = true }, 0, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < num.Count; i++)
|
||||
{
|
||||
var lbl = new Label
|
||||
{
|
||||
Text = desc[i],
|
||||
Name = flagLabelTag + num[i].ToString("0000"),
|
||||
Margin = Padding.Empty,
|
||||
AutoSize = true
|
||||
};
|
||||
var chk = new CheckBox
|
||||
{
|
||||
Name = flagTag + num[i].ToString("0000"),
|
||||
CheckAlign = ContentAlignment.MiddleLeft,
|
||||
Margin = Padding.Empty,
|
||||
Checked = flags[num[i]],
|
||||
AutoSize = true
|
||||
};
|
||||
chk.CheckStateChanged += toggleFlag;
|
||||
TLP_Flags.Controls.Add(chk, 0, i);
|
||||
TLP_Flags.Controls.Add(lbl, 1, i);
|
||||
}
|
||||
}
|
||||
private void addConstList(string[] list)
|
||||
{
|
||||
if (list == null || list.Length == 0)
|
||||
{
|
||||
TLP_Const.Controls.Add(new Label { Text = "Needs more research.", Name = "TLP_Const_Research", ForeColor = Color.Red, AutoSize = true }, 0, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
// Get list
|
||||
List<int> num = new List<int>();
|
||||
List<string> desc = new List<string>();
|
||||
|
||||
foreach (string[] split in list.Select(s => s.Split('\t')).Where(split => split.Length == 2))
|
||||
{
|
||||
try
|
||||
{
|
||||
int n = Convert.ToInt32(split[0]);
|
||||
if (num.Contains(n))
|
||||
continue;
|
||||
num.Add(n);
|
||||
desc.Add(split[1]);
|
||||
} catch { }
|
||||
}
|
||||
if (num.Count == 0)
|
||||
{
|
||||
TLP_Const.Controls.Add(new Label { Text = "Needs more research.", Name = "TLP_Const_Research", ForeColor = Color.Red, AutoSize = true }, 0, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < num.Count; i++)
|
||||
{
|
||||
var lbl = new Label
|
||||
{
|
||||
Text = desc[i],
|
||||
Name = constLabelTag + num[i].ToString("0000"),
|
||||
Margin = Padding.Empty,
|
||||
AutoSize = true
|
||||
};
|
||||
var mtb = new NumericUpDown
|
||||
{
|
||||
Maximum = short.MaxValue,
|
||||
Minimum = short.MinValue,
|
||||
Value = Constants[num[i]],
|
||||
Name = constTag + num[i].ToString("0000"),
|
||||
Margin = Padding.Empty,
|
||||
Width = 55,
|
||||
};
|
||||
mtb.TextChanged += toggleConst;
|
||||
TLP_Const.Controls.Add(mtb, 0, i);
|
||||
TLP_Const.Controls.Add(lbl, 1, i);
|
||||
}
|
||||
}
|
||||
|
||||
private int getControlNum(Control chk)
|
||||
{
|
||||
try
|
||||
{
|
||||
string source = chk.Name;
|
||||
return Convert.ToInt32(source.Substring(Math.Max(0, source.Length - 4)));
|
||||
}
|
||||
catch { return 0; }
|
||||
}
|
||||
private void changeCustomBool(object sender, EventArgs e)
|
||||
{
|
||||
if (editing)
|
||||
return;
|
||||
editing = true;
|
||||
flags[(int)nud.Value] = c_CustomFlag.Checked;
|
||||
CheckBox c = TLP_Flags.Controls[flagTag + nud.Value.ToString("0000")] as CheckBox;
|
||||
if (c != null)
|
||||
{
|
||||
c.Checked = c_CustomFlag.Checked;
|
||||
}
|
||||
editing = false;
|
||||
}
|
||||
private void changeCustomFlag(object sender, EventArgs e)
|
||||
{
|
||||
int flag = (int)nud.Value;
|
||||
if (flag >= flags.Length)
|
||||
{
|
||||
c_CustomFlag.Checked = false;
|
||||
c_CustomFlag.Enabled = false;
|
||||
nud.BackColor = Color.Red;
|
||||
}
|
||||
else
|
||||
{
|
||||
c_CustomFlag.Enabled = true;
|
||||
nud.BackColor = Main.defaultControlWhite;
|
||||
c_CustomFlag.Checked = flags[flag];
|
||||
}
|
||||
}
|
||||
private void changeCustomFlag(object sender, KeyEventArgs e)
|
||||
{
|
||||
changeCustomFlag(null, (EventArgs)e);
|
||||
}
|
||||
private void toggleFlag(object sender, EventArgs e)
|
||||
{
|
||||
if (editing)
|
||||
return;
|
||||
editing = true;
|
||||
int flagnum = getControlNum((CheckBox) sender);
|
||||
flags[flagnum] = ((CheckBox)sender).Checked;
|
||||
if (nud.Value == flagnum)
|
||||
c_CustomFlag.Checked = flags[flagnum];
|
||||
editing = false;
|
||||
}
|
||||
|
||||
private void changeCustomConst(object sender, EventArgs e)
|
||||
{
|
||||
if (editing)
|
||||
return;
|
||||
editing = true;
|
||||
|
||||
editing = true;
|
||||
Constants[CB_Stats.SelectedIndex] = (ushort)(Util.ToUInt32(((MaskedTextBox)sender).Text) & 0xFFFF);
|
||||
MaskedTextBox m = TLP_Flags.Controls[constTag + CB_Stats.SelectedIndex.ToString("0000")] as MaskedTextBox;
|
||||
if (m != null)
|
||||
m.Text = MT_Stat.Text;
|
||||
|
||||
editing = false;
|
||||
}
|
||||
private void changeConstantIndex(object sender, EventArgs e)
|
||||
{
|
||||
if (constEntry > -1) // Set Entry
|
||||
Constants[constEntry] = (ushort)Math.Min(Util.ToUInt32(MT_Stat.Text), 0xFFFF);
|
||||
|
||||
constEntry = CB_Stats.SelectedIndex; // Get Entry
|
||||
MT_Stat.Text = Constants[constEntry].ToString();
|
||||
}
|
||||
private void toggleConst(object sender, EventArgs e)
|
||||
{
|
||||
if (editing)
|
||||
return;
|
||||
|
||||
editing = true;
|
||||
int constnum = getControlNum((NumericUpDown)sender);
|
||||
Constants[constnum] = (ushort)(Util.ToUInt32(((NumericUpDown)sender).Text) & 0xFFFF);
|
||||
if (constnum == CB_Stats.SelectedIndex)
|
||||
MT_Stat.Text = Constants[constnum].ToString();
|
||||
editing = false;
|
||||
}
|
||||
|
||||
private void changeSAV(object sender, EventArgs e)
|
||||
{
|
||||
if (TB_NewSAV.Text.Length > 0 && TB_OldSAV.Text.Length > 0)
|
||||
diffSaves();
|
||||
}
|
||||
private void openSAV(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog ofd = new OpenFileDialog();
|
||||
if (ofd.ShowDialog() == DialogResult.OK)
|
||||
loadSAV(sender, ofd.FileName);
|
||||
}
|
||||
private void loadSAV(object sender, string path)
|
||||
{
|
||||
if (sender == B_LoadOld)
|
||||
TB_OldSAV.Text = path;
|
||||
else
|
||||
TB_NewSAV.Text = path;
|
||||
}
|
||||
private void diffSaves()
|
||||
{
|
||||
if (!File.Exists(TB_OldSAV.Text)) { Util.Alert("Save 1 path invalid."); return; }
|
||||
if (!File.Exists(TB_NewSAV.Text)) { Util.Alert("Save 2 path invalid."); return; }
|
||||
if (new FileInfo(TB_OldSAV.Text).Length > 0x100000) { Util.Alert("Save 1 file invalid."); return; }
|
||||
if (new FileInfo(TB_NewSAV.Text).Length > 0x100000) { Util.Alert("Save 2 file invalid."); return; }
|
||||
|
||||
SaveFile s1 = SaveUtil.getVariantSAV(File.ReadAllBytes(TB_OldSAV.Text));
|
||||
SaveFile s2 = SaveUtil.getVariantSAV(File.ReadAllBytes(TB_NewSAV.Text));
|
||||
|
||||
if (s1.GetType() != s2.GetType())
|
||||
{ Util.Alert("Save types are different.", $"S1: {s1.GetType()}", $"S2: {s2.GetType()}"); return; }
|
||||
|
||||
string tbIsSet = "";
|
||||
string tbUnSet = "";
|
||||
try
|
||||
{
|
||||
bool[] oldBits = s1.EventFlags;
|
||||
bool[] newBits = s2.EventFlags;
|
||||
if (oldBits.Length != newBits.Length)
|
||||
{ Util.Alert("Event flag lengths for games are different.", $"S1: {(GameVersion)s1.Game}", $"S2: {(GameVersion)s2.Game}"); return; }
|
||||
|
||||
for (int i = 0; i < oldBits.Length; i++)
|
||||
{
|
||||
if (oldBits[i] == newBits[i]) continue;
|
||||
if (newBits[i])
|
||||
tbIsSet += i.ToString("0000") + ",";
|
||||
else
|
||||
tbUnSet += i.ToString("0000") + ",";
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Util.Error(e.ToString());
|
||||
Console.Write(e);
|
||||
}
|
||||
TB_IsSet.Text = tbIsSet;
|
||||
TB_UnSet.Text = tbUnSet;
|
||||
|
||||
string r = "";
|
||||
try
|
||||
{
|
||||
ushort[] oldConst = s1.EventConsts;
|
||||
ushort[] newConst = s2.EventConsts;
|
||||
if (oldConst.Length != newConst.Length)
|
||||
{ Util.Alert("Event flag lengths for games are different.", $"S1: {(GameVersion)s1.Game}", $"S2: {(GameVersion)s2.Game}"); return; }
|
||||
|
||||
for (int i = 0; i < newConst.Length; i++)
|
||||
if (oldConst[i] != newConst[i])
|
||||
r += $"{i}: {oldConst[i]}->{newConst[i]}{Environment.NewLine}";
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Util.Error(e.ToString());
|
||||
Console.Write(e);
|
||||
}
|
||||
|
||||
if (DialogResult.Yes != Util.Prompt(MessageBoxButtons.YesNo, "Copy Event Constant diff to clipboard?"))
|
||||
return;
|
||||
Clipboard.SetText(r);
|
||||
}
|
||||
|
||||
private void tabMain_DragEnter(object sender, DragEventArgs e)
|
||||
{
|
||||
if (e.Data.GetDataPresent(DataFormats.FileDrop)) e.Effect = DragDropEffects.Copy;
|
||||
}
|
||||
private void tabMain_DragDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
|
||||
loadSAV(Util.Prompt(MessageBoxButtons.YesNo, "FlagDiff Researcher:", "Yes: Old Save" + Environment.NewLine + "No: New Save") == DialogResult.Yes ? B_LoadOld : B_LoadNew, files[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
1378
SAV/SAV_EventFlagsORAS.Designer.cs
generated
@@ -1,261 +0,0 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace PKHeX
|
||||
{
|
||||
public partial class SAV_EventFlagsORAS : Form
|
||||
{
|
||||
public SAV_EventFlagsORAS()
|
||||
{
|
||||
InitializeComponent();
|
||||
Util.TranslateInterface(this, Main.curlanguage);
|
||||
|
||||
AllowDrop = true;
|
||||
DragEnter += tabMain_DragEnter;
|
||||
DragDrop += tabMain_DragDrop;
|
||||
Setup();
|
||||
|
||||
nud.Text = "0"; // Prompts an update for flag 0.
|
||||
MT_Ash.Text = BitConverter.ToUInt16(Main.SAV.Data, Main.SAV.EventAsh).ToString();
|
||||
}
|
||||
private bool setup = true;
|
||||
private CheckBox[] chka;
|
||||
private readonly bool[] flags = new bool[3072];
|
||||
private readonly ushort[] Constants = new ushort[(Main.SAV.EventFlag - Main.SAV.EventConst) / 2];
|
||||
private void B_Cancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
private void B_Save_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Gather Updated Flags
|
||||
foreach (CheckBox flag in chka)
|
||||
flags[getFlagNum(flag)] = flag.Checked;
|
||||
|
||||
byte[] data = new byte[flags.Length / 8];
|
||||
|
||||
for (int i = 0; i < flags.Length; i++)
|
||||
if (flags[i])
|
||||
data[i / 8] |= (byte)(1 << i % 8);
|
||||
|
||||
Array.Copy(data, 0, Main.SAV.Data, Main.SAV.EventFlag, 0x180);
|
||||
|
||||
// Copy back Constants
|
||||
changeConstantIndex(null, null); // Trigger Saving
|
||||
for (int i = 0; i < Constants.Length; i++)
|
||||
Array.Copy(BitConverter.GetBytes(Constants[i]), 0, Main.SAV.Data, Main.SAV.EventConst + 2 * i, 2);
|
||||
|
||||
// Copy back Volcanic Ash counter
|
||||
Array.Copy(BitConverter.GetBytes(Util.ToUInt32(MT_Ash.Text)), 0, Main.SAV.Data, Main.SAV.EventAsh, 2);
|
||||
|
||||
Close();
|
||||
}
|
||||
private void Setup()
|
||||
{
|
||||
// Fill Bit arrays
|
||||
|
||||
chka = new[] {
|
||||
|
||||
flag_0173,flag_2811, // Raikou
|
||||
flag_0174,flag_2812, // Entei
|
||||
flag_0175,flag_2813, // Suicune
|
||||
flag_0209,flag_2814, // Lugia
|
||||
flag_0208,flag_2815, // Ho-Oh
|
||||
flag_0179,flag_2816, // Uxie
|
||||
flag_0180,flag_2817, // Mesprit
|
||||
flag_0181,flag_2818, // Azelf
|
||||
flag_2819, // Dialga
|
||||
flag_2820, // Palkia
|
||||
flag_0260,flag_2821, // Heatran
|
||||
flag_0252,flag_2822, // Regigigas
|
||||
flag_2823, // Giratina
|
||||
flag_0172,flag_2824, // Cresselia
|
||||
flag_0176,flag_2825, // Cobalion
|
||||
flag_0177,flag_2826, // Terrakion
|
||||
flag_0178,flag_2827, // Virizion
|
||||
flag_2828, // Tornadus
|
||||
flag_2829, // Thundurus
|
||||
flag_0182,flag_2830, // Reshiram
|
||||
flag_0183,flag_2831, // Zekrom
|
||||
flag_2832, // Landorus
|
||||
flag_0184,flag_2833, // Kyurem
|
||||
flag_0419,flag_2834, // Latios
|
||||
flag_0420,flag_2835, // Latias
|
||||
flag_0956,flag_2836, // Regirock
|
||||
flag_0957,flag_2837, // Regice
|
||||
flag_0958,flag_2838, // Registeel
|
||||
flag_0648,flag_2839, // Groudon
|
||||
flag_0647,flag_2840, // Kyogre
|
||||
// ??????
|
||||
flag_0945,flag_2842, // Deoxys
|
||||
|
||||
// Cresselia, Regigigas
|
||||
// Terrakion, Virizion
|
||||
|
||||
// Maison
|
||||
flag_0284,flag_0285,flag_0286,flag_0287,flag_0288, // Statuettes
|
||||
flag_0289,flag_0290,flag_0291,flag_0292,flag_0293, // Super Unlocks
|
||||
//flag_0675, // Chatelaine 50
|
||||
//flag_2546, // Pokedex
|
||||
};
|
||||
byte[] data = new byte[0x180];
|
||||
Array.Copy(Main.SAV.Data, Main.SAV.EventFlag, data, 0, 0x180);
|
||||
BitArray BitRegion = new BitArray(data);
|
||||
BitRegion.CopyTo(flags, 0);
|
||||
|
||||
// Setup Event Constant Editor
|
||||
CB_Stats.Items.Clear();
|
||||
for (int i = 0; i < Constants.Length; i += 2)
|
||||
{
|
||||
CB_Stats.Items.Add($"0x{(i/2).ToString("X2")}");
|
||||
Constants[i / 2] = BitConverter.ToUInt16(Main.SAV.Data, Main.SAV.EventConst + i);
|
||||
}
|
||||
CB_Stats.SelectedIndex = 0;
|
||||
|
||||
// Populate Flags
|
||||
setup = true;
|
||||
popFlags();
|
||||
}
|
||||
private void popFlags()
|
||||
{
|
||||
if (!setup) return;
|
||||
foreach (CheckBox flag in chka)
|
||||
flag.Checked = flags[getFlagNum(flag)];
|
||||
|
||||
changeCustomFlag(null, null);
|
||||
}
|
||||
|
||||
private int getFlagNum(CheckBox chk)
|
||||
{
|
||||
try
|
||||
{
|
||||
string source = chk.Name;
|
||||
return Convert.ToInt32(source.Substring(Math.Max(0, source.Length - 4)));
|
||||
}
|
||||
catch { return 0; }
|
||||
}
|
||||
private void changeCustomBool(object sender, EventArgs e)
|
||||
{
|
||||
flags[(int)nud.Value] = CHK_CustomFlag.Checked;
|
||||
popFlags();
|
||||
}
|
||||
private void changeCustomFlag(object sender, EventArgs e)
|
||||
{
|
||||
int flag = (int)nud.Value;
|
||||
if (flag >= 3072)
|
||||
{
|
||||
CHK_CustomFlag.Checked = false;
|
||||
CHK_CustomFlag.Enabled = false;
|
||||
nud.BackColor = Color.Red;
|
||||
}
|
||||
else
|
||||
{
|
||||
CHK_CustomFlag.Enabled = true;
|
||||
nud.BackColor = Main.defaultControlWhite;
|
||||
CHK_CustomFlag.Checked = flags[flag];
|
||||
}
|
||||
}
|
||||
private void changeCustomFlag(object sender, KeyEventArgs e)
|
||||
{
|
||||
changeCustomFlag(null, (EventArgs)e);
|
||||
}
|
||||
|
||||
private void toggleFlag(object sender, EventArgs e)
|
||||
{
|
||||
flags[getFlagNum((CheckBox)sender)] = ((CheckBox)sender).Checked;
|
||||
changeCustomFlag(sender, e);
|
||||
}
|
||||
|
||||
private void changeSAV(object sender, EventArgs e)
|
||||
{
|
||||
if (TB_NewSAV.Text.Length > 0 && TB_OldSAV.Text.Length > 0)
|
||||
diffSaves();
|
||||
}
|
||||
private void diffSaves()
|
||||
{
|
||||
BitArray oldBits = new BitArray(oldFlags);
|
||||
BitArray newBits = new BitArray(newFlags);
|
||||
|
||||
string tbIsSet = "";
|
||||
string tbUnSet = "";
|
||||
for (int i = 0; i < oldBits.Length; i++)
|
||||
{
|
||||
if (oldBits[i] == newBits[i]) continue;
|
||||
if (newBits[i])
|
||||
tbIsSet += i.ToString("0000") + ",";
|
||||
else
|
||||
tbUnSet += i.ToString("0000") + ",";
|
||||
}
|
||||
TB_IsSet.Text = tbIsSet;
|
||||
TB_UnSet.Text = tbUnSet;
|
||||
|
||||
if (DialogResult.Yes != Util.Prompt(MessageBoxButtons.YesNo, "Copy Event Constant diff to clipboard?"))
|
||||
return;
|
||||
|
||||
string r = "";
|
||||
for (int i = 0; i < newConst.Length; i += 2)
|
||||
{
|
||||
ushort oldval = BitConverter.ToUInt16(oldConst, i);
|
||||
ushort newval = BitConverter.ToUInt16(oldConst, i);
|
||||
if (oldval != newval)
|
||||
r += $"0x{(i/2).ToString("X2")}: {oldval}->{newval}{Environment.NewLine}";
|
||||
}
|
||||
Clipboard.SetText(r);
|
||||
}
|
||||
private byte[] oldFlags = new byte[0x180];
|
||||
private byte[] newFlags = new byte[0x180];
|
||||
private byte[] oldConst = new byte[Main.SAV.EventFlag - Main.SAV.EventConst];
|
||||
private byte[] newConst = new byte[Main.SAV.EventFlag - Main.SAV.EventConst];
|
||||
private void openSAV(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog ofd = new OpenFileDialog();
|
||||
if (ofd.ShowDialog() == DialogResult.OK)
|
||||
loadSAV(sender, ofd.FileName);
|
||||
}
|
||||
private void loadSAV(object sender, string path)
|
||||
{
|
||||
FileInfo fi = new FileInfo(path);
|
||||
if (fi.Length != SAV6.SIZE_ORAS)
|
||||
{
|
||||
Util.Error("Invalid SAV Size", string.Format("File Size: 0x{1} ({0} bytes)", fi.Length, fi.Length.ToString("X5")), "File Loaded: " + path);
|
||||
return;
|
||||
}
|
||||
|
||||
byte[] data = File.ReadAllBytes(path);
|
||||
if (sender == B_LoadOld)
|
||||
{
|
||||
oldFlags = data.Skip(Main.SAV.EventFlag).Take(0x180).ToArray();
|
||||
oldConst = data.Skip(Main.SAV.EventConst).Take(Constants.Length * 2).ToArray();
|
||||
TB_OldSAV.Text = path;
|
||||
}
|
||||
else
|
||||
{
|
||||
newFlags = data.Skip(Main.SAV.EventFlag).Take(0x180).ToArray();
|
||||
newConst = data.Skip(Main.SAV.EventConst).Take(Constants.Length * 2).ToArray();
|
||||
TB_NewSAV.Text = path;
|
||||
}
|
||||
}
|
||||
private int entry = -1;
|
||||
private void changeConstantIndex(object sender, EventArgs e)
|
||||
{
|
||||
if (entry > -1) // Set Entry
|
||||
Constants[entry] = (ushort)Math.Min(Util.ToUInt32(MT_Stat.Text), 0xFFFF);
|
||||
|
||||
entry = CB_Stats.SelectedIndex; // Get Entry
|
||||
MT_Stat.Text = Constants[entry].ToString();
|
||||
}
|
||||
private void tabMain_DragEnter(object sender, DragEventArgs e)
|
||||
{
|
||||
if (e.Data.GetDataPresent(DataFormats.FileDrop)) e.Effect = DragDropEffects.Copy;
|
||||
}
|
||||
private void tabMain_DragDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
|
||||
loadSAV(Util.Prompt(MessageBoxButtons.YesNo, "FlagDiff Researcher:", "Yes: Old Save" + Environment.NewLine + "No: New Save") == DialogResult.Yes ? B_LoadOld : B_LoadNew, files[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
701
SAV/SAV_EventFlagsXY.Designer.cs
generated
@@ -1,701 +0,0 @@
|
||||
namespace PKHeX
|
||||
{
|
||||
partial class SAV_EventFlagsXY
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SAV_EventFlagsXY));
|
||||
this.CHK_CustomFlag = new System.Windows.Forms.CheckBox();
|
||||
this.B_Cancel = new System.Windows.Forms.Button();
|
||||
this.GB_FlagStatus = new System.Windows.Forms.GroupBox();
|
||||
this.nud = new System.Windows.Forms.NumericUpDown();
|
||||
this.L_Flag = new System.Windows.Forms.Label();
|
||||
this.flag_0001 = new System.Windows.Forms.CheckBox();
|
||||
this.flag_0002 = new System.Windows.Forms.CheckBox();
|
||||
this.flag_0003 = new System.Windows.Forms.CheckBox();
|
||||
this.flag_0004 = new System.Windows.Forms.CheckBox();
|
||||
this.flag_0005 = new System.Windows.Forms.CheckBox();
|
||||
this.B_Save = new System.Windows.Forms.Button();
|
||||
this.flag_2237 = new System.Windows.Forms.CheckBox();
|
||||
this.flag_2238 = new System.Windows.Forms.CheckBox();
|
||||
this.flag_2239 = new System.Windows.Forms.CheckBox();
|
||||
this.GB_Researcher = new System.Windows.Forms.GroupBox();
|
||||
this.L_UnSet = new System.Windows.Forms.Label();
|
||||
this.L_IsSet = new System.Windows.Forms.Label();
|
||||
this.TB_NewSAV = new System.Windows.Forms.TextBox();
|
||||
this.TB_OldSAV = new System.Windows.Forms.TextBox();
|
||||
this.TB_UnSet = new System.Windows.Forms.TextBox();
|
||||
this.TB_IsSet = new System.Windows.Forms.TextBox();
|
||||
this.B_LoadNew = new System.Windows.Forms.Button();
|
||||
this.B_LoadOld = new System.Windows.Forms.Button();
|
||||
this.flag_0963 = new System.Windows.Forms.CheckBox();
|
||||
this.flag_0115 = new System.Windows.Forms.CheckBox();
|
||||
this.GB_Rebattle = new System.Windows.Forms.GroupBox();
|
||||
this.flag_0114 = new System.Windows.Forms.CheckBox();
|
||||
this.flag_0790 = new System.Windows.Forms.CheckBox();
|
||||
this.GB_Misc = new System.Windows.Forms.GroupBox();
|
||||
this.flag_0289 = new System.Windows.Forms.CheckBox();
|
||||
this.flag_0288 = new System.Windows.Forms.CheckBox();
|
||||
this.flag_0287 = new System.Windows.Forms.CheckBox();
|
||||
this.flag_0294 = new System.Windows.Forms.CheckBox();
|
||||
this.flag_0293 = new System.Windows.Forms.CheckBox();
|
||||
this.flag_0292 = new System.Windows.Forms.CheckBox();
|
||||
this.flag_0291 = new System.Windows.Forms.CheckBox();
|
||||
this.flag_0290 = new System.Windows.Forms.CheckBox();
|
||||
this.flag_0675 = new System.Windows.Forms.CheckBox();
|
||||
this.flag_0286 = new System.Windows.Forms.CheckBox();
|
||||
this.flag_0285 = new System.Windows.Forms.CheckBox();
|
||||
this.flag_2546 = new System.Windows.Forms.CheckBox();
|
||||
this.L_Stats = new System.Windows.Forms.Label();
|
||||
this.CB_Stats = new System.Windows.Forms.ComboBox();
|
||||
this.L_Value = new System.Windows.Forms.Label();
|
||||
this.MT_Stat = new System.Windows.Forms.MaskedTextBox();
|
||||
this.GB_FlagStatus.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nud)).BeginInit();
|
||||
this.GB_Researcher.SuspendLayout();
|
||||
this.GB_Rebattle.SuspendLayout();
|
||||
this.GB_Misc.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// CHK_CustomFlag
|
||||
//
|
||||
this.CHK_CustomFlag.AutoSize = true;
|
||||
this.CHK_CustomFlag.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
this.CHK_CustomFlag.Enabled = false;
|
||||
this.CHK_CustomFlag.Location = new System.Drawing.Point(12, 44);
|
||||
this.CHK_CustomFlag.Name = "CHK_CustomFlag";
|
||||
this.CHK_CustomFlag.Size = new System.Drawing.Size(59, 17);
|
||||
this.CHK_CustomFlag.TabIndex = 1;
|
||||
this.CHK_CustomFlag.Text = "Status:";
|
||||
this.CHK_CustomFlag.UseVisualStyleBackColor = true;
|
||||
this.CHK_CustomFlag.CheckedChanged += new System.EventHandler(this.changeCustomBool);
|
||||
//
|
||||
// B_Cancel
|
||||
//
|
||||
this.B_Cancel.Location = new System.Drawing.Point(287, 307);
|
||||
this.B_Cancel.Name = "B_Cancel";
|
||||
this.B_Cancel.Size = new System.Drawing.Size(75, 23);
|
||||
this.B_Cancel.TabIndex = 2;
|
||||
this.B_Cancel.Text = "Cancel";
|
||||
this.B_Cancel.UseVisualStyleBackColor = true;
|
||||
this.B_Cancel.Click += new System.EventHandler(this.B_Cancel_Click);
|
||||
//
|
||||
// GB_FlagStatus
|
||||
//
|
||||
this.GB_FlagStatus.Controls.Add(this.nud);
|
||||
this.GB_FlagStatus.Controls.Add(this.L_Flag);
|
||||
this.GB_FlagStatus.Controls.Add(this.CHK_CustomFlag);
|
||||
this.GB_FlagStatus.Location = new System.Drawing.Point(14, 135);
|
||||
this.GB_FlagStatus.Name = "GB_FlagStatus";
|
||||
this.GB_FlagStatus.Size = new System.Drawing.Size(108, 68);
|
||||
this.GB_FlagStatus.TabIndex = 3;
|
||||
this.GB_FlagStatus.TabStop = false;
|
||||
this.GB_FlagStatus.Text = "Check Flag Status";
|
||||
//
|
||||
// nud
|
||||
//
|
||||
this.nud.Location = new System.Drawing.Point(56, 19);
|
||||
this.nud.Maximum = new decimal(new int[] {
|
||||
3072,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nud.Name = "nud";
|
||||
this.nud.Size = new System.Drawing.Size(45, 20);
|
||||
this.nud.TabIndex = 9;
|
||||
this.nud.Value = new decimal(new int[] {
|
||||
3071,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nud.ValueChanged += new System.EventHandler(this.changeCustomFlag);
|
||||
this.nud.KeyUp += new System.Windows.Forms.KeyEventHandler(this.changeCustomFlag);
|
||||
//
|
||||
// L_Flag
|
||||
//
|
||||
this.L_Flag.AutoSize = true;
|
||||
this.L_Flag.Location = new System.Drawing.Point(13, 21);
|
||||
this.L_Flag.Name = "L_Flag";
|
||||
this.L_Flag.Size = new System.Drawing.Size(30, 13);
|
||||
this.L_Flag.TabIndex = 2;
|
||||
this.L_Flag.Text = "Flag:";
|
||||
//
|
||||
// flag_0001
|
||||
//
|
||||
this.flag_0001.AutoSize = true;
|
||||
this.flag_0001.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
this.flag_0001.Location = new System.Drawing.Point(12, 12);
|
||||
this.flag_0001.Name = "flag_0001";
|
||||
this.flag_0001.Size = new System.Drawing.Size(52, 17);
|
||||
this.flag_0001.TabIndex = 4;
|
||||
this.flag_0001.Text = "Flag1";
|
||||
this.flag_0001.UseVisualStyleBackColor = true;
|
||||
this.flag_0001.Click += new System.EventHandler(this.toggleFlag);
|
||||
//
|
||||
// flag_0002
|
||||
//
|
||||
this.flag_0002.AutoSize = true;
|
||||
this.flag_0002.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
this.flag_0002.Location = new System.Drawing.Point(12, 28);
|
||||
this.flag_0002.Name = "flag_0002";
|
||||
this.flag_0002.Size = new System.Drawing.Size(52, 17);
|
||||
this.flag_0002.TabIndex = 5;
|
||||
this.flag_0002.Text = "Flag2";
|
||||
this.flag_0002.UseVisualStyleBackColor = true;
|
||||
this.flag_0002.Click += new System.EventHandler(this.toggleFlag);
|
||||
//
|
||||
// flag_0003
|
||||
//
|
||||
this.flag_0003.AutoSize = true;
|
||||
this.flag_0003.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
this.flag_0003.Location = new System.Drawing.Point(12, 44);
|
||||
this.flag_0003.Name = "flag_0003";
|
||||
this.flag_0003.Size = new System.Drawing.Size(52, 17);
|
||||
this.flag_0003.TabIndex = 6;
|
||||
this.flag_0003.Text = "Flag3";
|
||||
this.flag_0003.UseVisualStyleBackColor = true;
|
||||
this.flag_0003.Click += new System.EventHandler(this.toggleFlag);
|
||||
//
|
||||
// flag_0004
|
||||
//
|
||||
this.flag_0004.AutoSize = true;
|
||||
this.flag_0004.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
this.flag_0004.Location = new System.Drawing.Point(12, 60);
|
||||
this.flag_0004.Name = "flag_0004";
|
||||
this.flag_0004.Size = new System.Drawing.Size(52, 17);
|
||||
this.flag_0004.TabIndex = 7;
|
||||
this.flag_0004.Text = "Flag4";
|
||||
this.flag_0004.UseVisualStyleBackColor = true;
|
||||
this.flag_0004.Click += new System.EventHandler(this.toggleFlag);
|
||||
//
|
||||
// flag_0005
|
||||
//
|
||||
this.flag_0005.AutoSize = true;
|
||||
this.flag_0005.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
this.flag_0005.Location = new System.Drawing.Point(12, 76);
|
||||
this.flag_0005.Name = "flag_0005";
|
||||
this.flag_0005.Size = new System.Drawing.Size(52, 17);
|
||||
this.flag_0005.TabIndex = 8;
|
||||
this.flag_0005.Text = "Flag5";
|
||||
this.flag_0005.UseVisualStyleBackColor = true;
|
||||
this.flag_0005.Click += new System.EventHandler(this.toggleFlag);
|
||||
//
|
||||
// B_Save
|
||||
//
|
||||
this.B_Save.Location = new System.Drawing.Point(366, 306);
|
||||
this.B_Save.Name = "B_Save";
|
||||
this.B_Save.Size = new System.Drawing.Size(75, 23);
|
||||
this.B_Save.TabIndex = 9;
|
||||
this.B_Save.Text = "Save";
|
||||
this.B_Save.UseVisualStyleBackColor = true;
|
||||
this.B_Save.Click += new System.EventHandler(this.B_Save_Click);
|
||||
//
|
||||
// flag_2237
|
||||
//
|
||||
this.flag_2237.AutoSize = true;
|
||||
this.flag_2237.Location = new System.Drawing.Point(72, 12);
|
||||
this.flag_2237.Name = "flag_2237";
|
||||
this.flag_2237.Size = new System.Drawing.Size(50, 17);
|
||||
this.flag_2237.TabIndex = 10;
|
||||
this.flag_2237.Text = "2237";
|
||||
this.flag_2237.UseVisualStyleBackColor = true;
|
||||
this.flag_2237.Click += new System.EventHandler(this.toggleFlag);
|
||||
//
|
||||
// flag_2238
|
||||
//
|
||||
this.flag_2238.AutoSize = true;
|
||||
this.flag_2238.Location = new System.Drawing.Point(72, 28);
|
||||
this.flag_2238.Name = "flag_2238";
|
||||
this.flag_2238.Size = new System.Drawing.Size(50, 17);
|
||||
this.flag_2238.TabIndex = 11;
|
||||
this.flag_2238.Text = "2238";
|
||||
this.flag_2238.UseVisualStyleBackColor = true;
|
||||
this.flag_2238.Click += new System.EventHandler(this.toggleFlag);
|
||||
//
|
||||
// flag_2239
|
||||
//
|
||||
this.flag_2239.AutoSize = true;
|
||||
this.flag_2239.Location = new System.Drawing.Point(72, 44);
|
||||
this.flag_2239.Name = "flag_2239";
|
||||
this.flag_2239.Size = new System.Drawing.Size(50, 17);
|
||||
this.flag_2239.TabIndex = 12;
|
||||
this.flag_2239.Text = "2239";
|
||||
this.flag_2239.UseVisualStyleBackColor = true;
|
||||
this.flag_2239.Click += new System.EventHandler(this.toggleFlag);
|
||||
//
|
||||
// GB_Researcher
|
||||
//
|
||||
this.GB_Researcher.Controls.Add(this.L_UnSet);
|
||||
this.GB_Researcher.Controls.Add(this.L_IsSet);
|
||||
this.GB_Researcher.Controls.Add(this.TB_NewSAV);
|
||||
this.GB_Researcher.Controls.Add(this.TB_OldSAV);
|
||||
this.GB_Researcher.Controls.Add(this.TB_UnSet);
|
||||
this.GB_Researcher.Controls.Add(this.TB_IsSet);
|
||||
this.GB_Researcher.Controls.Add(this.B_LoadNew);
|
||||
this.GB_Researcher.Controls.Add(this.B_LoadOld);
|
||||
this.GB_Researcher.Location = new System.Drawing.Point(14, 210);
|
||||
this.GB_Researcher.Name = "GB_Researcher";
|
||||
this.GB_Researcher.Size = new System.Drawing.Size(268, 120);
|
||||
this.GB_Researcher.TabIndex = 13;
|
||||
this.GB_Researcher.TabStop = false;
|
||||
this.GB_Researcher.Text = "FlagDiff Researcher";
|
||||
//
|
||||
// L_UnSet
|
||||
//
|
||||
this.L_UnSet.AutoSize = true;
|
||||
this.L_UnSet.Location = new System.Drawing.Point(10, 97);
|
||||
this.L_UnSet.Name = "L_UnSet";
|
||||
this.L_UnSet.Size = new System.Drawing.Size(37, 13);
|
||||
this.L_UnSet.TabIndex = 7;
|
||||
this.L_UnSet.Text = "UnSet";
|
||||
//
|
||||
// L_IsSet
|
||||
//
|
||||
this.L_IsSet.AutoSize = true;
|
||||
this.L_IsSet.Location = new System.Drawing.Point(12, 77);
|
||||
this.L_IsSet.Name = "L_IsSet";
|
||||
this.L_IsSet.Size = new System.Drawing.Size(31, 13);
|
||||
this.L_IsSet.TabIndex = 6;
|
||||
this.L_IsSet.Text = "IsSet";
|
||||
//
|
||||
// TB_NewSAV
|
||||
//
|
||||
this.TB_NewSAV.Location = new System.Drawing.Point(93, 47);
|
||||
this.TB_NewSAV.Name = "TB_NewSAV";
|
||||
this.TB_NewSAV.ReadOnly = true;
|
||||
this.TB_NewSAV.Size = new System.Drawing.Size(169, 20);
|
||||
this.TB_NewSAV.TabIndex = 5;
|
||||
this.TB_NewSAV.TextChanged += new System.EventHandler(this.changeSAV);
|
||||
//
|
||||
// TB_OldSAV
|
||||
//
|
||||
this.TB_OldSAV.Location = new System.Drawing.Point(93, 21);
|
||||
this.TB_OldSAV.Name = "TB_OldSAV";
|
||||
this.TB_OldSAV.ReadOnly = true;
|
||||
this.TB_OldSAV.Size = new System.Drawing.Size(169, 20);
|
||||
this.TB_OldSAV.TabIndex = 4;
|
||||
this.TB_OldSAV.TextChanged += new System.EventHandler(this.changeSAV);
|
||||
//
|
||||
// TB_UnSet
|
||||
//
|
||||
this.TB_UnSet.Location = new System.Drawing.Point(56, 94);
|
||||
this.TB_UnSet.Name = "TB_UnSet";
|
||||
this.TB_UnSet.ReadOnly = true;
|
||||
this.TB_UnSet.Size = new System.Drawing.Size(206, 20);
|
||||
this.TB_UnSet.TabIndex = 3;
|
||||
//
|
||||
// TB_IsSet
|
||||
//
|
||||
this.TB_IsSet.Location = new System.Drawing.Point(56, 74);
|
||||
this.TB_IsSet.Name = "TB_IsSet";
|
||||
this.TB_IsSet.ReadOnly = true;
|
||||
this.TB_IsSet.Size = new System.Drawing.Size(206, 20);
|
||||
this.TB_IsSet.TabIndex = 2;
|
||||
//
|
||||
// B_LoadNew
|
||||
//
|
||||
this.B_LoadNew.Location = new System.Drawing.Point(12, 45);
|
||||
this.B_LoadNew.Name = "B_LoadNew";
|
||||
this.B_LoadNew.Size = new System.Drawing.Size(75, 23);
|
||||
this.B_LoadNew.TabIndex = 1;
|
||||
this.B_LoadNew.Text = "Load New";
|
||||
this.B_LoadNew.UseVisualStyleBackColor = true;
|
||||
this.B_LoadNew.Click += new System.EventHandler(this.openSAV);
|
||||
//
|
||||
// B_LoadOld
|
||||
//
|
||||
this.B_LoadOld.Location = new System.Drawing.Point(12, 19);
|
||||
this.B_LoadOld.Name = "B_LoadOld";
|
||||
this.B_LoadOld.Size = new System.Drawing.Size(75, 23);
|
||||
this.B_LoadOld.TabIndex = 0;
|
||||
this.B_LoadOld.Text = "Load Old";
|
||||
this.B_LoadOld.UseVisualStyleBackColor = true;
|
||||
this.B_LoadOld.Click += new System.EventHandler(this.openSAV);
|
||||
//
|
||||
// flag_0963
|
||||
//
|
||||
this.flag_0963.AutoSize = true;
|
||||
this.flag_0963.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||
this.flag_0963.Location = new System.Drawing.Point(16, 19);
|
||||
this.flag_0963.Name = "flag_0963";
|
||||
this.flag_0963.Size = new System.Drawing.Size(113, 17);
|
||||
this.flag_0963.TabIndex = 14;
|
||||
this.flag_0963.Text = "Mewtwo Defeated";
|
||||
this.flag_0963.UseVisualStyleBackColor = true;
|
||||
this.flag_0963.Click += new System.EventHandler(this.toggleFlag);
|
||||
//
|
||||
// flag_0115
|
||||
//
|
||||
this.flag_0115.AutoSize = true;
|
||||
this.flag_0115.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||
this.flag_0115.Location = new System.Drawing.Point(16, 34);
|
||||
this.flag_0115.Name = "flag_0115";
|
||||
this.flag_0115.Size = new System.Drawing.Size(112, 17);
|
||||
this.flag_0115.TabIndex = 15;
|
||||
this.flag_0115.Text = "Mewtwo Captured";
|
||||
this.flag_0115.UseVisualStyleBackColor = true;
|
||||
this.flag_0115.Click += new System.EventHandler(this.toggleFlag);
|
||||
//
|
||||
// GB_Rebattle
|
||||
//
|
||||
this.GB_Rebattle.Controls.Add(this.flag_0114);
|
||||
this.GB_Rebattle.Controls.Add(this.flag_0790);
|
||||
this.GB_Rebattle.Controls.Add(this.flag_0115);
|
||||
this.GB_Rebattle.Controls.Add(this.flag_0963);
|
||||
this.GB_Rebattle.Location = new System.Drawing.Point(129, 12);
|
||||
this.GB_Rebattle.Name = "GB_Rebattle";
|
||||
this.GB_Rebattle.Size = new System.Drawing.Size(152, 191);
|
||||
this.GB_Rebattle.TabIndex = 16;
|
||||
this.GB_Rebattle.TabStop = false;
|
||||
this.GB_Rebattle.Text = "Rebattle";
|
||||
//
|
||||
// flag_0114
|
||||
//
|
||||
this.flag_0114.AutoSize = true;
|
||||
this.flag_0114.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||
this.flag_0114.Location = new System.Drawing.Point(16, 72);
|
||||
this.flag_0114.Name = "flag_0114";
|
||||
this.flag_0114.Size = new System.Drawing.Size(111, 17);
|
||||
this.flag_0114.TabIndex = 17;
|
||||
this.flag_0114.Text = "Zygarde Captured";
|
||||
this.flag_0114.UseVisualStyleBackColor = true;
|
||||
this.flag_0114.Click += new System.EventHandler(this.toggleFlag);
|
||||
//
|
||||
// flag_0790
|
||||
//
|
||||
this.flag_0790.AutoSize = true;
|
||||
this.flag_0790.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||
this.flag_0790.Location = new System.Drawing.Point(16, 57);
|
||||
this.flag_0790.Name = "flag_0790";
|
||||
this.flag_0790.Size = new System.Drawing.Size(112, 17);
|
||||
this.flag_0790.TabIndex = 16;
|
||||
this.flag_0790.Text = "Zygarde Defeated";
|
||||
this.flag_0790.UseVisualStyleBackColor = true;
|
||||
this.flag_0790.Click += new System.EventHandler(this.toggleFlag);
|
||||
//
|
||||
// GB_Misc
|
||||
//
|
||||
this.GB_Misc.Controls.Add(this.flag_0289);
|
||||
this.GB_Misc.Controls.Add(this.flag_0288);
|
||||
this.GB_Misc.Controls.Add(this.flag_0287);
|
||||
this.GB_Misc.Controls.Add(this.flag_0294);
|
||||
this.GB_Misc.Controls.Add(this.flag_0293);
|
||||
this.GB_Misc.Controls.Add(this.flag_0292);
|
||||
this.GB_Misc.Controls.Add(this.flag_0291);
|
||||
this.GB_Misc.Controls.Add(this.flag_0290);
|
||||
this.GB_Misc.Controls.Add(this.flag_0675);
|
||||
this.GB_Misc.Controls.Add(this.flag_0286);
|
||||
this.GB_Misc.Controls.Add(this.flag_0285);
|
||||
this.GB_Misc.Location = new System.Drawing.Point(287, 12);
|
||||
this.GB_Misc.Name = "GB_Misc";
|
||||
this.GB_Misc.Size = new System.Drawing.Size(154, 215);
|
||||
this.GB_Misc.TabIndex = 17;
|
||||
this.GB_Misc.TabStop = false;
|
||||
this.GB_Misc.Text = "Misc";
|
||||
//
|
||||
// flag_0289
|
||||
//
|
||||
this.flag_0289.AutoSize = true;
|
||||
this.flag_0289.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||
this.flag_0289.Location = new System.Drawing.Point(6, 79);
|
||||
this.flag_0289.Name = "flag_0289";
|
||||
this.flag_0289.Size = new System.Drawing.Size(94, 17);
|
||||
this.flag_0289.TabIndex = 25;
|
||||
this.flag_0289.Text = "Multi Statuette";
|
||||
this.flag_0289.UseVisualStyleBackColor = true;
|
||||
this.flag_0289.Click += new System.EventHandler(this.toggleFlag);
|
||||
//
|
||||
// flag_0288
|
||||
//
|
||||
this.flag_0288.AutoSize = true;
|
||||
this.flag_0288.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||
this.flag_0288.Location = new System.Drawing.Point(6, 64);
|
||||
this.flag_0288.Name = "flag_0288";
|
||||
this.flag_0288.Size = new System.Drawing.Size(112, 17);
|
||||
this.flag_0288.TabIndex = 24;
|
||||
this.flag_0288.Text = "Rotation Statuette";
|
||||
this.flag_0288.UseVisualStyleBackColor = true;
|
||||
this.flag_0288.Click += new System.EventHandler(this.toggleFlag);
|
||||
//
|
||||
// flag_0287
|
||||
//
|
||||
this.flag_0287.AutoSize = true;
|
||||
this.flag_0287.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||
this.flag_0287.Location = new System.Drawing.Point(6, 49);
|
||||
this.flag_0287.Name = "flag_0287";
|
||||
this.flag_0287.Size = new System.Drawing.Size(103, 17);
|
||||
this.flag_0287.TabIndex = 23;
|
||||
this.flag_0287.Text = "Triples Statuette";
|
||||
this.flag_0287.UseVisualStyleBackColor = true;
|
||||
this.flag_0287.Click += new System.EventHandler(this.toggleFlag);
|
||||
//
|
||||
// flag_0294
|
||||
//
|
||||
this.flag_0294.AutoSize = true;
|
||||
this.flag_0294.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||
this.flag_0294.Location = new System.Drawing.Point(6, 159);
|
||||
this.flag_0294.Name = "flag_0294";
|
||||
this.flag_0294.Size = new System.Drawing.Size(128, 17);
|
||||
this.flag_0294.TabIndex = 22;
|
||||
this.flag_0294.Text = "Super Multi Unlocked";
|
||||
this.flag_0294.UseVisualStyleBackColor = true;
|
||||
this.flag_0294.Click += new System.EventHandler(this.toggleFlag);
|
||||
//
|
||||
// flag_0293
|
||||
//
|
||||
this.flag_0293.AutoSize = true;
|
||||
this.flag_0293.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||
this.flag_0293.Location = new System.Drawing.Point(6, 144);
|
||||
this.flag_0293.Name = "flag_0293";
|
||||
this.flag_0293.Size = new System.Drawing.Size(146, 17);
|
||||
this.flag_0293.TabIndex = 21;
|
||||
this.flag_0293.Text = "Super Rotation Unlocked";
|
||||
this.flag_0293.UseVisualStyleBackColor = true;
|
||||
this.flag_0293.Click += new System.EventHandler(this.toggleFlag);
|
||||
//
|
||||
// flag_0292
|
||||
//
|
||||
this.flag_0292.AutoSize = true;
|
||||
this.flag_0292.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||
this.flag_0292.Location = new System.Drawing.Point(6, 129);
|
||||
this.flag_0292.Name = "flag_0292";
|
||||
this.flag_0292.Size = new System.Drawing.Size(137, 17);
|
||||
this.flag_0292.TabIndex = 20;
|
||||
this.flag_0292.Text = "Super Triples Unlocked";
|
||||
this.flag_0292.UseVisualStyleBackColor = true;
|
||||
this.flag_0292.Click += new System.EventHandler(this.toggleFlag);
|
||||
//
|
||||
// flag_0291
|
||||
//
|
||||
this.flag_0291.AutoSize = true;
|
||||
this.flag_0291.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||
this.flag_0291.Location = new System.Drawing.Point(6, 114);
|
||||
this.flag_0291.Name = "flag_0291";
|
||||
this.flag_0291.Size = new System.Drawing.Size(145, 17);
|
||||
this.flag_0291.TabIndex = 19;
|
||||
this.flag_0291.Text = "Super Doubles Unlocked";
|
||||
this.flag_0291.UseVisualStyleBackColor = true;
|
||||
this.flag_0291.Click += new System.EventHandler(this.toggleFlag);
|
||||
//
|
||||
// flag_0290
|
||||
//
|
||||
this.flag_0290.AutoSize = true;
|
||||
this.flag_0290.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||
this.flag_0290.Location = new System.Drawing.Point(6, 99);
|
||||
this.flag_0290.Name = "flag_0290";
|
||||
this.flag_0290.Size = new System.Drawing.Size(140, 17);
|
||||
this.flag_0290.TabIndex = 18;
|
||||
this.flag_0290.Text = "Super Singles Unlocked";
|
||||
this.flag_0290.UseVisualStyleBackColor = true;
|
||||
this.flag_0290.Click += new System.EventHandler(this.toggleFlag);
|
||||
//
|
||||
// flag_0675
|
||||
//
|
||||
this.flag_0675.AutoSize = true;
|
||||
this.flag_0675.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||
this.flag_0675.Location = new System.Drawing.Point(6, 182);
|
||||
this.flag_0675.Name = "flag_0675";
|
||||
this.flag_0675.Size = new System.Drawing.Size(119, 17);
|
||||
this.flag_0675.TabIndex = 17;
|
||||
this.flag_0675.Text = "50: Beat Chatelaine";
|
||||
this.flag_0675.UseVisualStyleBackColor = true;
|
||||
this.flag_0675.Click += new System.EventHandler(this.toggleFlag);
|
||||
//
|
||||
// flag_0286
|
||||
//
|
||||
this.flag_0286.AutoSize = true;
|
||||
this.flag_0286.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||
this.flag_0286.Location = new System.Drawing.Point(6, 34);
|
||||
this.flag_0286.Name = "flag_0286";
|
||||
this.flag_0286.Size = new System.Drawing.Size(111, 17);
|
||||
this.flag_0286.TabIndex = 16;
|
||||
this.flag_0286.Text = "Doubles Statuette";
|
||||
this.flag_0286.UseVisualStyleBackColor = true;
|
||||
this.flag_0286.Click += new System.EventHandler(this.toggleFlag);
|
||||
//
|
||||
// flag_0285
|
||||
//
|
||||
this.flag_0285.AutoSize = true;
|
||||
this.flag_0285.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||
this.flag_0285.Location = new System.Drawing.Point(6, 19);
|
||||
this.flag_0285.Name = "flag_0285";
|
||||
this.flag_0285.Size = new System.Drawing.Size(106, 17);
|
||||
this.flag_0285.TabIndex = 15;
|
||||
this.flag_0285.Text = "Singles Statuette";
|
||||
this.flag_0285.UseVisualStyleBackColor = true;
|
||||
this.flag_0285.Click += new System.EventHandler(this.toggleFlag);
|
||||
//
|
||||
// flag_2546
|
||||
//
|
||||
this.flag_2546.AutoSize = true;
|
||||
this.flag_2546.Location = new System.Drawing.Point(13, 112);
|
||||
this.flag_2546.Name = "flag_2546";
|
||||
this.flag_2546.Size = new System.Drawing.Size(114, 17);
|
||||
this.flag_2546.TabIndex = 18;
|
||||
this.flag_2546.Text = "Pokédex Obtained";
|
||||
this.flag_2546.UseVisualStyleBackColor = true;
|
||||
this.flag_2546.Click += new System.EventHandler(this.toggleFlag);
|
||||
//
|
||||
// L_Stats
|
||||
//
|
||||
this.L_Stats.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.L_Stats.AutoSize = true;
|
||||
this.L_Stats.Location = new System.Drawing.Point(290, 230);
|
||||
this.L_Stats.Name = "L_Stats";
|
||||
this.L_Stats.Size = new System.Drawing.Size(85, 13);
|
||||
this.L_Stats.TabIndex = 32;
|
||||
this.L_Stats.Text = "Event Constants";
|
||||
//
|
||||
// CB_Stats
|
||||
//
|
||||
this.CB_Stats.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.CB_Stats.DropDownHeight = 156;
|
||||
this.CB_Stats.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.CB_Stats.DropDownWidth = 180;
|
||||
this.CB_Stats.FormattingEnabled = true;
|
||||
this.CB_Stats.IntegralHeight = false;
|
||||
this.CB_Stats.Location = new System.Drawing.Point(293, 246);
|
||||
this.CB_Stats.Name = "CB_Stats";
|
||||
this.CB_Stats.Size = new System.Drawing.Size(94, 21);
|
||||
this.CB_Stats.TabIndex = 31;
|
||||
this.CB_Stats.SelectedIndexChanged += new System.EventHandler(this.changeConstantIndex);
|
||||
//
|
||||
// L_Value
|
||||
//
|
||||
this.L_Value.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.L_Value.AutoSize = true;
|
||||
this.L_Value.Location = new System.Drawing.Point(290, 270);
|
||||
this.L_Value.Name = "L_Value";
|
||||
this.L_Value.Size = new System.Drawing.Size(34, 13);
|
||||
this.L_Value.TabIndex = 30;
|
||||
this.L_Value.Text = "Value";
|
||||
//
|
||||
// MT_Stat
|
||||
//
|
||||
this.MT_Stat.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.MT_Stat.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.MT_Stat.Location = new System.Drawing.Point(349, 270);
|
||||
this.MT_Stat.Mask = "00000";
|
||||
this.MT_Stat.Name = "MT_Stat";
|
||||
this.MT_Stat.Size = new System.Drawing.Size(38, 20);
|
||||
this.MT_Stat.TabIndex = 29;
|
||||
this.MT_Stat.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
|
||||
//
|
||||
// SAV_EventFlagsXY
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(449, 342);
|
||||
this.Controls.Add(this.L_Stats);
|
||||
this.Controls.Add(this.CB_Stats);
|
||||
this.Controls.Add(this.L_Value);
|
||||
this.Controls.Add(this.MT_Stat);
|
||||
this.Controls.Add(this.flag_2546);
|
||||
this.Controls.Add(this.GB_Misc);
|
||||
this.Controls.Add(this.GB_Rebattle);
|
||||
this.Controls.Add(this.GB_Researcher);
|
||||
this.Controls.Add(this.flag_2239);
|
||||
this.Controls.Add(this.flag_2238);
|
||||
this.Controls.Add(this.flag_2237);
|
||||
this.Controls.Add(this.B_Save);
|
||||
this.Controls.Add(this.flag_0005);
|
||||
this.Controls.Add(this.flag_0004);
|
||||
this.Controls.Add(this.flag_0003);
|
||||
this.Controls.Add(this.flag_0002);
|
||||
this.Controls.Add(this.flag_0001);
|
||||
this.Controls.Add(this.GB_FlagStatus);
|
||||
this.Controls.Add(this.B_Cancel);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "SAV_EventFlagsXY";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Event Flag Editor";
|
||||
this.GB_FlagStatus.ResumeLayout(false);
|
||||
this.GB_FlagStatus.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nud)).EndInit();
|
||||
this.GB_Researcher.ResumeLayout(false);
|
||||
this.GB_Researcher.PerformLayout();
|
||||
this.GB_Rebattle.ResumeLayout(false);
|
||||
this.GB_Rebattle.PerformLayout();
|
||||
this.GB_Misc.ResumeLayout(false);
|
||||
this.GB_Misc.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.CheckBox CHK_CustomFlag;
|
||||
private System.Windows.Forms.Button B_Cancel;
|
||||
private System.Windows.Forms.GroupBox GB_FlagStatus;
|
||||
private System.Windows.Forms.Label L_Flag;
|
||||
private System.Windows.Forms.CheckBox flag_0001;
|
||||
private System.Windows.Forms.CheckBox flag_0002;
|
||||
private System.Windows.Forms.CheckBox flag_0003;
|
||||
private System.Windows.Forms.CheckBox flag_0004;
|
||||
private System.Windows.Forms.CheckBox flag_0005;
|
||||
private System.Windows.Forms.NumericUpDown nud;
|
||||
private System.Windows.Forms.Button B_Save;
|
||||
private System.Windows.Forms.CheckBox flag_2237;
|
||||
private System.Windows.Forms.CheckBox flag_2238;
|
||||
private System.Windows.Forms.CheckBox flag_2239;
|
||||
private System.Windows.Forms.GroupBox GB_Researcher;
|
||||
private System.Windows.Forms.Label L_UnSet;
|
||||
private System.Windows.Forms.Label L_IsSet;
|
||||
private System.Windows.Forms.TextBox TB_NewSAV;
|
||||
private System.Windows.Forms.TextBox TB_OldSAV;
|
||||
private System.Windows.Forms.TextBox TB_UnSet;
|
||||
private System.Windows.Forms.TextBox TB_IsSet;
|
||||
private System.Windows.Forms.Button B_LoadNew;
|
||||
private System.Windows.Forms.Button B_LoadOld;
|
||||
private System.Windows.Forms.CheckBox flag_0963;
|
||||
private System.Windows.Forms.CheckBox flag_0115;
|
||||
private System.Windows.Forms.GroupBox GB_Rebattle;
|
||||
private System.Windows.Forms.CheckBox flag_0114;
|
||||
private System.Windows.Forms.CheckBox flag_0790;
|
||||
private System.Windows.Forms.GroupBox GB_Misc;
|
||||
private System.Windows.Forms.CheckBox flag_0289;
|
||||
private System.Windows.Forms.CheckBox flag_0288;
|
||||
private System.Windows.Forms.CheckBox flag_0287;
|
||||
private System.Windows.Forms.CheckBox flag_0294;
|
||||
private System.Windows.Forms.CheckBox flag_0293;
|
||||
private System.Windows.Forms.CheckBox flag_0292;
|
||||
private System.Windows.Forms.CheckBox flag_0291;
|
||||
private System.Windows.Forms.CheckBox flag_0290;
|
||||
private System.Windows.Forms.CheckBox flag_0675;
|
||||
private System.Windows.Forms.CheckBox flag_0286;
|
||||
private System.Windows.Forms.CheckBox flag_0285;
|
||||
private System.Windows.Forms.CheckBox flag_2546;
|
||||
private System.Windows.Forms.Label L_Stats;
|
||||
private System.Windows.Forms.ComboBox CB_Stats;
|
||||
private System.Windows.Forms.Label L_Value;
|
||||
private System.Windows.Forms.MaskedTextBox MT_Stat;
|
||||
}
|
||||
}
|
||||
@@ -1,230 +0,0 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace PKHeX
|
||||
{
|
||||
public partial class SAV_EventFlagsXY : Form
|
||||
{
|
||||
public SAV_EventFlagsXY()
|
||||
{
|
||||
InitializeComponent();
|
||||
Util.TranslateInterface(this, Main.curlanguage);
|
||||
|
||||
AllowDrop = true;
|
||||
DragEnter += tabMain_DragEnter;
|
||||
DragDrop += tabMain_DragDrop;
|
||||
Setup();
|
||||
|
||||
nud.Text = "0"; // Prompts an update for flag 0.
|
||||
// No Volcanic Ash in X/Y
|
||||
}
|
||||
private bool setup = true;
|
||||
private CheckBox[] chka;
|
||||
private readonly bool[] flags = new bool[3072];
|
||||
private readonly ushort[] Constants = new ushort[(Main.SAV.EventFlag - Main.SAV.EventConst) / 2];
|
||||
private void B_Cancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
private void B_Save_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Gather Updated Flags
|
||||
foreach (CheckBox flag in chka)
|
||||
flags[getFlagNum(flag)] = flag.Checked;
|
||||
|
||||
byte[] data = new byte[flags.Length / 8];
|
||||
|
||||
for (int i = 0; i < flags.Length; i++)
|
||||
if (flags[i])
|
||||
data[i / 8] |= (byte)(1 << i % 8);
|
||||
|
||||
Array.Copy(data, 0, Main.SAV.Data, Main.SAV.EventFlag, 0x180);
|
||||
|
||||
// No Volcanic Ash in X/Y
|
||||
|
||||
|
||||
// Copy back Constants
|
||||
changeConstantIndex(null, null); // Trigger Saving
|
||||
for (int i = 0; i < Constants.Length; i++)
|
||||
Array.Copy(BitConverter.GetBytes(Constants[i]), 0, Main.SAV.Data, Main.SAV.EventConst + 2 * i, 2);
|
||||
|
||||
Close();
|
||||
}
|
||||
private void Setup()
|
||||
{
|
||||
// Fill Bit arrays
|
||||
|
||||
chka = new[] {
|
||||
flag_0001,flag_0002,flag_0003,flag_0004,flag_0005,
|
||||
flag_2237,flag_2238,flag_2239,
|
||||
flag_0115,flag_0963, // Mewtwo
|
||||
flag_0114,flag_0790, // Zygarde
|
||||
flag_0285,flag_0286,flag_0287,flag_0288,flag_0289, // Statuettes
|
||||
flag_0290,flag_0291,flag_0292,flag_0293,flag_0294, // Super Unlocks
|
||||
flag_0675, // Chatelaine 50
|
||||
flag_2546, // Pokedex
|
||||
};
|
||||
byte[] data = new byte[0x180];
|
||||
Array.Copy(Main.SAV.Data, Main.SAV.EventFlag, data, 0, 0x180);
|
||||
BitArray BitRegion = new BitArray(data);
|
||||
BitRegion.CopyTo(flags, 0);
|
||||
|
||||
// Setup Event Constant Editor
|
||||
CB_Stats.Items.Clear();
|
||||
for (int i = 0; i < Constants.Length; i += 2)
|
||||
{
|
||||
CB_Stats.Items.Add($"0x{(i/2).ToString("X2")}");
|
||||
Constants[i / 2] = BitConverter.ToUInt16(Main.SAV.Data, Main.SAV.EventConst + i);
|
||||
}
|
||||
CB_Stats.SelectedIndex = 0;
|
||||
|
||||
// Populate Flags
|
||||
setup = true;
|
||||
popFlags();
|
||||
}
|
||||
private void popFlags()
|
||||
{
|
||||
if (!setup) return;
|
||||
foreach (CheckBox flag in chka)
|
||||
flag.Checked = flags[getFlagNum(flag)];
|
||||
|
||||
changeCustomFlag(null, null);
|
||||
}
|
||||
|
||||
private int getFlagNum(CheckBox chk)
|
||||
{
|
||||
try
|
||||
{
|
||||
string source = chk.Name;
|
||||
return Convert.ToInt32(source.Substring(Math.Max(0, source.Length - 4)));
|
||||
}
|
||||
catch { return 0; }
|
||||
}
|
||||
private void changeCustomBool(object sender, EventArgs e)
|
||||
{
|
||||
flags[(int)nud.Value] = CHK_CustomFlag.Checked;
|
||||
popFlags();
|
||||
}
|
||||
private void changeCustomFlag(object sender, EventArgs e)
|
||||
{
|
||||
int flag = (int)nud.Value;
|
||||
if (flag >= 3072)
|
||||
{
|
||||
CHK_CustomFlag.Checked = false;
|
||||
CHK_CustomFlag.Enabled = false;
|
||||
nud.BackColor = Color.Red;
|
||||
}
|
||||
else
|
||||
{
|
||||
CHK_CustomFlag.Enabled = true;
|
||||
nud.BackColor = Main.defaultControlWhite;
|
||||
CHK_CustomFlag.Checked = flags[flag];
|
||||
}
|
||||
}
|
||||
private void changeCustomFlag(object sender, KeyEventArgs e)
|
||||
{
|
||||
changeCustomFlag(null, (EventArgs)e);
|
||||
}
|
||||
|
||||
private void toggleFlag(object sender, EventArgs e)
|
||||
{
|
||||
flags[getFlagNum((CheckBox)sender)] = ((CheckBox)sender).Checked;
|
||||
changeCustomFlag(sender, e);
|
||||
}
|
||||
|
||||
private void changeSAV(object sender, EventArgs e)
|
||||
{
|
||||
if (TB_NewSAV.Text.Length > 0 && TB_OldSAV.Text.Length > 0)
|
||||
{
|
||||
diffSaves();
|
||||
}
|
||||
}
|
||||
private void diffSaves()
|
||||
{
|
||||
BitArray oldBits = new BitArray(oldFlags);
|
||||
BitArray newBits = new BitArray(newFlags);
|
||||
|
||||
string tbIsSet = "";
|
||||
string tbUnSet = "";
|
||||
for (int i = 0; i < oldBits.Length; i++)
|
||||
{
|
||||
if (oldBits[i] == newBits[i]) continue;
|
||||
if (newBits[i])
|
||||
tbIsSet += i.ToString("0000") + ",";
|
||||
else
|
||||
tbUnSet += i.ToString("0000") + ",";
|
||||
}
|
||||
TB_IsSet.Text = tbIsSet;
|
||||
TB_UnSet.Text = tbUnSet;
|
||||
|
||||
if (DialogResult.Yes != Util.Prompt(MessageBoxButtons.YesNo, "Copy Event Constant diff to clipboard?"))
|
||||
return;
|
||||
|
||||
string r = "";
|
||||
for (int i = 0; i < newConst.Length; i += 2)
|
||||
{
|
||||
ushort oldval = BitConverter.ToUInt16(oldConst, i);
|
||||
ushort newval = BitConverter.ToUInt16(oldConst, i);
|
||||
if (oldval != newval)
|
||||
r += $"0x{(i/2).ToString("X2")}: {oldval}->{newval}{Environment.NewLine}";
|
||||
}
|
||||
Clipboard.SetText(r);
|
||||
}
|
||||
private byte[] oldFlags = new byte[0x180];
|
||||
private byte[] newFlags = new byte[0x180];
|
||||
private byte[] oldConst = new byte[Main.SAV.EventFlag - Main.SAV.EventConst];
|
||||
private byte[] newConst = new byte[Main.SAV.EventFlag - Main.SAV.EventConst];
|
||||
private void openSAV(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog ofd = new OpenFileDialog();
|
||||
if (ofd.ShowDialog() == DialogResult.OK)
|
||||
loadSAV(sender, ofd.FileName);
|
||||
}
|
||||
private void loadSAV(object sender, string path)
|
||||
{
|
||||
FileInfo fi = new FileInfo(path);
|
||||
if (fi.Length != SAV6.SIZE_XY)
|
||||
{
|
||||
Util.Error("Invalid SAV Size", string.Format("File Size: 0x{1} ({0} bytes)", fi.Length, fi.Length.ToString("X5")), "File Loaded: " + path);
|
||||
return;
|
||||
}
|
||||
|
||||
byte[] data = File.ReadAllBytes(path);
|
||||
if (sender == B_LoadOld)
|
||||
{
|
||||
oldFlags = data.Skip(Main.SAV.EventFlag).Take(0x180).ToArray();
|
||||
oldConst = data.Skip(Main.SAV.EventConst).Take(Constants.Length * 2).ToArray();
|
||||
TB_OldSAV.Text = path;
|
||||
}
|
||||
else
|
||||
{
|
||||
newFlags = data.Skip(Main.SAV.EventFlag).Take(0x180).ToArray();
|
||||
newConst = data.Skip(Main.SAV.EventConst).Take(Constants.Length * 2).ToArray();
|
||||
TB_NewSAV.Text = path;
|
||||
}
|
||||
}
|
||||
private int entry = -1;
|
||||
private void changeConstantIndex(object sender, EventArgs e)
|
||||
{
|
||||
if (entry > -1) // Set Entry
|
||||
Constants[entry] = (ushort)Math.Min(Util.ToUInt32(MT_Stat.Text), 0xFFFF);
|
||||
|
||||
entry = CB_Stats.SelectedIndex; // Get Entry
|
||||
MT_Stat.Text = Constants[entry].ToString();
|
||||
}
|
||||
// Drag & Drop Events
|
||||
private void tabMain_DragEnter(object sender, DragEventArgs e)
|
||||
{
|
||||
if (e.Data.GetDataPresent(DataFormats.FileDrop)) e.Effect = DragDropEffects.Copy;
|
||||
}
|
||||
private void tabMain_DragDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
|
||||
loadSAV(Util.Prompt(MessageBoxButtons.YesNo, "FlagDiff Researcher:", "Yes: Old Save" + Environment.NewLine + "No: New Save") == DialogResult.Yes ? B_LoadOld : B_LoadNew, files[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,216 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<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>
|
||||
AAABAAIAEBAAAAEAIABoBAAAJgAAACAgAAABACAAqBAAAI4EAAAoAAAAEAAAACAAAAABACAAAAAAAAAE
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAIyMjAQAAAAALCwsPJiYmJysrKycqKionKSkpJykpKScpKSknKioqJyoq
|
||||
KicrKysnJycnJw0ODQ8AAAAAJiYmAQAAAABpaWlHq6ur17+/v+6+vr7svr6+7b6+vu2+vr7tvr6+7b6+
|
||||
vu2+vr7tvr6+7L+/v+6rq6vXampqSAAAAAAoKSgXvr++3eLi4v/g4OD94eHh/+Hh4f/i4uL/4uLi/+Li
|
||||
4v/i4uL/4eHh/+Dh4P/g4OD94uLi/7+/v90sLCwXfn5+PNna2frg4OD/39/f/uHh4f7h4eH+39/f/uDg
|
||||
4P7g4OD+39/f/uHh4f7h4OH+39/f/t/g3//a2tr6g4ODPoOCgz7X19f64+Pj/+Li4v7k5OT/4+Tj//Ly
|
||||
8v/19fX/9PT0//T09P/k5OT/5OTk/+Pj4/7j4+P/19jX+4qLikCDhIM+2tra++Xl5f/k5eT+5OTk//Lz
|
||||
8v+urq7/RUVF/z4+Pv+Zmpn/8fHx/+Xm5f/k5eT+5eXl/9ra2vyLi4tAhYWFPuXm5vvx8vP/7+/w/v//
|
||||
//+sra3/AgIC/15eXv9tbG3/BQUF/4yMjP//////7+/w/vHy8//l5ub8jY2NQC4uLD5LS0f7UFBL/09P
|
||||
Sv5YWVP/FBUS/29wcP///////////5SUlP8PDw//U1NO/1BQS/5PT0r/S0tH/DIyMEAAAAs+AAAM+wAA
|
||||
Dv8AAA/+AwMS/wAAAP+UlJX///////////+3t7n/AAAA/wAAD/8BAQ/+AAAO/wAADPwCAg5ABARSPgoK
|
||||
k/sNDab/DQ2o/hAQvP8CAmj/IiIW/7Kzrv/Cw8D/NDQm/wAATf8QELz/DQ2q/gwMp/8LC5T8Dg5bQAUF
|
||||
Xj4KCpz7DQ2u/w0NsP4NDbX/Dw+//wUFYf8CAhL/AwMP/wMDTf8ODrj/Dg64/w0NsP4MDK7/Cwud/A8P
|
||||
aEEGBmU9DAyl+w4Otf8ODrf+Dw+6/xAQvv8TE8v/EhK+/xAQvP8TE8v/EBDA/w8Puf8PD7f+Dg61/w0N
|
||||
pvsREW9ACAhtQA8PsfsTE77/ExO//xQUwP8UFML/FBTD/xUVyP8WFsn/FRXE/xQUw/8UFMH/ExO//xMT
|
||||
vv8QELL7ERF3QxkZdCgXF771ExPH/xUVyPwVFcn9FhbL/RcXzP0XF8z9FxfM/RcXy/0XF8v9FhbJ/RUV
|
||||
yPwTE8f/Fxe+9RkZdykAAAAAIyOtghsbx/8ZGcj+GRnJ/xoayf8aGsn/GhrK/xoayv8aGsn/GhrJ/xkZ
|
||||
yf8ZGcj+GxvH/yMjrYQAAAAAAADHAQAAAAAzM51FLCyscCoqrGwqKqxtKSmsbSoqrG0qKqxtKSmsbSoq
|
||||
rG0qKqxsLCyscDMznUUAAAAAAAAAAP//AADAAwAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIAB
|
||||
AACAAQAAgAEAAIABAACAAQAAgAEAAP//AAAoAAAAIAAAAEAAAAABACAAAAAAAAAQAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKysrCR0dHSMWFhY3GBgYORgYGDkYGBg5GBgYORgY
|
||||
GDkYGBg5GBgYORgYGDkYGBg5GBgYORgYGDkYGBg5GBgYORgYGDkYGBg5GBgYORgYGDkYGBg5FxcXNx4e
|
||||
HiQuLi4JAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASEhIARYWFis7OzuVkJCQ2ampqeqqqqrsqqqq7Kqq
|
||||
quyqqqrsqqqq7Kqqquyqqqrsqqqq7Kqqquyqqqrsqqqq7Kqqquyqqqrsqqqq7Kqqquyqqqrsqqqq7Kqq
|
||||
quypqanqkZGR2j09PZcXFxcsUFBQAQAAAAAAAAAAAAAAAAAAAAASEhIuhISEytvb2/7W1tb/19fX/9jY
|
||||
2P/Y2Nj/2NjY/9jY2P/Y2Nj/2NjY/9nZ2f/Z2dn/2dnZ/9nZ2f/Z2dn/2dnZ/9nZ2f/Y2Nj/2NjY/9jY
|
||||
2P/Y2Nj/2NjY/9fX1//W1tb/29vb/oeHh8sTExMvAAAAAAAAAAAAAAAAPDw8DGtra6zZ2dn/2dnZ/9ra
|
||||
2v/b29v/29vb/9vb2//c3Nz/3Nzc/9zc3P/c3Nz/3d3d/93d3f/d3d3/3d3d/93d3f/d3d3/3Nzc/9zc
|
||||
3P/c3Nz/3Nzc/9vb2//b29v/29vb/9ra2v/Z2dn/2dnZ/21tba5DQ0MNAAAAAAAAAAAiIiIx1NXU9tna
|
||||
2f/c3Nz/3d3d/93e3f/e3t7/3t7e/9/f3//f39//39/f/9/g3//g4OD/4ODg/+Dg4P/g4OD/4ODg/+Dg
|
||||
4P/g4OD/39/f/9/f3//f39//3t/e/97e3v/d3t3/3d3d/9zc3P/Z2tn/1dXV9icnJzMAAAAAAAAAAFhZ
|
||||
WFzf4N//3Nzc/97e3v/f39//39/f/9/g3//g4OD/4ODg/+Hh4f/h4eH/4eHh/+Li4v/i4uL/4uLi/+Li
|
||||
4v/i4uL/4uLi/+Hi4f/h4eH/4eHh/+Dg4P/g4OD/3+Df/9/f3//f39//3t7e/9zc3P/f39//XV1dXQAA
|
||||
AAAAAAAAZmZmZdvc2//e3t7/3+Df/+Dg4P/g4eD/4eHh/+Hi4f/i4uL/4uPi/+Pj4//j4+P/5OTk/+Tk
|
||||
5P/k5OT/5OTk/+Tk5P/k5OT/4+Pj/+Pj4//j4+P/4uLi/+Li4v/h4eH/4eHh/+Dg4P/f4N//3t7e/9vb
|
||||
2/9wcHBoAAAAAAAAAABoaGhl3d3d/9/f3//h4eH/4eLh/+Li4v/j4+P/4+Pj/+Tk5P/k5OT/5eXl/+Xl
|
||||
5f/l5uX/5ubm/+bm5v/m5ub/5ubm/+bm5v/l5eX/5eXl/+Tk5P/k5OT/4+Pj/+Pj4//i4uL/4uLi/+Hh
|
||||
4f/f39//3N3c/3Nzc2kAAAAAAAAAAGhoaGXe3t7/4ODg/+Li4v/j4+P/4+Pj/+Tk5P/l5eX/5eXl/+bm
|
||||
5v/m5+b/5+fn/+fn5//n6Of/6Ojo/+jo6P/o6Oj/5+fn/+fn5//n5+f/5ubm/+Xl5f/l5eX/5OTk/+Pk
|
||||
4//j4+P/4uLi/+Dg4P/e3t7/c3NzaQAAAAAAAAAAaGhoZd/g3//i4uL/5OTk/+Tl5P/l5eX/5ebl/+bn
|
||||
5v/n5+f/5+jn/+jp6P/p6en/7Ozs/8LCwv+Tk5P/ioqK/66urv/o6ej/6enp/+jp6P/o6Oj/5+jn/+bn
|
||||
5v/m5ub/5ebl/+Tl5P/k5OT/4uLi/9/g3/9zdHNpAAAAAAAAAABoaWhl4eLh/+Pk4//m5ub/5ubm/+fn
|
||||
5//n6Of/6Ojo/+np6f/p6un/6urq/8bGxv8yMjL/AAAA/wAAAP8AAAD/AAAA/xMTE/+ZmZn/7Ozs/+rq
|
||||
6v/p6en/6Ojo/+jo6P/n5+f/5ubm/+bm5v/k5OT/4eHh/3R0dGkAAAAAAAAAAGhpaGXj4+P/5eXl/+fn
|
||||
5//n6Of/6Ojo/+np6f/q6ur/6urq/+vr6//Dw8P/DAwM/wAAAP8AAAD/Gxsb/ygoKP8BAQH/AAAA/wAA
|
||||
AP+FhYX/7O3s/+rr6v/q6ur/6enp/+jo6P/o6Oj/5+fn/+Xl5f/i4+L/dHR0aQAAAAAAAAAAYWFhZeTl
|
||||
5P/m5+b/6Ono/+np6f/p6un/6uvq/+vr6//s7Oz/7e7t/ycnJ/8AAAD/Ghoa/7S0tP/m5ub/5OTk/9HR
|
||||
0f9GRkb/AAAA/wICAv/IyMj/7Ozs/+vs6//q6+r/6urq/+nq6f/o6ej/5+fn/+Tk5P9sbGxpAAAAAAAA
|
||||
AAA9Pj1lj4+P/5OTk/+VlZX/lpaW/5eXl/+YmJj/mZmZ/5qamv92dnb/AAAA/wEBAf+/wL//3Nzc/+Tk
|
||||
5P/l5eX/3d3d/+Li4v8mJib/AAAA/0ZGRv+ampr/mZmZ/5iYmP+Xl5f/lpaW/5WVlf+Tk5P/j4+P/0ZG
|
||||
RmoAAAAAAAAAAAwMDGUAAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/Nzc3/+fn
|
||||
5//q6ur/7O3s/+zt7P/v7+//39/f/4WFhf8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
|
||||
AP8AAAD/EBAQagAAAAAAAAAAAwMHZQAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
|
||||
AP9NTU3/5ufm//Lz8v/z9PP/8/Tz//X19f/l5eX/nZ2d/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
|
||||
AP8AAAD/AAAA/wAAAP8GBgpqAAAAAAAAAAAAABZlAQEk/wEBJ/8CAin/AgIq/wICKv8CAiv/AgIs/wIC
|
||||
LP8BAR3/AAAA/xwcHP/w8PD/6+zr//r6+v/6+vr/9PT0/+vr6/9lZWX/AAAA/wAAD/8CAi3/AgIs/wIC
|
||||
K/8CAir/AgIq/wICKf8BASf/AQEl/wUFG2oAAAAAAAAAAAICQGUGBpL/Bwec/wgIo/8JCaf/CQmq/wkJ
|
||||
rf8JCa//Cgqz/wkJqP8AAAL/AAAA/4CAgP/y8/L/6+zr/+3t7f/u7u7/xMTE/wcHB/8AAAD/BgZz/woK
|
||||
s/8JCbD/CQmt/wkJqv8JCaj/CAik/wcHnf8HB5P/Dg5MagAAAAAAAAAAAwNHZQgIk/8JCZ3/Cgqj/wsL
|
||||
p/8LC6n/Cwus/wsLr/8MDLL/DAy2/wYGW/8AAAD/AAAA/1JSUv+sraz/tra2/3h4eP8KCgr/AAAA/wIC
|
||||
Iv8MDLb/DAyy/wsLsP8LC63/Cwuq/wsLp/8KCqT/CQmd/wgIk/8PD1VrAAAAAAAAAAAEBE1lCQmY/woK
|
||||
ov8LC6j/DAyr/wwMrf8MDLD/DAyy/w0Ntf8NDbf/Dg67/wUFSv8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
|
||||
AP8CAiH/DQ2q/w0NuP8NDbX/DQ2z/wwMsP8MDK7/DAyr/wsLqP8KCqL/CQmZ/xAQWmsAAAAAAAAAAAQE
|
||||
UGUKCp7/Cwum/wwMrP8NDa//DQ2w/w0Ns/8ODrX/Dg63/w4Ouf8ODrv/Dw/A/wwMiv8FBTj/AAAG/wAA
|
||||
AP8DAyb/CQls/w8Pu/8PD7z/Dg66/w4OuP8ODrX/DQ2z/w0Nsf8NDa//DAys/wsLp/8KCp7/ERFeawAA
|
||||
AAAAAAAABQVTZQsLpP8MDKv/DQ2w/w4Os/8ODrT/Dg62/w8PuP8PD7r/Dw+8/w8Pvf8QEL//EBDA/xER
|
||||
w/8SEsn/ERHJ/xERxf8QEMD/EBC//w8Pvv8PD7z/Dw+6/w8PuP8ODrf/Dg61/w4Os/8NDbH/DAyr/wsL
|
||||
pP8SEmFrAAAAAAAAAAAGBlZlDAyq/w4OsP8PD7X/Dw+3/w8PuP8QELr/EBC7/xAQvf8REb7/ERHA/xER
|
||||
wf8REcL/EhLC/xISw/8SEsP/EhLC/xERwv8REcH/ERHA/xERvv8QEL3/EBC7/xAQuv8QELj/Dw+3/w8P
|
||||
tf8ODrD/DAyq/xMTZWsAAAAAAAAAAAcHWmUODrD/EBC2/xERuv8REbz/ERG9/xISvv8SEr//EhLA/xMT
|
||||
wf8TE8P/ExPD/xMTxP8TE8X/FBTF/xQUxf8UFMX/ExPE/xMTxP8TE8P/ExPC/xISwf8SEr//EhK+/xER
|
||||
vf8REbz/ERG6/xAQtv8ODrD/FBRpawAAAAAAAAAACAhcYxAQtf8SErv/ExO+/xQUwP8UFMD/FBTB/xUV
|
||||
wv8VFcP/FRXE/xUVxf8WFsb/FhbG/xYWx/8WFsf/FhbH/xYWx/8WFsf/FhbG/xYWxf8VFcT/FRXD/xUV
|
||||
wv8UFMH/FBTB/xQUwP8TE77/EhK7/xAQtf8TE2hoAAAAAAAAAAAQEFNUFRXC/xMTv/8UFMP/FRXE/xUV
|
||||
xP8VFcX/FRXG/xYWx/8WFsf/FhbI/xYWyf8XF8n/FxfK/xcXyv8XF8r/FxfK/xcXyf8XF8n/FhbI/xYW
|
||||
yP8WFsf/FhbG/xUVxf8VFcT/FRXE/xQUw/8TE7//FRXB/xAQV1UAAAAAAAAAAA0NPxkjI8byFBTD/xUV
|
||||
x/8WFsj/FxfJ/xcXyf8XF8r/FxfK/xcXy/8YGMz/GBjM/xgYzP8YGM3/GBjN/xgYzf8YGM3/GBjM/xgY
|
||||
zP8YGMz/GBjL/xcXy/8XF8r/FxfJ/xcXyf8WFsj/FRXH/xQUw/8jI8f0Dg5GGwAAAAAAAAAAFhZxAiUl
|
||||
eIUZGcr/FBTI/xUVyv8WFsv/FhbM/xYWzP8WFsz/FhbN/xcXzf8XF83/FxfN/xcXzv8XF87/FxfO/xcX
|
||||
zv8XF87/FxfN/xcXzf8WFs3/FhbM/xYWzP8WFsz/FhbL/xUVyv8UFMj/GBjJ/yYmeogWFnYCAAAAAAAA
|
||||
AAAAAAAAGBh1BzMzk50kJNP+FxfK/xgYzP8YGMz/GBjN/xgYzf8YGM3/GBjN/xgYzf8ZGc7/GRnO/xkZ
|
||||
zv8ZGc7/GRnO/xkZzv8YGM3/GBjN/xgYzf8YGM3/GBjN/xgYzP8YGMz/FxfK/yMj0v4zM5WfFBRkBwAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAHBx7Ay0tdkg3N5emMTGpxSwsp8gsLKfILCynyCwsp8gsLKfILCynyCws
|
||||
p8gsLKfILCynyCwsp8gsLKfILCynyCwsp8gsLKfILCynyCwsp8gsLKfILCynyDExqcU2NpenLi54Shsb
|
||||
ewMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//////////8AAAD+AAAAfAAAADwAAAA8AAAAPAAAADwAAAA8AA
|
||||
AAPAAAADwAAAA8AAAAPAAAADwAAAA8AAAAPAAAADwAAAA8AAAAPAAAADwAAAA8AAAAPAAAADwAAAA8AA
|
||||
AAPAAAADwAAAA8AAAAPAAAAD4AAAB/gAAB//////
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -13,7 +13,7 @@ public SAV_HallOfFame()
|
||||
InitializeComponent();
|
||||
Util.TranslateInterface(this, Main.curlanguage);
|
||||
|
||||
Array.Copy(Main.SAV.Data, Main.SAV.HoF, data, 0, data.Length); //Copy HoF section of save into Data
|
||||
Array.Copy(SAV.Data, SAV.HoF, data, 0, data.Length); //Copy HoF section of save into Data
|
||||
Setup();
|
||||
editor_spec = new object[]{
|
||||
GB_OT,
|
||||
@@ -49,6 +49,7 @@ public SAV_HallOfFame()
|
||||
editing = true;
|
||||
}
|
||||
private bool editing;
|
||||
private readonly SAV6 SAV = new SAV6(Main.SAV.Data);
|
||||
|
||||
private readonly string[] gendersymbols = Main.gendersymbols;
|
||||
private readonly byte[] data = new byte[0x1B40];
|
||||
@@ -66,11 +67,9 @@ private void Setup()
|
||||
|
||||
#region Species
|
||||
{
|
||||
var species_list = Util.getCBList(Main.specieslist, null);
|
||||
species_list.RemoveAt(0); // Remove 0th Entry
|
||||
CB_Species.DisplayMember = "Text";
|
||||
CB_Species.ValueMember = "Value";
|
||||
CB_Species.DataSource = species_list;
|
||||
CB_Species.DataSource = Util.getCBList(Main.specieslist.Skip(1).Take(SAV.MaxSpeciesID).ToArray(), null);
|
||||
}
|
||||
#endregion
|
||||
#region Moves
|
||||
@@ -98,7 +97,7 @@ private void B_Cancel_Click(object sender, EventArgs e)
|
||||
}
|
||||
private void B_Close_Click(object sender, EventArgs e)
|
||||
{
|
||||
Array.Copy(data, 0, Main.SAV.Data, Main.SAV.HoF, data.Length);
|
||||
Array.Copy(data, 0, Main.SAV.Data, SAV.HoF, data.Length);
|
||||
Main.SAV.Edited = true;
|
||||
Close();
|
||||
}
|
||||
@@ -232,7 +231,7 @@ private void NUP_PartyIndex_ValueChanged(object sender, EventArgs e)
|
||||
|
||||
CHK_Nicknamed.Checked = nick == 1;
|
||||
|
||||
Main.setForms(species, CB_Form);
|
||||
setForms();
|
||||
CB_Form.SelectedIndex = (int)form;
|
||||
setGenderLabel((int)gender);
|
||||
updateNickname(sender, e);
|
||||
@@ -360,10 +359,20 @@ private void updateNickname(object sender, EventArgs e)
|
||||
|
||||
Write_Entry(null, null);
|
||||
}
|
||||
private void updateSpecies(object sender, EventArgs e)
|
||||
|
||||
private void setForms()
|
||||
{
|
||||
int species = Util.getIndex(CB_Species);
|
||||
Main.setForms(species, CB_Form);
|
||||
bool hasForms = Legal.PersonalAO[species].HasFormes || new[] { 664, 665, 414 }.Contains(species);
|
||||
CB_Form.Enabled = CB_Form.Visible = hasForms;
|
||||
|
||||
CB_Form.DisplayMember = "Text";
|
||||
CB_Form.ValueMember = "Value";
|
||||
CB_Form.DataSource = PKX.getFormList(species, Main.types, Main.forms, Main.gendersymbols).ToList();
|
||||
}
|
||||
private void updateSpecies(object sender, EventArgs e)
|
||||
{
|
||||
setForms();
|
||||
updateNickname(null, null);
|
||||
}
|
||||
private void updateShiny(object sender, EventArgs e)
|
||||
|
||||
160
SAV/SAV_Inventory.Designer.cs
generated
@@ -28,49 +28,21 @@ protected override void Dispose(bool disposing)
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SAV_Inventory));
|
||||
this.dataGridView1 = new System.Windows.Forms.DataGridView();
|
||||
this.B_Cancel = new System.Windows.Forms.Button();
|
||||
this.B_Save = new System.Windows.Forms.Button();
|
||||
this.GB_Pouch = new System.Windows.Forms.GroupBox();
|
||||
this.B_DisplayBerries = new System.Windows.Forms.Button();
|
||||
this.B_DisplayMedicine = new System.Windows.Forms.Button();
|
||||
this.B_DisplayTMHM = new System.Windows.Forms.Button();
|
||||
this.B_DisplayKeyItems = new System.Windows.Forms.Button();
|
||||
this.B_DisplayItems = new System.Windows.Forms.Button();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
|
||||
this.GB_Pouch.SuspendLayout();
|
||||
this.tabControl1 = new System.Windows.Forms.TabControl();
|
||||
this.IL_Pouch = new System.Windows.Forms.ImageList(this.components);
|
||||
this.B_GiveAll = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// dataGridView1
|
||||
//
|
||||
this.dataGridView1.AllowUserToAddRows = false;
|
||||
this.dataGridView1.AllowUserToDeleteRows = false;
|
||||
this.dataGridView1.AllowUserToResizeColumns = false;
|
||||
this.dataGridView1.AllowUserToResizeRows = false;
|
||||
this.dataGridView1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
|
||||
this.dataGridView1.BackgroundColor = System.Drawing.SystemColors.ControlLightLight;
|
||||
this.dataGridView1.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
|
||||
this.dataGridView1.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
|
||||
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dataGridView1.ColumnHeadersVisible = false;
|
||||
this.dataGridView1.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter;
|
||||
this.dataGridView1.Location = new System.Drawing.Point(12, 12);
|
||||
this.dataGridView1.MultiSelect = false;
|
||||
this.dataGridView1.Name = "dataGridView1";
|
||||
this.dataGridView1.RowHeadersVisible = false;
|
||||
this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect;
|
||||
this.dataGridView1.ShowEditingIcon = false;
|
||||
this.dataGridView1.Size = new System.Drawing.Size(200, 190);
|
||||
this.dataGridView1.TabIndex = 12;
|
||||
this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dropclick);
|
||||
//
|
||||
// B_Cancel
|
||||
//
|
||||
this.B_Cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.B_Cancel.Location = new System.Drawing.Point(221, 179);
|
||||
this.B_Cancel.Location = new System.Drawing.Point(177, 328);
|
||||
this.B_Cancel.Name = "B_Cancel";
|
||||
this.B_Cancel.Size = new System.Drawing.Size(48, 23);
|
||||
this.B_Cancel.Size = new System.Drawing.Size(70, 23);
|
||||
this.B_Cancel.TabIndex = 14;
|
||||
this.B_Cancel.Text = "Cancel";
|
||||
this.B_Cancel.UseVisualStyleBackColor = true;
|
||||
@@ -79,117 +51,75 @@ private void InitializeComponent()
|
||||
// B_Save
|
||||
//
|
||||
this.B_Save.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.B_Save.Location = new System.Drawing.Point(275, 179);
|
||||
this.B_Save.Location = new System.Drawing.Point(253, 328);
|
||||
this.B_Save.Name = "B_Save";
|
||||
this.B_Save.Size = new System.Drawing.Size(48, 23);
|
||||
this.B_Save.Size = new System.Drawing.Size(70, 23);
|
||||
this.B_Save.TabIndex = 15;
|
||||
this.B_Save.Text = "Save";
|
||||
this.B_Save.UseVisualStyleBackColor = true;
|
||||
this.B_Save.Click += new System.EventHandler(this.B_Save_Click);
|
||||
//
|
||||
// GB_Pouch
|
||||
// tabControl1
|
||||
//
|
||||
this.GB_Pouch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.GB_Pouch.Controls.Add(this.B_DisplayBerries);
|
||||
this.GB_Pouch.Controls.Add(this.B_DisplayMedicine);
|
||||
this.GB_Pouch.Controls.Add(this.B_DisplayTMHM);
|
||||
this.GB_Pouch.Controls.Add(this.B_DisplayKeyItems);
|
||||
this.GB_Pouch.Controls.Add(this.B_DisplayItems);
|
||||
this.GB_Pouch.Location = new System.Drawing.Point(221, 6);
|
||||
this.GB_Pouch.Name = "GB_Pouch";
|
||||
this.GB_Pouch.Size = new System.Drawing.Size(102, 167);
|
||||
this.GB_Pouch.TabIndex = 16;
|
||||
this.GB_Pouch.TabStop = false;
|
||||
this.GB_Pouch.Text = "Pouches";
|
||||
this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.tabControl1.ImageList = this.IL_Pouch;
|
||||
this.tabControl1.Location = new System.Drawing.Point(12, 12);
|
||||
this.tabControl1.Name = "tabControl1";
|
||||
this.tabControl1.SelectedIndex = 0;
|
||||
this.tabControl1.Size = new System.Drawing.Size(311, 308);
|
||||
this.tabControl1.TabIndex = 17;
|
||||
//
|
||||
// B_DisplayBerries
|
||||
// IL_Pouch
|
||||
//
|
||||
this.B_DisplayBerries.Location = new System.Drawing.Point(14, 135);
|
||||
this.B_DisplayBerries.Name = "B_DisplayBerries";
|
||||
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);
|
||||
this.IL_Pouch.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("IL_Pouch.ImageStream")));
|
||||
this.IL_Pouch.TransparentColor = System.Drawing.Color.Transparent;
|
||||
this.IL_Pouch.Images.SetKeyName(0, "Bag_Items.png");
|
||||
this.IL_Pouch.Images.SetKeyName(1, "Bag_Key.png");
|
||||
this.IL_Pouch.Images.SetKeyName(2, "Bag_TMHM.png");
|
||||
this.IL_Pouch.Images.SetKeyName(3, "Bag_Medicine.png");
|
||||
this.IL_Pouch.Images.SetKeyName(4, "Bag_Berries.png");
|
||||
this.IL_Pouch.Images.SetKeyName(5, "Bag_Balls.png");
|
||||
this.IL_Pouch.Images.SetKeyName(6, "Bag_Battle.png");
|
||||
this.IL_Pouch.Images.SetKeyName(7, "Bag_Mail.png");
|
||||
//
|
||||
// B_DisplayMedicine
|
||||
// B_GiveAll
|
||||
//
|
||||
this.B_DisplayMedicine.Location = new System.Drawing.Point(14, 106);
|
||||
this.B_DisplayMedicine.Name = "B_DisplayMedicine";
|
||||
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);
|
||||
//
|
||||
// B_DisplayTMHM
|
||||
//
|
||||
this.B_DisplayTMHM.Location = new System.Drawing.Point(14, 77);
|
||||
this.B_DisplayTMHM.Name = "B_DisplayTMHM";
|
||||
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);
|
||||
//
|
||||
// B_DisplayKeyItems
|
||||
//
|
||||
this.B_DisplayKeyItems.Location = new System.Drawing.Point(14, 48);
|
||||
this.B_DisplayKeyItems.Name = "B_DisplayKeyItems";
|
||||
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);
|
||||
//
|
||||
// B_DisplayItems
|
||||
//
|
||||
this.B_DisplayItems.Location = new System.Drawing.Point(14, 19);
|
||||
this.B_DisplayItems.Name = "B_DisplayItems";
|
||||
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);
|
||||
this.B_GiveAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.B_GiveAll.Location = new System.Drawing.Point(12, 328);
|
||||
this.B_GiveAll.Name = "B_GiveAll";
|
||||
this.B_GiveAll.Size = new System.Drawing.Size(75, 23);
|
||||
this.B_GiveAll.TabIndex = 18;
|
||||
this.B_GiveAll.Text = "Give All";
|
||||
this.B_GiveAll.UseVisualStyleBackColor = true;
|
||||
this.B_GiveAll.Click += new System.EventHandler(this.B_GiveAll_Click);
|
||||
//
|
||||
// SAV_Inventory
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(334, 212);
|
||||
this.Controls.Add(this.GB_Pouch);
|
||||
this.ClientSize = new System.Drawing.Size(334, 361);
|
||||
this.Controls.Add(this.B_GiveAll);
|
||||
this.Controls.Add(this.tabControl1);
|
||||
this.Controls.Add(this.B_Save);
|
||||
this.Controls.Add(this.B_Cancel);
|
||||
this.Controls.Add(this.dataGridView1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.MaximumSize = new System.Drawing.Size(350, 750);
|
||||
this.MinimizeBox = false;
|
||||
this.MinimumSize = new System.Drawing.Size(350, 250);
|
||||
this.MinimumSize = new System.Drawing.Size(350, 400);
|
||||
this.Name = "SAV_Inventory";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Inventory Editor";
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
|
||||
this.GB_Pouch.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.DataGridView dataGridView1;
|
||||
private System.Windows.Forms.Button B_Cancel;
|
||||
private System.Windows.Forms.Button B_Save;
|
||||
private System.Windows.Forms.GroupBox GB_Pouch;
|
||||
private System.Windows.Forms.Button B_DisplayBerries;
|
||||
private System.Windows.Forms.Button B_DisplayMedicine;
|
||||
private System.Windows.Forms.Button B_DisplayTMHM;
|
||||
private System.Windows.Forms.Button B_DisplayKeyItems;
|
||||
private System.Windows.Forms.Button B_DisplayItems;
|
||||
private System.Windows.Forms.TabControl tabControl1;
|
||||
private System.Windows.Forms.Button B_GiveAll;
|
||||
private System.Windows.Forms.ImageList IL_Pouch;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace PKHeX
|
||||
@@ -11,52 +11,77 @@ public SAV_Inventory()
|
||||
InitializeComponent();
|
||||
Util.TranslateInterface(this, Main.curlanguage);
|
||||
|
||||
item_val = getItems(Main.SAV.ORAS ? Legal.Pouch_Items_ORAS : Legal.Pouch_Items_XY);
|
||||
keyitem_val = getItems(Main.SAV.ORAS ? Legal.Pouch_Key_ORAS : Legal.Pouch_Key_XY);
|
||||
tmhm_val = getItems(Main.SAV.ORAS ? Legal.Pouch_TMHM_ORAS : Legal.Pouch_TMHM_XY, sort: false);
|
||||
medicine_val = getItems(Main.SAV.ORAS ? Legal.Pouch_Medicine_ORAS : Legal.Pouch_Medicine_XY);
|
||||
berries_val = getItems(Legal.Pouch_Berry_XY);
|
||||
|
||||
B_DisplayItems.ForeColor = Color.Red;
|
||||
|
||||
// Load Items
|
||||
populateList(item_val, Main.SAV.Items.HeldItem);
|
||||
|
||||
B_DisplayItems.Text = Main.itempouch[0];
|
||||
B_DisplayMedicine.Text = Main.itempouch[1];
|
||||
B_DisplayTMHM.Text = Main.itempouch[2];
|
||||
B_DisplayBerries.Text = Main.itempouch[3];
|
||||
B_DisplayKeyItems.Text = Main.itempouch[4];
|
||||
Pouches = SAV.Inventory;
|
||||
getBags();
|
||||
}
|
||||
|
||||
private readonly byte[] sav = (byte[])Main.SAV.Data.Clone();
|
||||
private readonly string[] item_val, keyitem_val, tmhm_val, medicine_val, berries_val;
|
||||
private readonly SaveFile SAV = Main.SAV.Clone();
|
||||
private readonly InventoryPouch[] Pouches;
|
||||
private const string TabPrefix = "TAB_";
|
||||
private const string DGVPrefix = "DGV_";
|
||||
|
||||
|
||||
// Initialize String Tables
|
||||
private string[] getItems(ushort[] items, bool sort = true)
|
||||
private void B_Cancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
string[] res = new string[items.Length];
|
||||
for (int i = 0; i < res.Length; i++)
|
||||
res[i] = Main.itemlist[items[i]];
|
||||
if (sort)
|
||||
Array.Sort(res);
|
||||
return res;
|
||||
Close();
|
||||
}
|
||||
private void B_Save_Click(object sender, EventArgs e)
|
||||
{
|
||||
packBags();
|
||||
SAV.Inventory = Pouches;
|
||||
Array.Copy(SAV.Data, Main.SAV.Data, SAV.Data.Length);
|
||||
Main.SAV.Edited = true;
|
||||
Close();
|
||||
}
|
||||
|
||||
// Populate DataGrid
|
||||
private void populateList(string[] itemarr, int offset, int itemcount = -1)
|
||||
private void getBags()
|
||||
{
|
||||
dataGridView1.Rows.Clear();
|
||||
dataGridView1.Columns.Clear();
|
||||
|
||||
DataGridViewColumn dgvIndex = new DataGridViewTextBoxColumn();
|
||||
for (int i = 0; i < Pouches.Length; i++)
|
||||
{
|
||||
dgvIndex.HeaderText = "CNT";
|
||||
dgvIndex.DisplayIndex = 1;
|
||||
dgvIndex.Width = 45;
|
||||
dgvIndex.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
|
||||
// Add Tab
|
||||
tabControl1.TabPages.Add(new TabPage
|
||||
{
|
||||
// Text = Pouches[i].Type.ToString(),
|
||||
ImageIndex = (int)Pouches[i].Type
|
||||
});
|
||||
|
||||
// Add DataGrid
|
||||
DataGridView dgv = new DataGridView
|
||||
{
|
||||
Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right, // All
|
||||
Height = tabControl1.TabPages[i].Height,
|
||||
Width = tabControl1.TabPages[i].Width,
|
||||
Text = Pouches[i].Type.ToString(),
|
||||
Name = DGVPrefix + Pouches[i].Type,
|
||||
|
||||
AllowUserToAddRows = false,
|
||||
AllowUserToDeleteRows = false,
|
||||
AllowUserToResizeRows = false,
|
||||
AllowUserToResizeColumns = false,
|
||||
RowHeadersVisible = false,
|
||||
ColumnHeadersVisible = false,
|
||||
MultiSelect = false,
|
||||
ShowEditingIcon = false,
|
||||
|
||||
EditMode = DataGridViewEditMode.EditOnEnter,
|
||||
ColumnHeadersBorderStyle = DataGridViewHeaderBorderStyle.Single,
|
||||
ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize,
|
||||
SelectionMode = DataGridViewSelectionMode.CellSelect,
|
||||
CellBorderStyle = DataGridViewCellBorderStyle.None,
|
||||
};
|
||||
|
||||
tabControl1.TabPages[i].Controls.Add(dgv);
|
||||
|
||||
spillBag(dgv, i);
|
||||
}
|
||||
}
|
||||
private void spillBag(DataGridView dgv, int bag)
|
||||
{
|
||||
var pouch = Pouches[bag];
|
||||
var itemcount = Pouches[bag].Items.Length;
|
||||
string[] itemarr = getItems(pouch.LegalItems);
|
||||
dgv.Rows.Clear();
|
||||
dgv.Columns.Clear();
|
||||
|
||||
DataGridViewComboBoxColumn dgvItemVal = new DataGridViewComboBoxColumn
|
||||
{
|
||||
DisplayStyle = DataGridViewComboBoxDisplayStyle.Nothing,
|
||||
@@ -64,19 +89,27 @@ private void populateList(string[] itemarr, int offset, int itemcount = -1)
|
||||
Width = 135,
|
||||
FlatStyle = FlatStyle.Flat
|
||||
};
|
||||
DataGridViewColumn dgvIndex = new DataGridViewTextBoxColumn();
|
||||
{
|
||||
dgvIndex.HeaderText = "CNT";
|
||||
dgvIndex.DisplayIndex = 1;
|
||||
dgvIndex.Width = 45;
|
||||
dgvIndex.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
|
||||
}
|
||||
foreach (string t in itemarr)
|
||||
dgvItemVal.Items.Add(t); // add only the Item Names
|
||||
|
||||
dataGridView1.Columns.Add(dgvItemVal);
|
||||
dataGridView1.Columns.Add(dgvIndex);
|
||||
dgv.Columns.Add(dgvItemVal);
|
||||
dgv.Columns.Add(dgvIndex);
|
||||
|
||||
dataGridView1.Rows.Add(itemcount > 0 ? itemcount : itemarr.Length);
|
||||
dataGridView1.CancelEdit();
|
||||
dgv.Rows.Add(itemcount > 0 ? itemcount : itemarr.Length);
|
||||
dgv.CancelEdit();
|
||||
|
||||
string itemname = "";
|
||||
for (int i = 0; i < dataGridView1.Rows.Count; i++)
|
||||
string err = "";
|
||||
for (int i = 0; i < pouch.Items.Length; i++)
|
||||
{
|
||||
int itemvalue = BitConverter.ToUInt16(sav, offset + i*4);
|
||||
int itemvalue = pouch.Items[i].Index;
|
||||
try { itemname = Main.itemlist[itemvalue]; }
|
||||
catch
|
||||
{
|
||||
@@ -86,143 +119,113 @@ private void populateList(string[] itemarr, int offset, int itemcount = -1)
|
||||
int itemarrayval = Array.IndexOf(itemarr, itemname);
|
||||
if (itemarrayval == -1)
|
||||
{
|
||||
dataGridView1.Rows[i].Cells[0].Value = itemarr[0];
|
||||
dataGridView1.Rows[i].Cells[1].Value = 0;
|
||||
Util.Alert(itemname + " removed from item pouch.", "If you save changes the item will no longer be in the pouch.");
|
||||
dgv.Rows[i].Cells[0].Value = itemarr[0];
|
||||
dgv.Rows[i].Cells[1].Value = 0;
|
||||
|
||||
err += itemname + ", ";
|
||||
}
|
||||
else
|
||||
{
|
||||
dataGridView1.Rows[i].Cells[0].Value = itemarr[itemarrayval];
|
||||
dataGridView1.Rows[i].Cells[1].Value = BitConverter.ToUInt16(sav, offset + i * 4 + 2);
|
||||
dgv.Rows[i].Cells[0].Value = itemname;
|
||||
dgv.Rows[i].Cells[1].Value = pouch.Items[i].Count;
|
||||
}
|
||||
}
|
||||
if (err.Length > 0)
|
||||
Util.Alert($"The following items have been removed from {Pouches[bag].Type} pouch.", err,
|
||||
"If you save changes, the item(s) will no longer be in the pouch.");
|
||||
}
|
||||
private void dropclick(object sender, DataGridViewCellEventArgs e)
|
||||
private void packBags()
|
||||
{
|
||||
if (e.ColumnIndex != 0) return;
|
||||
|
||||
ComboBox comboBox = (ComboBox)dataGridView1.EditingControl;
|
||||
comboBox.DroppedDown = true;
|
||||
}
|
||||
private void saveBag(object sender)
|
||||
{
|
||||
int offset = 0;
|
||||
if (B_DisplayItems.ForeColor == Color.Red)
|
||||
offset = Main.SAV.Items.HeldItem;
|
||||
else if (B_DisplayKeyItems.ForeColor == Color.Red)
|
||||
offset = Main.SAV.Items.KeyItem;
|
||||
else if (B_DisplayTMHM.ForeColor == Color.Red)
|
||||
offset = Main.SAV.Items.TMHM;
|
||||
else if (B_DisplayMedicine.ForeColor == Color.Red)
|
||||
offset = Main.SAV.Items.Medicine;
|
||||
else if (B_DisplayBerries.ForeColor == Color.Red)
|
||||
offset = Main.SAV.Items.Berry;
|
||||
|
||||
// Fetch Data
|
||||
int itemcount = dataGridView1.Rows.Count;
|
||||
int emptyslots = 0;
|
||||
for (int i = 0; i < itemcount; i++)
|
||||
for (int p = 0; p < Pouches.Length; p++)
|
||||
{
|
||||
string item = dataGridView1.Rows[i].Cells[0].Value.ToString();
|
||||
int itemindex = Array.IndexOf(Main.itemlist, item);
|
||||
int itemcnt;
|
||||
try
|
||||
{ itemcnt = Convert.ToUInt16(dataGridView1.Rows[i].Cells[1].Value.ToString()); }
|
||||
catch { itemcnt = 0; }
|
||||
// Get DataGridView
|
||||
DataGridView dgv = Controls.Find(DGVPrefix + Pouches[p].Type, true).FirstOrDefault() as DataGridView;
|
||||
|
||||
if (itemindex == 0) // Compression of Empty Slots
|
||||
int ctr = 0;
|
||||
for (int i = 0; i < dgv.Rows.Count; i++)
|
||||
{
|
||||
emptyslots++;
|
||||
continue;
|
||||
string item = dgv.Rows[i].Cells[0].Value.ToString();
|
||||
int itemindex = Array.IndexOf(Main.itemlist, item);
|
||||
int itemcnt;
|
||||
try
|
||||
{ itemcnt = Convert.ToUInt16(dgv.Rows[i].Cells[1].Value.ToString()); }
|
||||
catch { itemcnt = 0; }
|
||||
|
||||
if (itemcnt == 0)
|
||||
itemcnt++; // No 0 count of items
|
||||
else if (itemcnt > 995)
|
||||
itemcnt = 995; // cap out
|
||||
|
||||
if (itemindex == 0) // Compression of Empty Slots
|
||||
continue;
|
||||
|
||||
Pouches[p].Items[ctr++] = new InventoryItem {Index = itemindex, Count = itemcnt};
|
||||
}
|
||||
if (itemcnt == 0)
|
||||
itemcnt++; // No 0 count of items
|
||||
else if (itemcnt > 995)
|
||||
itemcnt = 995; // cap out
|
||||
|
||||
// Write Data into Save File
|
||||
BitConverter.GetBytes((ushort)itemindex).CopyTo(sav, offset + 4 * (i - emptyslots)); // item #
|
||||
BitConverter.GetBytes((ushort)itemcnt).CopyTo(sav, offset + 4 * (i - emptyslots) + 2); // count
|
||||
for (int i = ctr; i < Pouches[p].Items.Length; i++)
|
||||
Pouches[p].Items[i] = new InventoryItem(); // Empty Slots at the end
|
||||
}
|
||||
}
|
||||
|
||||
// Delete Empty Trash
|
||||
for (int i = itemcount - emptyslots; i < itemcount; i++)
|
||||
// Initialize String Tables
|
||||
private string[] getItems(ushort[] items, bool sort = true)
|
||||
{
|
||||
string[] res = new string[items.Length + 1];
|
||||
for (int i = 0; i < res.Length - 1; i++)
|
||||
res[i] = Main.itemlist[items[i]];
|
||||
res[items.Length] = Main.itemlist[0];
|
||||
if (sort)
|
||||
Array.Sort(res);
|
||||
return res;
|
||||
}
|
||||
|
||||
// User Cheats
|
||||
private void B_GiveAll_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Get Current Pouch
|
||||
int pouch = tabControl1.SelectedIndex;
|
||||
if (pouch < 0)
|
||||
return;
|
||||
|
||||
ushort[] legalitems = Pouches[pouch].LegalItems;
|
||||
|
||||
DataGridView dgv = Controls.Find(DGVPrefix + Pouches[pouch].Type, true).FirstOrDefault() as DataGridView;
|
||||
|
||||
if (ModifierKeys == Keys.Alt)
|
||||
{
|
||||
BitConverter.GetBytes((ushort)0).CopyTo(sav, offset + 4 * i + 0); // item #
|
||||
BitConverter.GetBytes((ushort)0).CopyTo(sav, offset + 4 * i + 2); // count
|
||||
for (int i = 0; i < legalitems.Length; i++)
|
||||
{
|
||||
dgv.Rows[i].Cells[0].Value = Main.itemlist[0];
|
||||
dgv.Rows[i].Cells[1].Value = 0;
|
||||
}
|
||||
Util.Alert("Items cleared.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Load New Button Color, after finished we'll load the new data.
|
||||
B_DisplayItems.ForeColor =
|
||||
B_DisplayKeyItems.ForeColor =
|
||||
B_DisplayTMHM.ForeColor =
|
||||
B_DisplayMedicine.ForeColor =
|
||||
B_DisplayBerries.ForeColor = Main.defaultControlText;
|
||||
|
||||
(sender as Button).ForeColor = Color.Red;
|
||||
}
|
||||
private void giveAll(string[] inarray, int count)
|
||||
{
|
||||
for (int i = 0; i < inarray.Length - 1; i++)
|
||||
int Count = ModifierKeys == Keys.Control ? 1 : Pouches[pouch].MaxCount;
|
||||
for (int i = 0; i < legalitems.Length; i++)
|
||||
{
|
||||
string itemname = inarray[i+1];
|
||||
int itemarrayval = Array.IndexOf(inarray, itemname);
|
||||
dataGridView1.Rows[i].Cells[0].Value = inarray[itemarrayval];
|
||||
dataGridView1.Rows[i].Cells[1].Value = count;
|
||||
int item = legalitems[i];
|
||||
string itemname;
|
||||
int c = Count;
|
||||
|
||||
// Override for HMs
|
||||
switch (SAV.Generation)
|
||||
{
|
||||
case 3: {
|
||||
itemname = Main.itemlist[item];
|
||||
if (Legal.Pouch_HM_RS.Contains(legalitems[i])) c = 1;
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
itemname = Main.itemlist[item];
|
||||
if (new[] { 420, 421, 422, 423, 423, 424, 425, 426, 427, 737 }.Contains(legalitems[i])) c = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
dgv.Rows[i].Cells[0].Value = itemname;
|
||||
dgv.Rows[i].Cells[1].Value = c;
|
||||
}
|
||||
}
|
||||
private void B_DisplayItems_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Store Current Items back to the save file
|
||||
saveBag(sender);
|
||||
populateList(item_val, Main.SAV.Items.HeldItem);
|
||||
if (ModifierKeys == Keys.Alt)
|
||||
giveAll(item_val, 995);
|
||||
}
|
||||
private void B_DisplayKeyItems_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Store Current Items back to the save file
|
||||
saveBag(sender);
|
||||
populateList(keyitem_val, Main.SAV.Items.KeyItem);
|
||||
if (ModifierKeys == Keys.Alt && Util.Prompt(MessageBoxButtons.YesNo,
|
||||
$"Warning: Adding all {B_DisplayKeyItems.Text} is dangerous.", "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);
|
||||
populateList(tmhm_val, Main.SAV.Items.TMHM);
|
||||
if (ModifierKeys == Keys.Alt && Util.Prompt(MessageBoxButtons.YesNo,
|
||||
$"Warning: Adding all {B_DisplayTMHM.Text} is dangerous.", "Continue?") == DialogResult.Yes)
|
||||
giveAll(tmhm_val, 1);
|
||||
}
|
||||
private void B_DisplayMedicine_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Store Current Items back to the save file
|
||||
saveBag(sender);
|
||||
populateList(medicine_val, Main.SAV.Items.Medicine);
|
||||
if (ModifierKeys == Keys.Alt)
|
||||
giveAll(medicine_val, 995);
|
||||
}
|
||||
private void B_DisplayBerries_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Store Current Items back to the save file
|
||||
saveBag(sender);
|
||||
populateList(berries_val, Main.SAV.Items.Berry);
|
||||
if (ModifierKeys == Keys.Alt)
|
||||
giveAll(berries_val, 995);
|
||||
}
|
||||
private void B_Cancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
private void B_Save_Click(object sender, EventArgs e)
|
||||
{
|
||||
saveBag(sender);
|
||||
Array.Copy(sav, Main.SAV.Data, Main.SAV.Data.Length);
|
||||
Main.SAV.Edited = true;
|
||||
Close();
|
||||
System.Media.SystemSounds.Asterisk.Play();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,36 +117,169 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="dataGridView1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_Cancel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_Save.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="GB_Pouch.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_DisplayBerries.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_DisplayMedicine.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_DisplayTMHM.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_DisplayKeyItems.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="B_DisplayItems.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 name="IL_Pouch.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<data name="IL_Pouch.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADE
|
||||
IwAAAk1TRnQBSQFMAgEBCAEAARgBAAEIAQABIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
AwABgAMAAWADAAEBAQABCAYAATAYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||
AWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYCAAFm
|
||||
AZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMCAAHM
|
||||
AWYCAAHMAZkCAALMAgABzAH/AgAB/wFmAgAB/wGZAgAB/wHMAQABMwH/AgAB/wEAATMBAAEzAQABZgEA
|
||||
ATMBAAGZAQABMwEAAcwBAAEzAQAB/wEAAf8BMwIAAzMBAAIzAWYBAAIzAZkBAAIzAcwBAAIzAf8BAAEz
|
||||
AWYCAAEzAWYBMwEAATMCZgEAATMBZgGZAQABMwFmAcwBAAEzAWYB/wEAATMBmQIAATMBmQEzAQABMwGZ
|
||||
AWYBAAEzApkBAAEzAZkBzAEAATMBmQH/AQABMwHMAgABMwHMATMBAAEzAcwBZgEAATMBzAGZAQABMwLM
|
||||
AQABMwHMAf8BAAEzAf8BMwEAATMB/wFmAQABMwH/AZkBAAEzAf8BzAEAATMC/wEAAWYDAAFmAQABMwEA
|
||||
AWYBAAFmAQABZgEAAZkBAAFmAQABzAEAAWYBAAH/AQABZgEzAgABZgIzAQABZgEzAWYBAAFmATMBmQEA
|
||||
AWYBMwHMAQABZgEzAf8BAAJmAgACZgEzAQADZgEAAmYBmQEAAmYBzAEAAWYBmQIAAWYBmQEzAQABZgGZ
|
||||
AWYBAAFmApkBAAFmAZkBzAEAAWYBmQH/AQABZgHMAgABZgHMATMBAAFmAcwBmQEAAWYCzAEAAWYBzAH/
|
||||
AQABZgH/AgABZgH/ATMBAAFmAf8BmQEAAWYB/wHMAQABzAEAAf8BAAH/AQABzAEAApkCAAGZATMBmQEA
|
||||
AZkBAAGZAQABmQEAAcwBAAGZAwABmQIzAQABmQEAAWYBAAGZATMBzAEAAZkBAAH/AQABmQFmAgABmQFm
|
||||
ATMBAAGZATMBZgEAAZkBZgGZAQABmQFmAcwBAAGZATMB/wEAApkBMwEAApkBZgEAA5kBAAKZAcwBAAKZ
|
||||
Af8BAAGZAcwCAAGZAcwBMwEAAWYBzAFmAQABmQHMAZkBAAGZAswBAAGZAcwB/wEAAZkB/wIAAZkB/wEz
|
||||
AQABmQHMAWYBAAGZAf8BmQEAAZkB/wHMAQABmQL/AQABzAMAAZkBAAEzAQABzAEAAWYBAAHMAQABmQEA
|
||||
AcwBAAHMAQABmQEzAgABzAIzAQABzAEzAWYBAAHMATMBmQEAAcwBMwHMAQABzAEzAf8BAAHMAWYCAAHM
|
||||
AWYBMwEAAZkCZgEAAcwBZgGZAQABzAFmAcwBAAGZAWYB/wEAAcwBmQIAAcwBmQEzAQABzAGZAWYBAAHM
|
||||
ApkBAAHMAZkBzAEAAcwBmQH/AQACzAIAAswBMwEAAswBZgEAAswBmQEAA8wBAALMAf8BAAHMAf8CAAHM
|
||||
Af8BMwEAAZkB/wFmAQABzAH/AZkBAAHMAf8BzAEAAcwC/wEAAcwBAAEzAQAB/wEAAWYBAAH/AQABmQEA
|
||||
AcwBMwIAAf8CMwEAAf8BMwFmAQAB/wEzAZkBAAH/ATMBzAEAAf8BMwH/AQAB/wFmAgAB/wFmATMBAAHM
|
||||
AmYBAAH/AWYBmQEAAf8BZgHMAQABzAFmAf8BAAH/AZkCAAH/AZkBMwEAAf8BmQFmAQAB/wKZAQAB/wGZ
|
||||
AcwBAAH/AZkB/wEAAf8BzAIAAf8BzAEzAQAB/wHMAWYBAAH/AcwBmQEAAf8CzAEAAf8BzAH/AQAC/wEz
|
||||
AQABzAH/AWYBAAL/AZkBAAL/AcwBAAJmAf8BAAFmAf8BZgEAAWYC/wEAAf8CZgEAAf8BZgH/AQAC/wFm
|
||||
AQABIQEAAaUBAANfAQADdwEAA4YBAAOWAQADywEAA7IBAAPXAQAD3QEAA+MBAAPqAQAD8QEAA/gBAAHw
|
||||
AfsB/wEAAaQCoAEAA4ADAAH/AgAB/wMAAv8BAAH/AwAB/wEAAf8BAAL/AgAD//8A/wD/AP8A/wD/AP8A
|
||||
/wD/AP8A/wD/AP8A/wD/AP8AFAAT9BMADfQbAAf0CAAg9AMAAfQE/wn0BP8B9BMAAfQL/wH0GwAB9AL/
|
||||
AfQC/wH0CAAe/wL0AQAD9AH/AvQCGQEJAtwB1QLcAQkBGQHzA/8D9A0ABPQB8wEZCdwBGQHzBPQHAAn0
|
||||
AwAG9AEJAdUB3QH/AfQIAAH/ARkb3AEZAvQBAAH0Av8B9AIZAQkB3AHbAtQBzQLUAdsBCQEZA/QC/wH0
|
||||
DQAB9AP/ARkB3AHUB80B1AHcARkD/wH0BwAB9Af/AfQDAAH0A/8B9AEZAdUBzQHcAf8B9AgAAf8B3BnN
|
||||
AtQB3AL0AQAB9AH/AhkB3ALVA9QDzQLUAtUB3AEJAhkB/wH0CwAC9AHzARkC3AHVAtQHzQLUAdUC3AEZ
|
||||
AfMC9AUAAfQB/wH1BPQB/wX0Af8C9AHcAdUB1AHNAdwB/wH0CAAB/wHcAc0a1AHcAvQBAAL0ARkB3AHU
|
||||
C80C1AHbAdwBGQL0CwAB9AH/ARkB3AHUD80B1AHcARkB/wH0BQAB9AH/AfQEGQH0Bf8B9AIZAdUDzQHc
|
||||
Af8B9AgAAf8B3AHNAdQB2xXcAdsB2gHUAdwD9ALzAQkB2wHUDM0C1AHcAQkB8wP0BwAC9AHzARkB3ALU
|
||||
D80C1AHcARkB8wL0AwAB9AH/ARkB3AHbAdUB3AEJARkD8wEZAQkB3AHVAdQDzQHcAf8B9AgAAf8B3AHN
|
||||
AdQB2xXcAdsB2gHUAdwD9ALzAdwC1A3NAdQB1QEJAfMB9AH/AfQHAAH0Af8BGQHcAdQTzQHUAdwBGQH/
|
||||
AfQDAAL0AdwC1AHNAdQB2wHcA90B3AHbAdQFzQHcAf8B9AgAAf8B3AHNAdQB2xXcAdsB2gHUAdwC9AH/
|
||||
ARkBCQHVAdQOzQLUAdwBGQHzAf8B9AcAAfQB/wHcAtQTzQLUAdwB/wH0AwAC9AEZAdwB1QTUA9UD1AXN
|
||||
AdwB/wn0Af8B3AHNAdQB2xXcAdsB2gHUAdwC9AH/ARkB2wHUD80C1AHbAdwBGQL0BwAB9AH/AdwXzQHc
|
||||
Af8B9AUAAfQB/wHcAtQNzQHcAv8I9AH/AdwBzQHUAdsV3AHbAdoB1AHcAvQB/wHcAtQEzQHUC80C1AHb
|
||||
AQkC9AYAAfQB8wEZAdUHzQLUAdUD3AHVAtQHzQHVARkB8wL0AwAB9AH/AQkB2wHUBM0H1ALNAdUIGQH/
|
||||
AfQB/wHcAc0B1AHbFdwB2wHaAdQB3AL0Af8B3AXNA9QLzQLUAdwC9AYAAf8BGQHcAdQHzQHUAdwBGQP/
|
||||
ARkB3AHUB80B1AHcARkB/wH0AwAC9AEZAQkB1QPNCdQBzQHUB9wBGQH/AfQB/wHcAc0B1AHbFdwB2wHa
|
||||
AdQB3AL0Af8B3AHUAs0BzgHUAdUB2wHVA9QHzQLUAdoB3AL0BgAB/wHcAtQFzQLUAdwBGQXcARkB3ALU
|
||||
Bc0C1AHcAf8B9AMAAvQB8wEZAdwB1AHOAc0E1AHVA9sB1AHNBtQB1QHcAd0B/wH0Af8B3AHNAdQB2xXc
|
||||
AdsB2gHUAdwC9AH/AdwC1AHNAdQB1QHcAQkB3AHbAdoC1AXNAtQB2gHbAQkC9AYAAf8B3AfNAdQB3AEZ
|
||||
Af8B3APNAdwB/wEZAdwB1AfNAdwB/wH0BQAB9AH/AQkB1QHUAc0B1APVBNwB1AfNAdQB1QEJAvQB/wHc
|
||||
Ac0B1AHbFdwB2wHaAdQB3AL0Af8BGQHcAdQBzgHUAdUB3AEZAtwB2wLUBc0C1AHbAdwBGQL0BgAB/wHc
|
||||
B9QB3AEZAtwB1APNAdQC3AEZAdwH1AHcAf8B9AMABPQB3AHbAdQBzQTUAdsD3AHUBM0D1AHbAQkBGQL0
|
||||
Af8B3AHNAdQB2wfcAdsB1QPUAdUB2wfcAdsB2gHUAdwD9AIZAdYBzgHUAdUB3AEZAQkB3AHbAtQFzQLU
|
||||
AdwCGQL0BgAB/wEZB9wBGQH/AdwHzQHcAf8BGQfcARkB/wH0AwAC9AIZAdwB2wHUAc0E1AHbA9wB1APN
|
||||
AtQB2gHbAQkC9AIAAf8B3AHNAdQB2wbcAdsC1APNAtQB2wbcAdsB2gHUAdwE9AEZAdwD1AHVAtwB2wLU
|
||||
Bc0C1AHbAdwBGQP0BgAB/wH0BxkB9AH/AdwHzQHcAf8B9AcZAfQB/wH0AQAC9AEZAQkC3AHVAtQBzQHU
|
||||
B9sB1AHNAtQB1QLcAQkBGQL0AgAB/wHcAc0B1AHbBdwB2wHVB9QB1QHbBdwB2wHaAdQB3AL0AQAC9AEJ
|
||||
AdsB1AHNAdQB1QPUBc0C1AHbAdwBGQL0CAAL/wHcB80B3Av/AfQBAAL0AQkB1QPUA80B1APcAdsE1AHN
|
||||
AdQB3AEJAhkC9AQAAf8B3AHNAdQB2wTcAdsC1AHVBdwB1QLUAdsE3AHbAdoB1AHcAvQBAAL0ARkB3AHb
|
||||
AdQB1QHbA9QCzQPUAdUB2wHcARkB8wL0AQAH9AH/ARkI3AEZAtwB1APNAdQC3AEZCNwBGQH/AvQBGQEJ
|
||||
AdUD1ATNAdQD3AHbBNQBzQHUAdwBCQT0BAAB/wHcAc0B1AHbA9wC2wHaAdsH3AHVAdQB1QHbA9wB2wHa
|
||||
AdQB3AL0AQAC9AIZAQkC3AHbAdoC1AHNAtQB2gHbAdwBCQHxAvMC9AEAAfQC/wT0Af8B3AfNAdQB3AEZ
|
||||
Af8B3APNAdwB/wEZAdwB1AfNAdwB/wL0AQkB1QHUB80B1ATcA9UB1AHNAdQB1QEJAf8B9AYAAf8B3AHN
|
||||
AdQB2wLcAdsB1AHaAdsJ3AHVAtQB2wLcAdsB2gHUAdwC9AEAA/QDGQIJAdwB2wPUAdsB3AEJAhkB8wb0
|
||||
Af8B9AEZA/QB/wHcAtQFzQLUAdwBGQXcARkB3ALUBc0C1AHcAf8B9AH/Ad0B3AbVAc4BzQHUA9sB1QTU
|
||||
Ac0BzgHUAdwBGQHzAvQEAAH/AdwBzQHUBNsB2gHbC9wB2wHaBNsB2gHUAdwC9AMABPQC8wEZAtwB2wLc
|
||||
ARkC8wH0Av8B9AEAAfQC/wH0AxkC9AH/ARkB3AHUB80B1AHcARkD/wEZAdwB1AfNAdQB3AEZAf8B9AH/
|
||||
ARkHCQHVAc0J1APNAdUBCQEZAvQEAAH/AdwBzQHUAdsB2gHUAdoB2w3cAdsB2gHUAdoB2wHaAdQB3AL0
|
||||
AwAE9ALzAQkB3AHbAdoB2wHcAQkC8wL0Af8B9ALzARkBCQPcARkD9AHzARkB1QfNAtQB1QPcAdUC1AfN
|
||||
AdUBGQHzAvQB/wHzBxkB1QLNB9QEzQHUAdsBCQH/AfQEAAH/AdwBzQPUAdoB2w/cAdsB2gTUAdwC9AcA
|
||||
AvQBCQHVAtQB2gHbAdwCGQP0AvMB8QEJAdsD1AHcAvQBAAH0Af8B3BfNAdwB/wH0AgAH9AL/AdwNzQLU
|
||||
AdwB/wH0BAAB/wHcA80B1AHbEdwB2wHUAc0C1AHcAvQHAAL0Ad0B3AHVA9QB1QfcAtUD1AHbAQkC9AEA
|
||||
AfQB/wHcAtQTzQLUAdwB/wH0AgAI9AH/AdwFzQPUA9UE1AHVAdwBGQL0AgAB/wHcAc0C1AHbE9wB2wPU
|
||||
AdwC9AcAAvQBGQHcAdsC1AHNCdQDzQHUAdwBGQL0AQAB9AH/ARkB3AHUE80B1AHcARkB/wH0CQAB9AH/
|
||||
AdwFzQHUAdsB3AMZAdwB2wHUAc0C1AHcAvQCAAH/AdwBzQHUAdsV3AHbAdoB1AHcAvQHAAH0Af8CGQHc
|
||||
AdsO1AHcAhkB/wH0AQAC9AHzARkB3ALUD80C1AHcARkB8wL0CQAB9AH/AdwDzQHUAdUB3AEJARkD9AEZ
|
||||
AQkB3AHVAdsB3AEZAf8B9AIAAf8B3AHNAdQB2xXcAdsB2gHUAdwC9AcAAfQC/wH0ARkB3AHbAtQHzQLU
|
||||
AdsB3AEZAfQC/wH0AwAB9AH/ARkB3AHUD80B1AHcARkB/wH0CwAB9AH/AdwDzQHVAhkB9AX/AfQEGQH0
|
||||
Af8B9AIAAf8B3AHNAdQB2xXcAdsB2gHUAdwC9AcAA/QB/wIZAQkB3AHbAtQEzQHUAdUB3AEJAhkB/wP0
|
||||
AwAC9AHzARkC3AHVAtQHzQLUAdUC3AEZAfMC9AsAAfQB/wHcAc0B1AHVAQkC9AH/BfQB/wT0AfUB/wH0
|
||||
AgAB/wHcAc0a1AHcAvQJAAH0Av8D9AEJAdsB1APNAtQB3AP0Av8B9AcAAfQD/wEZAdwB1AfNAdQB3AEZ
|
||||
A/8B9A0AAfQB/wHcAc0B1QH0BP8B9AMAAfQH/wH0AgAB/wHcGc0C1AHcAvQJAAb0ARkBCQbcARkG9AcA
|
||||
BPQB8wEZCdwBGQHzBPQNAAH0Af8BGQHcAd0G9AMACfQCAAH/ARkb3AEZAvQPAAL0Bf8C9BEAAfQL/wH0
|
||||
EQAB9AP/AfQUAB7/AvQHABH0DQAJ9B0ACfQMACD0BwAC9A3/AvQNAAH0B/8B9B0AAfQH/wH0DAAe/wL0
|
||||
AwAF9AIZAQkJ3AMZBfQFAAT0AfMBGQXcARkB8wT0FQAE9AEZB9wBGQT0CAAB/wEZGNwCGQT0AwAC9AL/
|
||||
AfQBGQHcAdUB1AfNAdQB2wHcARkB9AL/AvQFAAH0A/8BGQHcAdQDzQHUAdwBGQP/AfQVAAH0A/8B3AfN
|
||||
AdwD/wH0CAAB/wHcAtQVzQHUAdsB3AIZAvQBAAL0AfMBGQEJAtwB1QLUAc4HzQPUAdUC3AEJARkB8wL0
|
||||
AwAB9AH/ARkB3AHVAtQDzQLUAdUB3AEZAf8B9BMAAvQBGQPcAdUB1AHVA9wB1QHUAdUD3AEZAvQGAAH/
|
||||
AdwC1BXNAdQB2wHcAhkC9AEAAvQBGQEJAdsC1A/NAtQB2wEJARkC9AMAAfQB/wHcC80B3AH/AfQTAAH0
|
||||
Af8B3APNAdQB3AEZA/8BGQHcAdQDzQHcAf8B9AYAAf8B3ALUFc0B1AHbAdwCGQL0AQAC9AEJAdsC1BHN
|
||||
AdQB1QHcAd0C9AIAAfQB8wEZAdUDzQHUA9wB1APNAdUBGQHzAvQPAAL0ARkB3AHVAdQB1QLcARkB9AP/
|
||||
ARkB3AHbA9QB1QHcARkC9AQAAf8B3ALUFc0B1AHbAdwCGQL0AQAC9AHcAtQTzQHUAdUBCQL0AgAB/wEZ
|
||||
AdwB1APNAdwD/wHcA80B1AHcARkB/wH0DwAB9AH/AdwBzQHUAdwBGQf/ARkF3AHUAc0B3AH/AfQEAAH/
|
||||
AdwC1BXNAdQB2wHcAhkD9AHzARkB2wLUE80C1AHcARkB8wL0Af8B3ALUAc0B1AHcARkD9AEZAdwB1AHN
|
||||
AtQB3AH/AfQNAAL0ARkB3AHVAdQB3AEZAfQF/wH0ARkBCQXcAdsB1AHVAdwBGQL0AgAB/wHcAtQVzQHU
|
||||
AdsB3AIZAvQB/wEZAdwB2wLUE80C1AHbAQkBGQL0Af8B3APNAdwB/wH0AwAB9AH/AdwDzQHcAf8B9A0A
|
||||
AfQB/wHcAc0B1AHcARkH/wEZCdwB1AHNAdwB/wH0AgAB/wHcAtQVzQHUAdsB3AIZAvQB/wEJAdsC1BXN
|
||||
AtQB2wEJAvQB/wHcA80B3AH/AfQDAAH0Af8B3APNAdwB/wH0DQAB9AH/AdwBzQHVARkB9Af/ARkJ3AHU
|
||||
Ac0B3AH/AfQCAAH/AdwC1BXNAdQB2wHcAhkC9AH/AdwC1BfNAtQB3AL0Af8B3APNAdwB/wH0AwAB9AH/
|
||||
AdwDzQHcAf8B9A0AAfQB/wHcAc0B3An/ARkJ3AHUAc0B3AH/AfQCAAH/AdwC1BXNAdQB2wHcAhkC9AH/
|
||||
AdwC1BfNAtQB3AL0Af8B3ALUAc0B1AHcARkD9AEZAdwB1AHNAtQB3AH/AfQMAAH0ARkB3AHVAdQB3AX/
|
||||
AfQBGQLcAdUB1AHbB9wB2wHUAdUB3AEZAvQB/wEJAdsB1RXUAdsC3AIZAvQB/wHcAtQXzQLUAdwC9AH/
|
||||
ARkB3AHUA80B3AP/AdwDzQHUAdwBGQH/AfQMAAH/AdwBzQHUAdwBGQX/ARkB3AHUA80B1AncAdQBzQHc
|
||||
Af8B9AH/ARkBCRjcAQkCGQL0Af8BCQHbAtQVzQLUAdsBCQP0AfMBGQHVA80B1APcAdQDzQHVARkB8wL0
|
||||
AQAD9AgAAf8B3AHNAdUBGQH0Bf8B3AHUAdwDCQHcAdQB2wPcAQkDGQHVAc0B3AH/AfQB/wEZAQkY3AEJ
|
||||
AhkC9AH/ARkB3AHbAtQTzQLUAdsBCQEZAvQBAAH0Af8B3AvNAdwB/wH0AwAB9AH/AfQIAAH/AdwBzQHc
|
||||
B/8B3AHNAQkDAAEJAc0B1APcARkD/wHcAc0B3AH/AfQB/wEZAQkY3AEJAhkD9AHzARkB2wLUE80C1AHc
|
||||
ARkB8wL0AQAB9AH/ARkB3AHVAtQFzQLUAdwB/wH0AQAC9AHzARkB8wL0BgAB/wHcAc0B3AP/AfQDGQHV
|
||||
Ac0BCQMAAQkBzQHVAxkB9AP/AdwBzQHcAf8B9AH/AQkB2wHVFdQB2wLcAhkC9AEAAvQB3ALUE80B1AHV
|
||||
AQkC9AMAAfQD/wEZAdwB1AXNAdQB3AEZAf8B9AEAAfQB/wEZAdwBGQH/AfQGAAH/AdwBzQHcA/8BGQPc
|
||||
AdQBzQEJAwABCQHNAdwH/wHcAc0B3AH/AfQB/wHcAtQVzQHUAdsB3AIZAvQBAAL0AQkB2wLUEc0B1AHV
|
||||
AdwB3QL0AwAE9AHzARkE3AHUAc0C1AHcARkB8wH0AfMBGQHcAdQB1QHcARkC9AQAAf8B3AHNAdUDGQEJ
|
||||
A9wB2wHUAdwDCQHcAdQB3AX/AfQBGQHVAc0B3AH/AfQB/wHcAtQVzQHUAdsB3AIZAvQBAAL0ARkBCQHb
|
||||
AtQPzQLUAdsBCQEZAvQHAAH0Bf8B3APNAdQB3AEZAf8BGQHcAdQDzQHcAf8B9AQAAf8B3AHNAdQJ3AHU
|
||||
A80B1AHcARkF/wEZAdwB1AHNAdwB/wH0Af8B3ALUFc0B1AHbAdwCGQL0AQAC9AHzARkBCQLcAtUL1ALV
|
||||
AtwBCQEZAfMC9AcABvQBGQHcAdQBzQLUAdwBGQHcAtQBzQHUAtwBGQHzAvQCAAH0ARkB3AHVAdQB2wfc
|
||||
AdsB1AHVAtwBGQH0Bf8B3AHUAdUB3AEZAvQB/wHcAtQVzQHUAdsB3AIZAvQDAAL0Av8B9AEZAQkL3AEJ
|
||||
ARkB9AL/AvQPAAH0Af8B3APNAdQB3AHUA80B3AH/ARkB3AEZAf8B9AMAAfQB/wHcAc0B1AncARkJ/wHc
|
||||
Ac0B3AH/AfQCAAH/AdwC1BXNAdQB2wHcAhkC9AMAA/QB/wH0ARkC3AHVB9QB2wLcARkB9AH/A/QPAAL0
|
||||
ARkB3AHUAc0D1AHNAdQC3AEZAdwB1AHVAdwBGQL0AQAB9AH/AdwBzQHUCdwBGQf/AfQBGQHVAc0B3AH/
|
||||
AfQCAAH/ARkC3ALVE9QB2wHcARkE9AUAAvQCGQHcAdUB1AfNAdQB2wHcAhkC9BMAAfQB/wHcBc0B3AH/
|
||||
ARkB3AHUA80B3AH/AfQBAAH0Af8B3AHNAdQJ3AEZB/8BGQHcAdQBzQHcAf8B9AIAA/8B9AEZAQkT3AEJ
|
||||
ARkB9AL/AvQDAAL0AfMBGQLcAdUB1AHOB80C1AHVAdwCGQP0EQAC9AEZAdwB1APNAdUBGQHcAtQBzQHU
|
||||
AdwBGQL0AQAC9AEZAdwB1QHUAdsF3AEJARkB9AX/AfQBGQHcAdQB1QHcARkC9AIAAvQB/wEZAdwB2w/U
|
||||
AdUB2wLcAQkBGQH0Af8D9AMAAvQBGQEJAdsC1AvNAdQB1QHcAhkC9BMAAfQB/wHcA80B1AHcAdQDzQHc
|
||||
Af8B9AUAAfQB/wHcAc0B1AXcARkH/wEZAdwB1AHNAdwB/wH0BQAC9AEJAdsB1A/NAtQB2wHcAQkCGQL0
|
||||
AwAC9AHzARkBCQHbAtQMzQHOAdQB1QLcARkB8wL0EQAC9AEZAdwB1AHNA9QBzQHUAdwBGQL0BQAC9AEZ
|
||||
AdwB1QPUAdsB3AEZA/8B9AEZAtwB1QHUAdUB3AEZAvQFAAL0AQkB2wHUD80C1AHbAdwBCQIZAvQDAAL0
|
||||
ARkBCQHbAtQPzQLUAdsBCQEZAvQTAAH0Af8B3AXNAdwB/wH0CQAB9AH/AdwDzQHUAdwBGQP/ARkB3AHU
|
||||
A80B3AH/AfQHAAL0AQkB2wHUD80C1AHbAdwBCQIZAvQDAAL0ARkBCQHbAtQPzQLUAdsBCQEZAvQTAAL0
|
||||
ARkB3AHUAc0B1AHcARkC9AkAAvQBGQPcAdUB1AHVA9wB1QHUAdUD3AEZAvQHAAL0AQkB2wHUD80C1AHb
|
||||
AdwBCQIZAvQDAAL0ARkBCQHbAtQPzQLUAdsBCQEZAvQVAAH0Af8B3AHNAdwB/wH0DQAB9AP/AdwHzQHc
|
||||
A/8B9AkAAvQBCQHbAdQPzQLUAdsB3AEJAhkC9AMAAvQB8wEZAQkT3AEJARkB8wL0FQAC9AEZAdwBGQL0
|
||||
DQAE9AEZB9wBGQT0CQAC9AIZEtwBCQIZBPQFAAL0Ff8C9BkAAfQB/wH0EwAB9Af/AfQNAAL0Gf8C9AIA
|
||||
AUIBTQE+BwABPgMAASgDAAGAAwABYAMAAQEBAAEBBgABBhYAA///AP8AAwAB4AEAAQMC/wGAAQMD/wGA
|
||||
Af8EAAHgAQABAwL/AYABAwP/AYAB/wQAAYACAAH/AfgCAAE/AYABOAEAAf8EAAGAAgAB/wH4AgABPwGA
|
||||
ATgBAAH/BAABgAIAAf8B4AIAAQ8BgAIAAf8EAAGAAgAB/wHgAgABDwGAAgAB/wcAAT8BgAIAAQMBgAIA
|
||||
Af8HAAE/AYACAAEDAYACAAH/BwABPwGAAgABAwGACgABPwGAAgABAwHgCgABPwQAAeAKAAE/BAAB4AoA
|
||||
AT8EAAHgCgABPwQAAfgKAAE/BAAB4AoAAT8EAAHgAgABAwcAAT8EAAGAAgABAwQAAYACAAH/BAABgAIA
|
||||
AQ8EAAGAAgABgAcAAQ8EAAGAAgABgAcAAT8EAAGACgABDwQAAeABAAECCAABDwQAAeAKAAEPBAAB/gMA
|
||||
AYACAAEDAwABDwQAAf4DAAGAAgABAwMAAQMEAAH+AwABgAIAAQMB/gIAAQMEAAH+AwABgAIAAQMB/gIA
|
||||
AQMEAAH+AwAB4AIAAQ8B/gIAAQMEAAH+AwAB4AIAAQ8B/gIAAQMEAAH/AYABAAEDAfgCAAE/Af4BAAE4
|
||||
AQMEAAH/AYABAAEDAfgCAAE/Af4BAAE4AQMEAAH/Af4BAAL/AYABAwH/Af4BDwL/BAAB/gIAAf8B+AED
|
||||
A/8B4AEPAf8EAAH+AgAB/wH4AQMD/wHgAQ8B/wQAAeACAAEPAYABAAE/Af8B/gIAAf8EAAHgAgABDwGA
|
||||
AQABPwH/Af4CAAH/BAABgAIAAQMBgAEAAT8B/wH4AgABPwQAAYACAAEDAYABAAE/Af8B+AIAAT8EAAGA
|
||||
AgABAwIAAQ8B/wHgAgABDwQAAYACAAEDAgABDwH/AeACAAEPCgABDwH/AYACAAEDCQAB4AEPAf8BgAIA
|
||||
AQMJAAHgAQ8B/wGAAgABAwkAAeABDwH/AYACAAEDCgABDwH/DgABDwH/DgABCAH/DAABgAEAATgB/wEA
|
||||
AQMBgAkAAYABAAEgAT8BAAEDAYAFAAGAAgABAwGAAQABIAE/AQABAwGABQABgAIAAQMBgAIAAQ8IAAGA
|
||||
AgABAwH4AgABDwgAAYACAAEDAfgCAAEDCAAB4AIAAQ8B/wHgAQABAwGAAgABAwQAAeACAAEPAf8B4AIA
|
||||
AYACAAEDBAAB+AIAAT8B/wH4AgABgAIAAQMEAAHgAgABDwH/AfgCAAGAAgABAwQAAeACAAEPAf8B/gEA
|
||||
AQMB4AIAAQ8BgAIAAQMBgAIAAQMB/wH+AQABAwHgAgABDwGAAgABAwGAAgABAwL/AYABDwH4AgABPwGA
|
||||
AgABAwGAAgABAwL/AYABDwH4AgABPwGAAgABAwGAAgABAwL/AeABPwH+AgAB/wGAAgABAwGAAgABAwL/
|
||||
AeABPwH+AgAB/wGAAgABAwHgAgABDwL/AfgC/wHgAQ8B/wGAAgABAws=
|
||||
</value>
|
||||
</data>
|
||||
<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>
|
||||
|
||||
@@ -13,6 +13,7 @@ public SAV_OPower()
|
||||
LoadData();
|
||||
}
|
||||
|
||||
private readonly SAV6 SAV = new SAV6(Main.SAV.Data);
|
||||
private void B_Cancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
Close();
|
||||
@@ -24,7 +25,7 @@ private void B_Save_Click(object sender, EventArgs e)
|
||||
}
|
||||
private void LoadData()
|
||||
{
|
||||
int o = Main.SAV.OPower;
|
||||
int o = SAV.OPower;
|
||||
|
||||
// Fill up the 17 o-powers
|
||||
// 1 2 3 4 5 10 use 4 bytes, everything else uses 3
|
||||
@@ -52,15 +53,15 @@ private void LoadData()
|
||||
CB_17.SelectedIndex = getIndex(o, 3);//o += 3; // 3E-40
|
||||
|
||||
// Load Maxes
|
||||
o = Main.SAV.OPower;
|
||||
CHK_1.Checked = Convert.ToBoolean(Main.SAV.Data[o + 0x00]);
|
||||
CHK_2.Checked = Convert.ToBoolean(Main.SAV.Data[o + 0x05]);
|
||||
CHK_3.Checked = Convert.ToBoolean(Main.SAV.Data[o + 0x0A]);
|
||||
CHK_4.Checked = Convert.ToBoolean(Main.SAV.Data[o + 0x0F]);
|
||||
CHK_5.Checked = Convert.ToBoolean(Main.SAV.Data[o + 0x14]);
|
||||
CHK_6.Checked = Convert.ToBoolean(Main.SAV.Data[o + 0x19]);
|
||||
CHK_7.Checked = Convert.ToBoolean(Main.SAV.Data[o + 0x26]);
|
||||
CHK_8.Checked = Convert.ToBoolean(Main.SAV.Data[o + 0x2B]);
|
||||
o = SAV.OPower;
|
||||
CHK_1.Checked = Convert.ToBoolean(SAV.Data[o + 0x00]);
|
||||
CHK_2.Checked = Convert.ToBoolean(SAV.Data[o + 0x05]);
|
||||
CHK_3.Checked = Convert.ToBoolean(SAV.Data[o + 0x0A]);
|
||||
CHK_4.Checked = Convert.ToBoolean(SAV.Data[o + 0x0F]);
|
||||
CHK_5.Checked = Convert.ToBoolean(SAV.Data[o + 0x14]);
|
||||
CHK_6.Checked = Convert.ToBoolean(SAV.Data[o + 0x19]);
|
||||
CHK_7.Checked = Convert.ToBoolean(SAV.Data[o + 0x26]);
|
||||
CHK_8.Checked = Convert.ToBoolean(SAV.Data[o + 0x2B]);
|
||||
}
|
||||
private void SaveData()
|
||||
{
|
||||
@@ -76,7 +77,7 @@ private void SaveData()
|
||||
0x27,
|
||||
0x2C,0x2F,0x32,0x35,0x38,0x3B,0x3E,
|
||||
};
|
||||
int o = Main.SAV.OPower; // offset
|
||||
int o = SAV.OPower; // offset
|
||||
|
||||
for (int i = 0; i < cba.Length; i++)
|
||||
{
|
||||
@@ -90,14 +91,15 @@ private void SaveData()
|
||||
|
||||
// Save Maxes
|
||||
|
||||
Main.SAV.Data[o + 0x00] = Convert.ToByte(CHK_1.Checked);
|
||||
Main.SAV.Data[o + 0x05] = Convert.ToByte(CHK_2.Checked);
|
||||
Main.SAV.Data[o + 0x0A] = Convert.ToByte(CHK_3.Checked);
|
||||
Main.SAV.Data[o + 0x0F] = Convert.ToByte(CHK_4.Checked);
|
||||
Main.SAV.Data[o + 0x14] = Convert.ToByte(CHK_5.Checked);
|
||||
Main.SAV.Data[o + 0x19] = Convert.ToByte(CHK_6.Checked);
|
||||
Main.SAV.Data[o + 0x26] = Convert.ToByte(CHK_7.Checked);
|
||||
Main.SAV.Data[o + 0x2B] = Convert.ToByte(CHK_8.Checked);
|
||||
SAV.Data[o + 0x00] = Convert.ToByte(CHK_1.Checked);
|
||||
SAV.Data[o + 0x05] = Convert.ToByte(CHK_2.Checked);
|
||||
SAV.Data[o + 0x0A] = Convert.ToByte(CHK_3.Checked);
|
||||
SAV.Data[o + 0x0F] = Convert.ToByte(CHK_4.Checked);
|
||||
SAV.Data[o + 0x14] = Convert.ToByte(CHK_5.Checked);
|
||||
SAV.Data[o + 0x19] = Convert.ToByte(CHK_6.Checked);
|
||||
SAV.Data[o + 0x26] = Convert.ToByte(CHK_7.Checked);
|
||||
SAV.Data[o + 0x2B] = Convert.ToByte(CHK_8.Checked);
|
||||
Array.Copy(SAV.Data, Main.SAV.Data, SAV.Data.Length);
|
||||
Main.SAV.Edited = true;
|
||||
}
|
||||
private int getIndex(int o, int l)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace PKHeX
|
||||
{
|
||||
partial class SAV_BerryFieldORAS
|
||||
partial class SAV_PokeBlockORAS
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
@@ -28,7 +28,7 @@ protected override void Dispose(bool disposing)
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SAV_BerryFieldORAS));
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SAV_PokeBlockORAS));
|
||||
this.B_Cancel = new System.Windows.Forms.Button();
|
||||
this.B_Save = new System.Windows.Forms.Button();
|
||||
this.NUP_Red = new System.Windows.Forms.NumericUpDown();
|
||||
@@ -466,7 +466,7 @@ private void InitializeComponent()
|
||||
this.MaximumSize = new System.Drawing.Size(420, 220);
|
||||
this.MinimizeBox = false;
|
||||
this.MinimumSize = new System.Drawing.Size(420, 220);
|
||||
this.Name = "SAV_BerryFieldORAS";
|
||||
this.Name = "SAV_PokeBlockORAS";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Berry Field Editor";
|
||||
((System.ComponentModel.ISupportInitialize)(this.NUP_Red)).EndInit();
|
||||
@@ -3,9 +3,9 @@
|
||||
|
||||
namespace PKHeX
|
||||
{
|
||||
public partial class SAV_BerryFieldORAS : Form
|
||||
public partial class SAV_PokeBlockORAS : Form
|
||||
{
|
||||
public SAV_BerryFieldORAS()
|
||||
public SAV_PokeBlockORAS()
|
||||
{
|
||||
InitializeComponent();
|
||||
Util.TranslateInterface(this, Main.curlanguage);
|
||||
@@ -15,11 +15,11 @@ public SAV_BerryFieldORAS()
|
||||
for (int i = 0; i < lbl_spec.Length; i++)
|
||||
{
|
||||
lbl_spec[i].Text = $"{Main.pokeblocks[94 + i]}:";
|
||||
nup_spec[i].Value = BitConverter.ToUInt32(sav, Main.SAV.Contest + i * 4);
|
||||
nup_spec[i].Value = BitConverter.ToUInt32(SAV.Data, SAV.Contest + i * 4);
|
||||
}
|
||||
}
|
||||
private readonly NumericUpDown[] nup_spec;
|
||||
private readonly byte[] sav = (byte[])Main.SAV.Data.Clone();
|
||||
private readonly SAV6 SAV = new SAV6(Main.SAV.Data);
|
||||
|
||||
private void B_Cancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -28,8 +28,8 @@ private void B_Cancel_Click(object sender, EventArgs e)
|
||||
private void B_Save_Click(object sender, EventArgs e)
|
||||
{
|
||||
for (int i = 0; i < nup_spec.Length; i++)
|
||||
BitConverter.GetBytes((uint)nup_spec[i].Value).CopyTo(sav, Main.SAV.Contest + i * 4);
|
||||
Main.SAV.Data = (byte[])sav.Clone();
|
||||
BitConverter.GetBytes((uint)nup_spec[i].Value).CopyTo(SAV.Data, SAV.Contest + i * 4);
|
||||
Main.SAV.Data = (byte[])SAV.Data.Clone();
|
||||
Close();
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ private void B_RandomizeBerries_Click(object sender, EventArgs e)
|
||||
{
|
||||
ushort berry = plantable[Util.rnd32() % (plantable.Length - 1) + 1]; // get random berry item ID from list
|
||||
BitConverter.GetBytes(berry).CopyTo(tree, 6); // put berry into tree.
|
||||
tree.CopyTo(sav, Main.SAV.BerryField + 0x10 * i); // put tree into plot
|
||||
tree.CopyTo(SAV.Data, SAV.BerryField + 0x10 * i); // put tree into plot
|
||||
}
|
||||
}
|
||||
private void B_GiveAllBlocks_Click(object sender, EventArgs e)
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace PKHeX
|
||||
@@ -20,24 +21,22 @@ public SAV_PokedexORAS()
|
||||
CB_Species.Items.Clear();
|
||||
|
||||
// Fill List
|
||||
var species_list = Util.getCBList(Main.specieslist, null);
|
||||
species_list.RemoveAt(0); // Remove 0th Entry
|
||||
CB_Species.DisplayMember = "Text";
|
||||
CB_Species.ValueMember = "Value";
|
||||
CB_Species.DataSource = species_list;
|
||||
CB_Species.DataSource = Util.getCBList(Main.specieslist.Skip(1).Take(SAV.MaxSpeciesID).ToArray(), null);
|
||||
|
||||
for (int i = 1; i < Main.specieslist.Length; i++)
|
||||
for (int i = 1; i < SAV.MaxSpeciesID + 1; i++)
|
||||
LB_Species.Items.Add(i.ToString("000") + " - " + Main.specieslist[i]);
|
||||
|
||||
getData();
|
||||
editing = false;
|
||||
LB_Species.SelectedIndex = 0;
|
||||
TB_Spinda.Text = BitConverter.ToUInt32(sav, Main.SAV.Spinda).ToString("X8");
|
||||
TB_Spinda.Text = BitConverter.ToUInt32(SAV.Data, SAV.Spinda).ToString("X8");
|
||||
}
|
||||
|
||||
private readonly SAV6 SAV = new SAV6(Main.SAV.Data);
|
||||
private readonly CheckBox[] CP;
|
||||
private readonly CheckBox[] CL;
|
||||
private readonly byte[] sav = (byte[])Main.SAV.Data.Clone();
|
||||
private readonly bool[,] specbools = new bool[9, 0x60 * 8];
|
||||
private readonly bool[,] langbools = new bool[7, 0x60 * 8];
|
||||
private BitArray formbools;
|
||||
@@ -123,13 +122,13 @@ private void getEntry()
|
||||
CHK_P3.Enabled = CHK_P5.Enabled = CHK_P7.Enabled = CHK_P9.Enabled = gt != 0 && gt != 255; // Not Male-Only and Not Genderless
|
||||
|
||||
// Load Encountered Count
|
||||
MT_Count.Text = BitConverter.ToUInt16(sav, Main.SAV.EncounterCount + (pk - 1) * 2).ToString();
|
||||
MT_Count.Text = BitConverter.ToUInt16(SAV.Data, SAV.EncounterCount + (pk - 1) * 2).ToString();
|
||||
|
||||
CLB_FormsSeen.Items.Clear();
|
||||
CLB_FormDisplayed.Items.Clear();
|
||||
|
||||
int fc = PKX.Personal[species].FormeCount;
|
||||
int f = PKX.getDexFormIndexORAS(species, fc);
|
||||
int f = SaveUtil.getDexFormIndexORAS(species, fc);
|
||||
if (f < 0)
|
||||
return;
|
||||
string[] forms = PKX.getFormList(species, Main.types, Main.forms, Main.gendersymbols);
|
||||
@@ -170,10 +169,10 @@ private void setEntry()
|
||||
langbools[5, species - 1] = CHK_L6.Checked;
|
||||
langbools[6, species - 1] = CHK_L7.Checked;
|
||||
|
||||
BitConverter.GetBytes((ushort)Math.Min(0xFFFF, Util.ToUInt32(MT_Count.Text))).CopyTo(sav, Main.SAV.EncounterCount + (species - 1) * 2);
|
||||
BitConverter.GetBytes((ushort)Math.Min(0xFFFF, Util.ToUInt32(MT_Count.Text))).CopyTo(SAV.Data, SAV.EncounterCount + (species - 1) * 2);
|
||||
|
||||
int fc = PKX.Personal[species].FormeCount;
|
||||
int f = PKX.getDexFormIndexORAS(species, fc);
|
||||
int f = SaveUtil.getDexFormIndexORAS(species, fc);
|
||||
if (f < 0)
|
||||
return;
|
||||
|
||||
@@ -196,8 +195,8 @@ private void getData()
|
||||
for (int i = 0; i < 9; i++)
|
||||
{
|
||||
byte[] data = new byte[0x60];
|
||||
int offset = Main.SAV.PokeDex + 0x8 + 0x60 * i;
|
||||
Array.Copy(sav, offset, data, 0, data.Length);
|
||||
int offset = SAV.PokeDex + 0x8 + 0x60 * i;
|
||||
Array.Copy(SAV.Data, offset, data, 0, data.Length);
|
||||
BitArray BitRegion = new BitArray(data);
|
||||
for (int b = 0; b < 0x60 * 8; b++)
|
||||
specbools[i, b] = BitRegion[b];
|
||||
@@ -205,14 +204,14 @@ private void getData()
|
||||
|
||||
// Fill Language arrays
|
||||
byte[] langdata = new byte[0x280];
|
||||
Array.Copy(sav, Main.SAV.PokeDexLanguageFlags, langdata, 0, langdata.Length);
|
||||
Array.Copy(SAV.Data, SAV.PokeDexLanguageFlags, langdata, 0, langdata.Length);
|
||||
BitArray LangRegion = new BitArray(langdata);
|
||||
for (int b = 0; b < 721; b++) // 721 Species
|
||||
for (int i = 0; i < 7; i++) // 7 Languages
|
||||
langbools[i, b] = LangRegion[7 * b + i];
|
||||
|
||||
byte[] formdata = new byte[FormLen*4];
|
||||
Array.Copy(sav, Main.SAV.PokeDex + 0x368, formdata, 0, formdata.Length);
|
||||
Array.Copy(SAV.Data, SAV.PokeDex + 0x368, formdata, 0, formdata.Length);
|
||||
formbools = new BitArray(formdata);
|
||||
}
|
||||
private void setData()
|
||||
@@ -227,7 +226,7 @@ private void setData()
|
||||
if (specbools[p, i])
|
||||
sdata[i/8] |= (byte) (1 << i%8);
|
||||
|
||||
sdata.CopyTo(sav, Main.SAV.PokeDex + 8 + 0x60*p);
|
||||
sdata.CopyTo(SAV.Data, SAV.PokeDex + 8 + 0x60*p);
|
||||
}
|
||||
|
||||
// Build new bool array for the Languages
|
||||
@@ -243,13 +242,13 @@ private void setData()
|
||||
if (languagedata[i])
|
||||
ldata[i/8] |= (byte) (1 << i%8);
|
||||
|
||||
ldata.CopyTo(sav, Main.SAV.PokeDexLanguageFlags);
|
||||
ldata.CopyTo(SAV.Data, SAV.PokeDexLanguageFlags);
|
||||
|
||||
formbools.CopyTo(sav, Main.SAV.PokeDex + 0x368);
|
||||
formbools.CopyTo(SAV.Data, SAV.PokeDex + 0x368);
|
||||
|
||||
// Store Spinda Spot
|
||||
uint PID = Util.getHEXval(TB_Spinda.Text);
|
||||
BitConverter.GetBytes(PID).CopyTo(sav, Main.SAV.Spinda);
|
||||
BitConverter.GetBytes(PID).CopyTo(SAV.Data, SAV.Spinda);
|
||||
}
|
||||
|
||||
private void B_Cancel_Click(object sender, EventArgs e)
|
||||
@@ -262,7 +261,7 @@ private void B_Save_Click(object sender, EventArgs e)
|
||||
setData();
|
||||
|
||||
// Return back to the parent savefile
|
||||
Array.Copy(sav, Main.SAV.Data, sav.Length);
|
||||
Array.Copy(SAV.Data, Main.SAV.Data, SAV.Data.Length);
|
||||
Main.SAV.Edited = true;
|
||||
Close();
|
||||
}
|
||||
@@ -313,17 +312,17 @@ private void modifyAll(object sender, EventArgs e)
|
||||
if (mnuDexNav == sender)
|
||||
{
|
||||
for (int i = 0; i < 0x2D1; i++)
|
||||
BitConverter.GetBytes((ushort)999).CopyTo(sav, Main.SAV.EncounterCount + i * 2);
|
||||
BitConverter.GetBytes((ushort)999).CopyTo(SAV.Data, SAV.EncounterCount + i * 2);
|
||||
return;
|
||||
}
|
||||
if (mnuResetNav == sender)
|
||||
{
|
||||
for (int i = 0; i < 0x2D1; i++)
|
||||
BitConverter.GetBytes((ushort)0).CopyTo(sav, Main.SAV.EncounterCount + i * 2);
|
||||
BitConverter.GetBytes((ushort)0).CopyTo(SAV.Data, SAV.EncounterCount + i * 2);
|
||||
return;
|
||||
}
|
||||
|
||||
int lang = Main.SAV.Language;
|
||||
int lang = SAV.Language;
|
||||
if (lang > 5) lang -= 1;
|
||||
lang -= 1;
|
||||
|
||||
@@ -392,7 +391,7 @@ private void modifyAll(object sender, EventArgs e)
|
||||
setEntry();
|
||||
setData();
|
||||
if (mnuComplete == sender) // Turn off Italian Petlil
|
||||
sav[Main.SAV.PokeDexLanguageFlags + 0x1DF] &= 0xFE;
|
||||
SAV.Data[SAV.PokeDexLanguageFlags + 0x1DF] &= 0xFE;
|
||||
|
||||
getData();
|
||||
getEntry();
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace PKHeX
|
||||
@@ -20,24 +21,22 @@ public SAV_PokedexXY()
|
||||
CB_Species.Items.Clear();
|
||||
|
||||
// Fill List
|
||||
var species_list = Util.getCBList(Main.specieslist, null);
|
||||
species_list.RemoveAt(0); // Remove 0th Entry
|
||||
CB_Species.DisplayMember = "Text";
|
||||
CB_Species.ValueMember = "Value";
|
||||
CB_Species.DataSource = species_list;
|
||||
CB_Species.DataSource = Util.getCBList(Main.specieslist.Skip(1).Take(SAV.MaxSpeciesID).ToArray(), null);
|
||||
|
||||
for (int i = 1; i < Main.specieslist.Length; i++)
|
||||
for (int i = 1; i < SAV.MaxSpeciesID + 1; i++)
|
||||
LB_Species.Items.Add(i.ToString("000") + " - " + Main.specieslist[i]);
|
||||
|
||||
getData();
|
||||
editing = false;
|
||||
LB_Species.SelectedIndex = 0;
|
||||
TB_Spinda.Text = BitConverter.ToUInt32(sav, Main.SAV.Spinda).ToString("X8");
|
||||
TB_Spinda.Text = BitConverter.ToUInt32(SAV.Data, SAV.Spinda).ToString("X8");
|
||||
}
|
||||
|
||||
private readonly SAV6 SAV = new SAV6(Main.SAV.Data);
|
||||
private readonly CheckBox[] CP;
|
||||
private readonly CheckBox[] CL;
|
||||
private readonly byte[] sav = (byte[])Main.SAV.Data.Clone();
|
||||
private readonly bool[,] specbools = new bool[9, 0x60 * 8];
|
||||
private readonly bool[,] langbools = new bool[7, 0x60 * 8];
|
||||
private readonly bool[] foreignbools = new bool[0x52 * 8];
|
||||
@@ -130,7 +129,7 @@ private void getEntry()
|
||||
CLB_FormDisplayed.Items.Clear();
|
||||
|
||||
int fc = PKX.Personal[species].FormeCount;
|
||||
int f = PKX.getDexFormIndexXY(species, fc);
|
||||
int f = SaveUtil.getDexFormIndexXY(species, fc);
|
||||
if (f < 0)
|
||||
return;
|
||||
string[] forms = PKX.getFormList(species, Main.types, Main.forms, Main.gendersymbols);
|
||||
@@ -174,7 +173,7 @@ private void setEntry()
|
||||
langbools[6, species - 1] = CHK_L7.Checked;
|
||||
|
||||
int fc = PKX.Personal[species].FormeCount;
|
||||
int f = PKX.getDexFormIndexORAS(species, fc);
|
||||
int f = SaveUtil.getDexFormIndexORAS(species, fc);
|
||||
if (f < 0)
|
||||
return;
|
||||
|
||||
@@ -197,7 +196,7 @@ private void getData()
|
||||
for (int i = 0; i < 9; i++)
|
||||
{
|
||||
byte[] data = new byte[0x60];
|
||||
Array.Copy(sav, Main.SAV.PokeDex + 8 + 0x60 * i, data, 0, 0x60);
|
||||
Array.Copy(SAV.Data, SAV.PokeDex + 8 + 0x60 * i, data, 0, 0x60);
|
||||
BitArray BitRegion = new BitArray(data);
|
||||
for (int b = 0; b < 0x60 * 8; b++)
|
||||
specbools[i, b] = BitRegion[b];
|
||||
@@ -205,7 +204,7 @@ private void getData()
|
||||
|
||||
// Fill Language arrays
|
||||
byte[] langdata = new byte[0x280];
|
||||
Array.Copy(sav, Main.SAV.PokeDexLanguageFlags, langdata, 0, 0x280);
|
||||
Array.Copy(SAV.Data, SAV.PokeDexLanguageFlags, langdata, 0, 0x280);
|
||||
BitArray LangRegion = new BitArray(langdata);
|
||||
for (int b = 0; b < 721; b++) // 721 Species
|
||||
for (int i = 0; i < 7; i++) // 7 Languages
|
||||
@@ -213,13 +212,13 @@ private void getData()
|
||||
|
||||
// Fill Foreign array
|
||||
byte[] foreigndata = new byte[0x52];
|
||||
Array.Copy(sav, Main.SAV.PokeDex + 0x64C, foreigndata, 0, 0x52);
|
||||
Array.Copy(SAV.Data, SAV.PokeDex + 0x64C, foreigndata, 0, 0x52);
|
||||
BitArray ForeignRegion = new BitArray(foreigndata);
|
||||
for (int b = 0; b < 0x52 * 8; b++)
|
||||
foreignbools[b] = ForeignRegion[b];
|
||||
|
||||
byte[] formdata = new byte[FormLen*4];
|
||||
Array.Copy(sav, Main.SAV.PokeDex + 0x368, formdata, 0, formdata.Length);
|
||||
Array.Copy(SAV.Data, SAV.PokeDex + 0x368, formdata, 0, formdata.Length);
|
||||
formbools = new BitArray(formdata);
|
||||
}
|
||||
private void setData()
|
||||
@@ -234,7 +233,7 @@ private void setData()
|
||||
if (specbools[p, i])
|
||||
sdata[i / 8] |= (byte)(1 << i % 8);
|
||||
|
||||
sdata.CopyTo(sav, Main.SAV.PokeDex + 8 + 0x60 * p);
|
||||
sdata.CopyTo(SAV.Data, SAV.PokeDex + 8 + 0x60 * p);
|
||||
}
|
||||
|
||||
// Build new bool array for the Languages
|
||||
@@ -251,10 +250,10 @@ private void setData()
|
||||
if (languagedata[i])
|
||||
ldata[i / 8] |= (byte)(1 << i % 8);
|
||||
|
||||
ldata.CopyTo(sav, Main.SAV.PokeDexLanguageFlags);
|
||||
ldata.CopyTo(SAV.Data, SAV.PokeDexLanguageFlags);
|
||||
}
|
||||
|
||||
formbools.CopyTo(sav, Main.SAV.PokeDex + 0x368);
|
||||
formbools.CopyTo(SAV.Data, SAV.PokeDex + 0x368);
|
||||
|
||||
// Return Foreign Array
|
||||
{
|
||||
@@ -262,12 +261,12 @@ private void setData()
|
||||
for (int i = 0; i < 0x52 * 8; i++)
|
||||
if (foreignbools[i])
|
||||
foreigndata[i / 8] |= (byte)(1 << i % 8);
|
||||
foreigndata.CopyTo(sav, Main.SAV.PokeDex + 0x64C);
|
||||
foreigndata.CopyTo(SAV.Data, SAV.PokeDex + 0x64C);
|
||||
}
|
||||
|
||||
// Store Spinda Spot
|
||||
uint PID = Util.getHEXval(TB_Spinda.Text);
|
||||
BitConverter.GetBytes(PID).CopyTo(sav, Main.SAV.Spinda);
|
||||
BitConverter.GetBytes(PID).CopyTo(SAV.Data, SAV.Spinda);
|
||||
}
|
||||
|
||||
private void B_Cancel_Click(object sender, EventArgs e)
|
||||
@@ -280,7 +279,7 @@ private void B_Save_Click(object sender, EventArgs e)
|
||||
setData();
|
||||
|
||||
// Return back to the parent savefile
|
||||
Array.Copy(sav, Main.SAV.Data, sav.Length);
|
||||
Array.Copy(SAV.Data, Main.SAV.Data, SAV.Data.Length);
|
||||
Main.SAV.Edited = true;
|
||||
Close();
|
||||
}
|
||||
@@ -324,7 +323,7 @@ private void B_Modify_Click(object sender, EventArgs e)
|
||||
}
|
||||
private void modifyAll(object sender, EventArgs e)
|
||||
{
|
||||
int lang = Main.SAV.Language;
|
||||
int lang = SAV.Language;
|
||||
if (lang > 5) lang -= 1;
|
||||
lang -= 1;
|
||||
|
||||
@@ -393,7 +392,7 @@ private void modifyAll(object sender, EventArgs e)
|
||||
setEntry();
|
||||
setData();
|
||||
if (mnuComplete == sender) // Turn off Italian Petlil
|
||||
sav[Main.SAV.PokeDexLanguageFlags + 0x1DF] &= 0xFE;
|
||||
SAV.Data[SAV.PokeDexLanguageFlags + 0x1DF] &= 0xFE;
|
||||
|
||||
getData();
|
||||
getEntry();
|
||||
|
||||
@@ -18,7 +18,7 @@ public SAV_Pokepuff()
|
||||
new ToolTip().SetToolTip(B_All, "Hold CTRL to give Deluxe instead of Supreme.");
|
||||
}
|
||||
|
||||
private readonly byte[] sav = (byte[])Main.SAV.Data.Clone();
|
||||
private readonly SAV6 SAV = new SAV6(Main.SAV.Data);
|
||||
private readonly string[] pfa;
|
||||
private void Setup()
|
||||
{
|
||||
@@ -52,9 +52,9 @@ private void Setup()
|
||||
for (int i = 0; i < 100; i++)
|
||||
{
|
||||
dgv.Rows[i].Cells[0].Value = (i + 1).ToString();
|
||||
dgv.Rows[i].Cells[1].Value = pfa[sav[Main.SAV.Puff + i]];
|
||||
dgv.Rows[i].Cells[1].Value = pfa[SAV.Data[SAV.Puff + i]];
|
||||
}
|
||||
MT_CNT.Text = Main.SAV.PuffCount.ToString();
|
||||
MT_CNT.Text = SAV.PuffCount.ToString();
|
||||
}
|
||||
private void dropclick(object sender, DataGridViewCellEventArgs e)
|
||||
{
|
||||
@@ -79,7 +79,7 @@ private void B_All_Click(object sender, EventArgs e)
|
||||
for (int i = 0; i < 100; i++)
|
||||
newpuffs[i] = (byte)(Util.rnd32()%basemod + basepuff);
|
||||
|
||||
Array.Copy(newpuffs, 0, sav, Main.SAV.Puff, 100);
|
||||
Array.Copy(newpuffs, 0, SAV.Data, SAV.Puff, 100);
|
||||
Setup();
|
||||
}
|
||||
private void B_None_Click(object sender, EventArgs e)
|
||||
@@ -90,7 +90,7 @@ private void B_None_Click(object sender, EventArgs e)
|
||||
newpuffs[2] = 3;
|
||||
newpuffs[3] = 4;
|
||||
newpuffs[4] = 5;
|
||||
Array.Copy(newpuffs, 0, sav, Main.SAV.Puff, 100);
|
||||
Array.Copy(newpuffs, 0, SAV.Data, SAV.Puff, 100);
|
||||
Setup();
|
||||
}
|
||||
private void B_Sort_Click(object sender, EventArgs e)
|
||||
@@ -121,7 +121,7 @@ private void B_Sort_Click(object sender, EventArgs e)
|
||||
Array.Sort(puffarray);
|
||||
Array.Resize(ref puffarray, 100);
|
||||
}
|
||||
Array.Copy(puffarray, 0, sav, Main.SAV.Puff, 100);
|
||||
Array.Copy(puffarray, 0, SAV.Data, SAV.Puff, 100);
|
||||
Setup();
|
||||
}
|
||||
private void B_Save_Click(object sender, EventArgs e)
|
||||
@@ -138,8 +138,9 @@ private void B_Save_Click(object sender, EventArgs e)
|
||||
}
|
||||
puffarray[i - emptyslots] = (byte)Array.IndexOf(pfa, puff);
|
||||
}
|
||||
Main.SAV.Puffs = puffarray;
|
||||
Main.SAV.PuffCount = Util.ToInt32(MT_CNT.Text);
|
||||
SAV.Puffs = puffarray;
|
||||
SAV.PuffCount = Util.ToInt32(MT_CNT.Text);
|
||||
Main.SAV.Data = SAV.Data;
|
||||
Main.SAV.Edited = true;
|
||||
Close();
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
@@ -18,11 +20,11 @@ public SAV_SecretBase()
|
||||
|
||||
LB_Favorite.SelectedIndex = 0;
|
||||
// MT_Flags.Text = BitConverter.ToUInt16(sav, 0x24800 + 0x140).ToString(); PSS Stat transmitted
|
||||
MT_Flags.Text = BitConverter.ToUInt32(sav, Main.SAV.SecretBase + 0x62C).ToString(); // read counter
|
||||
MT_Flags.Text = BitConverter.ToUInt32(SAV.Data, SAV.SecretBase + 0x62C).ToString(); // read counter
|
||||
B_SAV2FAV(null, null);
|
||||
}
|
||||
|
||||
private readonly byte[] sav = (byte[])Main.SAV.Data.Clone();
|
||||
private readonly SAV6 SAV = new SAV6(Main.SAV.Data);
|
||||
private bool editing;
|
||||
private bool loading = true;
|
||||
|
||||
@@ -33,9 +35,9 @@ private void setupComboBoxes()
|
||||
CB_Ball.DisplayMember = CB_HeldItem.DisplayMember = CB_Species.DisplayMember = CB_Nature.DisplayMember = "Text";
|
||||
CB_Ball.ValueMember = CB_HeldItem.ValueMember = CB_Species.ValueMember = CB_Nature.ValueMember = "Value";
|
||||
|
||||
CB_Ball.DataSource = new BindingSource(Main.BallDataSource, null);
|
||||
CB_Ball.DataSource = new BindingSource(Main.BallDataSource.Where(b => b.Value <= SAV.MaxBallID), null);
|
||||
CB_HeldItem.DataSource = new BindingSource(Main.ItemDataSource, null);
|
||||
CB_Species.DataSource = new BindingSource(Main.SpeciesDataSource, null);
|
||||
CB_Species.DataSource = new BindingSource(Main.SpeciesDataSource.Where(s => s.Value <= SAV.MaxSpeciesID), null);
|
||||
CB_Nature.DataSource = new BindingSource(Main.NatureDataSource, null);
|
||||
|
||||
|
||||
@@ -53,13 +55,13 @@ private void popFavorite()
|
||||
{
|
||||
LB_Favorite.Items.Clear();
|
||||
|
||||
int playeroff = Main.SAV.SecretBase + 0x326;
|
||||
int favoff = Main.SAV.SecretBase + 0x63A;
|
||||
string OT = Util.TrimFromZero(Encoding.Unicode.GetString(sav, playeroff + 0x218, 0x1A));
|
||||
int playeroff = SAV.SecretBase + 0x326;
|
||||
int favoff = SAV.SecretBase + 0x63A;
|
||||
string OT = Util.TrimFromZero(Encoding.Unicode.GetString(SAV.Data, playeroff + 0x218, 0x1A));
|
||||
LB_Favorite.Items.Add("* " + OT);
|
||||
for (int i = 0; i < 30; i++)
|
||||
{
|
||||
string BaseTrainer = Util.TrimFromZero(Encoding.Unicode.GetString(sav, favoff + i * 0x3E0 + 0x218, 0x1A));
|
||||
string BaseTrainer = Util.TrimFromZero(Encoding.Unicode.GetString(SAV.Data, favoff + i * 0x3E0 + 0x218, 0x1A));
|
||||
if (BaseTrainer.Length < 1 || BaseTrainer[0] == '\0')
|
||||
BaseTrainer = "Empty";
|
||||
LB_Favorite.Items.Add(i + " " + BaseTrainer);
|
||||
@@ -70,24 +72,24 @@ private void B_SAV2FAV(object sender, EventArgs e)
|
||||
loading = true;
|
||||
int index = LB_Favorite.SelectedIndex;
|
||||
if (index < 0) return;
|
||||
int offset = Main.SAV.SecretBase + 0x25A;
|
||||
int offset = SAV.SecretBase + 0x25A;
|
||||
|
||||
// Base Offset Changing
|
||||
if (index == 0) offset = Main.SAV.SecretBase + 0x326;
|
||||
if (index == 0) offset = SAV.SecretBase + 0x326;
|
||||
else offset += 0x3E0 * index;
|
||||
|
||||
string TrainerName = Util.TrimFromZero(Encoding.Unicode.GetString(sav, offset + 0x218, 0x1A));
|
||||
string TrainerName = Util.TrimFromZero(Encoding.Unicode.GetString(SAV.Data, offset + 0x218, 0x1A));
|
||||
TB_FOT.Text = TrainerName;
|
||||
|
||||
TB_FT1.Text = Util.TrimFromZero(Encoding.Unicode.GetString(sav, offset + 0x232 + 0x22 * 0, 0x22));
|
||||
TB_FT2.Text = Util.TrimFromZero(Encoding.Unicode.GetString(sav, offset + 0x232 + 0x22 * 1, 0x22));
|
||||
TB_FT1.Text = Util.TrimFromZero(Encoding.Unicode.GetString(SAV.Data, offset + 0x232 + 0x22 * 0, 0x22));
|
||||
TB_FT2.Text = Util.TrimFromZero(Encoding.Unicode.GetString(SAV.Data, offset + 0x232 + 0x22 * 1, 0x22));
|
||||
|
||||
string saying1 = Util.TrimFromZero(Encoding.Unicode.GetString(sav, offset + 0x276 + 0x22 * 0, 0x22));
|
||||
string saying2 = Util.TrimFromZero(Encoding.Unicode.GetString(sav, offset + 0x276 + 0x22 * 1, 0x22));
|
||||
string saying3 = Util.TrimFromZero(Encoding.Unicode.GetString(sav, offset + 0x276 + 0x22 * 2, 0x22));
|
||||
string saying4 = Util.TrimFromZero(Encoding.Unicode.GetString(sav, offset + 0x276 + 0x22 * 3, 0x22));
|
||||
string saying1 = Util.TrimFromZero(Encoding.Unicode.GetString(SAV.Data, offset + 0x276 + 0x22 * 0, 0x22));
|
||||
string saying2 = Util.TrimFromZero(Encoding.Unicode.GetString(SAV.Data, offset + 0x276 + 0x22 * 1, 0x22));
|
||||
string saying3 = Util.TrimFromZero(Encoding.Unicode.GetString(SAV.Data, offset + 0x276 + 0x22 * 2, 0x22));
|
||||
string saying4 = Util.TrimFromZero(Encoding.Unicode.GetString(SAV.Data, offset + 0x276 + 0x22 * 3, 0x22));
|
||||
|
||||
int baseloc = BitConverter.ToInt16(sav, offset);
|
||||
int baseloc = BitConverter.ToInt16(SAV.Data, offset);
|
||||
NUD_FBaseLocation.Value = baseloc;
|
||||
|
||||
TB_FSay1.Text = saying1; TB_FSay2.Text = saying2; TB_FSay3.Text = saying3; TB_FSay4.Text = saying4;
|
||||
@@ -96,7 +98,7 @@ private void B_SAV2FAV(object sender, EventArgs e)
|
||||
objdata = new byte[25, 12];
|
||||
for (int i = 0; i < 25; i++)
|
||||
for (int z = 0; z < 12; z++)
|
||||
objdata[i, z] = sav[offset + 2 + 12 * i + z];
|
||||
objdata[i, z] = SAV.Data[offset + 2 + 12 * i + z];
|
||||
NUD_FObject.Value = 1; // Trigger Update
|
||||
changeObjectIndex(null, null);
|
||||
|
||||
@@ -107,7 +109,7 @@ private void B_SAV2FAV(object sender, EventArgs e)
|
||||
if (index > 0)
|
||||
for (int i = 0; i < 3; i++)
|
||||
for (int z = 0; z < 0x34; z++)
|
||||
pkmdata[i, z] = sav[offset + 0x32E + 0x34 * i + z];
|
||||
pkmdata[i, z] = SAV.Data[offset + 0x32E + 0x34 * i + z];
|
||||
|
||||
NUD_FPKM.Value = 1;
|
||||
changeFavPKM(null, null); // Trigger Update
|
||||
@@ -127,54 +129,54 @@ private void B_FAV2SAV(object sender, EventArgs e)
|
||||
if (LB_Favorite.Items[index].ToString().Substring(LB_Favorite.Items[index].ToString().Length - 5, 5) == "Empty")
|
||||
{ Util.Error("Sorry, no overwriting an empty base with someone else's."); return; }
|
||||
if (index < 0) return;
|
||||
int offset = Main.SAV.SecretBase + 0x25A;
|
||||
int offset = SAV.SecretBase + 0x25A;
|
||||
|
||||
// Base Offset Changing
|
||||
if (index == 0)
|
||||
offset = Main.SAV.SecretBase + 0x326;
|
||||
offset = SAV.SecretBase + 0x326;
|
||||
else offset += 0x3E0 * index;
|
||||
|
||||
string TrainerName = TB_FOT.Text;
|
||||
byte[] tr = Encoding.Unicode.GetBytes(TrainerName);
|
||||
Array.Resize(ref tr, 0x22); Array.Copy(tr, 0, sav, offset + 0x218, 0x1A);
|
||||
Array.Resize(ref tr, 0x22); Array.Copy(tr, 0, SAV.Data, offset + 0x218, 0x1A);
|
||||
|
||||
string team1 = TB_FT1.Text;
|
||||
string team2 = TB_FT2.Text;
|
||||
byte[] t1 = Encoding.Unicode.GetBytes(team1);
|
||||
Array.Resize(ref t1, 0x22); Array.Copy(t1, 0, sav, offset + 0x232 + 0x22 * 0, 0x22);
|
||||
Array.Resize(ref t1, 0x22); Array.Copy(t1, 0, SAV.Data, offset + 0x232 + 0x22 * 0, 0x22);
|
||||
byte[] t2 = Encoding.Unicode.GetBytes(team2);
|
||||
Array.Resize(ref t2, 0x22); Array.Copy(t2, 0, sav, offset + 0x232 + 0x22 * 1, 0x22);
|
||||
Array.Resize(ref t2, 0x22); Array.Copy(t2, 0, SAV.Data, offset + 0x232 + 0x22 * 1, 0x22);
|
||||
|
||||
string saying1 = TB_FSay1.Text;
|
||||
string saying2 = TB_FSay2.Text;
|
||||
string saying3 = TB_FSay3.Text;
|
||||
string saying4 = TB_FSay4.Text;
|
||||
byte[] s1 = Encoding.Unicode.GetBytes(saying1);
|
||||
Array.Resize(ref s1, 0x22); Array.Copy(s1, 0, sav, offset + 0x276 + 0x22 * 0, 0x22);
|
||||
Array.Resize(ref s1, 0x22); Array.Copy(s1, 0, SAV.Data, offset + 0x276 + 0x22 * 0, 0x22);
|
||||
byte[] s2 = Encoding.Unicode.GetBytes(saying2);
|
||||
Array.Resize(ref s2, 0x22); Array.Copy(s2, 0, sav, offset + 0x276 + 0x22 * 1, 0x22);
|
||||
Array.Resize(ref s2, 0x22); Array.Copy(s2, 0, SAV.Data, offset + 0x276 + 0x22 * 1, 0x22);
|
||||
byte[] s3 = Encoding.Unicode.GetBytes(saying3);
|
||||
Array.Resize(ref s3, 0x22); Array.Copy(s3, 0, sav, offset + 0x276 + 0x22 * 2, 0x22);
|
||||
Array.Resize(ref s3, 0x22); Array.Copy(s3, 0, SAV.Data, offset + 0x276 + 0x22 * 2, 0x22);
|
||||
byte[] s4 = Encoding.Unicode.GetBytes(saying4);
|
||||
Array.Resize(ref s4, 0x22); Array.Copy(s4, 0, sav, offset + 0x276 + 0x22 * 3, 0x22);
|
||||
Array.Resize(ref s4, 0x22); Array.Copy(s4, 0, SAV.Data, offset + 0x276 + 0x22 * 3, 0x22);
|
||||
|
||||
int baseloc = (int)NUD_FBaseLocation.Value;
|
||||
if (baseloc < 3) baseloc = 0; // skip 1/2 baselocs as they are dummied out ingame.
|
||||
Array.Copy(BitConverter.GetBytes(baseloc), 0, sav, offset, 2);
|
||||
Array.Copy(BitConverter.GetBytes(baseloc), 0, SAV.Data, offset, 2);
|
||||
|
||||
TB_FOT.Text = TrainerName; TB_FSay1.Text = saying1; TB_FSay2.Text = saying2; TB_FSay3.Text = saying3; TB_FSay4.Text = saying4;
|
||||
|
||||
// Copy back Objects
|
||||
for (int i = 0; i < 25; i++)
|
||||
for (int z = 0; z < 12; z++)
|
||||
sav[offset + 2 + 12 * i + z] = objdata[i, z];
|
||||
SAV.Data[offset + 2 + 12 * i + z] = objdata[i, z];
|
||||
|
||||
if (GB_PKM.Enabled) // Copy pkm data back in
|
||||
{
|
||||
saveFavPKM();
|
||||
for (int i = 0; i < 3; i++)
|
||||
for (int z = 0; z < 0x34; z++)
|
||||
sav[offset + 0x32E + 0x34 * i + z] = pkmdata[i, z];
|
||||
SAV.Data[offset + 0x32E + 0x34 * i + z] = pkmdata[i, z];
|
||||
}
|
||||
popFavorite();
|
||||
LB_Favorite.SelectedIndex = index;
|
||||
@@ -188,9 +190,9 @@ private void B_Cancel_Click(object sender, EventArgs e)
|
||||
private void B_Save_Click(object sender, EventArgs e)
|
||||
{
|
||||
uint flags = Util.ToUInt32(MT_Flags.Text);
|
||||
Array.Copy(BitConverter.GetBytes(flags), 0, sav, Main.SAV.PSSStats + 0x140, 4); // write pss
|
||||
Array.Copy(BitConverter.GetBytes(flags), 0, sav, Main.SAV.SecretBase + 0x62C, 4); // write counter
|
||||
Array.Copy(sav, Main.SAV.Data, sav.Length);
|
||||
Array.Copy(BitConverter.GetBytes(flags), 0, SAV.Data, SAV.PSSStats + 0x140, 4); // write pss
|
||||
Array.Copy(BitConverter.GetBytes(flags), 0, SAV.Data, SAV.SecretBase + 0x62C, 4); // write counter
|
||||
Main.SAV.Data = SAV.Data;
|
||||
Main.SAV.Edited = true;
|
||||
Close();
|
||||
}
|
||||
@@ -201,8 +203,8 @@ private void B_GiveDecor_Click(object sender, EventArgs e)
|
||||
// int qty = BitConverter.ToUInt16(sav, offset + i * 4);
|
||||
// int has = BitConverter.ToUInt16(sav, offset + i * 4 + 2);
|
||||
|
||||
sav[Main.SAV.SecretBase + i * 4] = 25;
|
||||
sav[Main.SAV.SecretBase + i * 4 + 2] = 1;
|
||||
SAV.Data[SAV.SecretBase + i * 4] = 25;
|
||||
SAV.Data[SAV.SecretBase + i * 4 + 2] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -396,18 +398,48 @@ private void loadFavPKM()
|
||||
CHK_Shiny.Checked = isshiny;
|
||||
|
||||
// Set Form
|
||||
Main.setForms(spec, CB_Form);
|
||||
setForms();
|
||||
int form = genform >> 3;
|
||||
CB_Form.SelectedIndex = form;
|
||||
|
||||
// Set Ability
|
||||
Main.setAbilityList(MT_AbilNo, spec, CB_Ability, CB_Form);
|
||||
setAbilityList();
|
||||
}
|
||||
|
||||
private void setAbilityList()
|
||||
{
|
||||
int newabil = Convert.ToInt16(MT_AbilNo.Text) >> 1;
|
||||
int species = Util.getIndex(CB_Species);
|
||||
int formnum = CB_Form.SelectedIndex;
|
||||
byte[] abils = Legal.PersonalAO[Legal.PersonalAO[species].FormeIndex(species, formnum)].Abilities;
|
||||
|
||||
// Build Ability List
|
||||
List<string> ability_list = new List<string>
|
||||
{
|
||||
abilitylist[abils[0]] + " (1)",
|
||||
abilitylist[abils[1]] + " (2)",
|
||||
abilitylist[abils[2]] + " (H)"
|
||||
};
|
||||
CB_Ability.DataSource = ability_list;
|
||||
|
||||
CB_Ability.SelectedIndex = newabil < 3 ? newabil : 0;
|
||||
}
|
||||
|
||||
private void setForms()
|
||||
{
|
||||
int species = Util.getIndex(CB_Species);
|
||||
bool hasForms = Legal.PersonalAO[species].HasFormes || new[] { 664, 665, 414 }.Contains(species);
|
||||
CB_Form.Enabled = CB_Form.Visible = hasForms;
|
||||
|
||||
CB_Form.DisplayMember = "Text";
|
||||
CB_Form.ValueMember = "Value";
|
||||
CB_Form.DataSource = PKX.getFormList(species, Main.types, Main.forms, Main.gendersymbols).ToList();
|
||||
}
|
||||
|
||||
private void updateSpecies(object sender, EventArgs e)
|
||||
{
|
||||
// Get Forms for Given Species
|
||||
Main.setForms(Util.getIndex(CB_Species), CB_Form);
|
||||
setForms();
|
||||
|
||||
// Check for Gender Changes
|
||||
// Get Gender Threshold
|
||||
@@ -421,11 +453,11 @@ private void updateSpecies(object sender, EventArgs e)
|
||||
genderflag = 0;
|
||||
|
||||
setGenderLabel();
|
||||
Main.setAbilityList(MT_AbilNo, Util.getIndex(CB_Species), CB_Ability, CB_Form);
|
||||
setAbilityList();
|
||||
}
|
||||
private void updateForm(object sender, EventArgs e)
|
||||
{
|
||||
Main.setAbilityList(MT_AbilNo, Util.getIndex(CB_Species), CB_Ability, CB_Form);
|
||||
setAbilityList();
|
||||
|
||||
// If form has a single gender, account for it.
|
||||
if (PKX.getGender(CB_Form.Text) < 2)
|
||||
@@ -454,8 +486,8 @@ private void B_FDelete_Click(object sender, EventArgs e)
|
||||
if (LB_Favorite.SelectedIndex < 1) { Util.Alert("Cannot delete your Secret Base."); return; }
|
||||
int index = LB_Favorite.SelectedIndex - 1;
|
||||
|
||||
int favoff = Main.SAV.SecretBase + 0x63A;
|
||||
string BaseTrainer = Util.TrimFromZero(Encoding.Unicode.GetString(sav, favoff + index * 0x3E0 + 0x218, 0x1A));
|
||||
int favoff = SAV.SecretBase + 0x63A;
|
||||
string BaseTrainer = Util.TrimFromZero(Encoding.Unicode.GetString(SAV.Data, favoff + index * 0x3E0 + 0x218, 0x1A));
|
||||
if (string.IsNullOrEmpty(BaseTrainer))
|
||||
BaseTrainer = "Empty";
|
||||
|
||||
@@ -465,9 +497,9 @@ private void B_FDelete_Click(object sender, EventArgs e)
|
||||
const int max = 29;
|
||||
const int size = 0x3E0;
|
||||
int offset = favoff + index * size;
|
||||
if (index != max) Array.Copy(sav, offset + size, sav, offset, size * (max - index));
|
||||
if (index != max) Array.Copy(SAV.Data, offset + size, SAV.Data, offset, size * (max - index));
|
||||
// Ensure Last Entry is Cleared
|
||||
Array.Copy(new byte[size], 0, sav, size * max, size);
|
||||
Array.Copy(new byte[size], 0, SAV.Data, size * max, size);
|
||||
popFavorite();
|
||||
}
|
||||
}
|
||||
|
||||
747
SAV/SAV_SimpleTrainer.Designer.cs
generated
Normal file
@@ -0,0 +1,747 @@
|
||||
namespace PKHeX
|
||||
{
|
||||
partial class SAV_SimpleTrainer
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.GB_Adventure = new System.Windows.Forms.GroupBox();
|
||||
this.L_Started = new System.Windows.Forms.Label();
|
||||
this.CAL_AdventureStartDate = new System.Windows.Forms.DateTimePicker();
|
||||
this.CAL_HoFDate = new System.Windows.Forms.DateTimePicker();
|
||||
this.L_Fame = new System.Windows.Forms.Label();
|
||||
this.MT_Seconds = new System.Windows.Forms.MaskedTextBox();
|
||||
this.MT_Hours = new System.Windows.Forms.MaskedTextBox();
|
||||
this.L_Seconds = new System.Windows.Forms.Label();
|
||||
this.L_Hours = new System.Windows.Forms.Label();
|
||||
this.MT_Minutes = new System.Windows.Forms.MaskedTextBox();
|
||||
this.L_Minutes = new System.Windows.Forms.Label();
|
||||
this.CAL_AdventureStartTime = new System.Windows.Forms.DateTimePicker();
|
||||
this.CAL_HoFTime = new System.Windows.Forms.DateTimePicker();
|
||||
this.TB_OTName = new System.Windows.Forms.TextBox();
|
||||
this.CB_Gender = new System.Windows.Forms.ComboBox();
|
||||
this.L_TrainerName = new System.Windows.Forms.Label();
|
||||
this.L_TID = new System.Windows.Forms.Label();
|
||||
this.MT_Money = new System.Windows.Forms.MaskedTextBox();
|
||||
this.L_SID = new System.Windows.Forms.Label();
|
||||
this.L_Money = new System.Windows.Forms.Label();
|
||||
this.MT_TID = new System.Windows.Forms.MaskedTextBox();
|
||||
this.MT_SID = new System.Windows.Forms.MaskedTextBox();
|
||||
this.B_MaxCash = new System.Windows.Forms.Button();
|
||||
this.GB_Map = new System.Windows.Forms.GroupBox();
|
||||
this.NUD_Z = new System.Windows.Forms.NumericUpDown();
|
||||
this.NUD_M = new System.Windows.Forms.NumericUpDown();
|
||||
this.NUD_Y = new System.Windows.Forms.NumericUpDown();
|
||||
this.NUD_X = new System.Windows.Forms.NumericUpDown();
|
||||
this.L_Y = new System.Windows.Forms.Label();
|
||||
this.L_CurrentMap = new System.Windows.Forms.Label();
|
||||
this.L_Z = new System.Windows.Forms.Label();
|
||||
this.L_X = new System.Windows.Forms.Label();
|
||||
this.B_Save = new System.Windows.Forms.Button();
|
||||
this.B_Cancel = new System.Windows.Forms.Button();
|
||||
this.GB_Trainer = new System.Windows.Forms.GroupBox();
|
||||
this.GB_Badges = new System.Windows.Forms.GroupBox();
|
||||
this.CHK_H8 = new System.Windows.Forms.CheckBox();
|
||||
this.CHK_H7 = new System.Windows.Forms.CheckBox();
|
||||
this.CHK_H6 = new System.Windows.Forms.CheckBox();
|
||||
this.CHK_H5 = new System.Windows.Forms.CheckBox();
|
||||
this.CHK_H4 = new System.Windows.Forms.CheckBox();
|
||||
this.CHK_H3 = new System.Windows.Forms.CheckBox();
|
||||
this.CHK_H2 = new System.Windows.Forms.CheckBox();
|
||||
this.CHK_H1 = new System.Windows.Forms.CheckBox();
|
||||
this.CHK_8 = new System.Windows.Forms.CheckBox();
|
||||
this.CHK_7 = new System.Windows.Forms.CheckBox();
|
||||
this.CHK_6 = new System.Windows.Forms.CheckBox();
|
||||
this.CHK_5 = new System.Windows.Forms.CheckBox();
|
||||
this.CHK_4 = new System.Windows.Forms.CheckBox();
|
||||
this.CHK_3 = new System.Windows.Forms.CheckBox();
|
||||
this.CHK_2 = new System.Windows.Forms.CheckBox();
|
||||
this.CHK_1 = new System.Windows.Forms.CheckBox();
|
||||
this.GB_Adventure.SuspendLayout();
|
||||
this.GB_Map.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.NUD_Z)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.NUD_M)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.NUD_Y)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.NUD_X)).BeginInit();
|
||||
this.GB_Trainer.SuspendLayout();
|
||||
this.GB_Badges.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// GB_Adventure
|
||||
//
|
||||
this.GB_Adventure.Controls.Add(this.L_Started);
|
||||
this.GB_Adventure.Controls.Add(this.CAL_AdventureStartDate);
|
||||
this.GB_Adventure.Controls.Add(this.CAL_HoFDate);
|
||||
this.GB_Adventure.Controls.Add(this.L_Fame);
|
||||
this.GB_Adventure.Controls.Add(this.MT_Seconds);
|
||||
this.GB_Adventure.Controls.Add(this.MT_Hours);
|
||||
this.GB_Adventure.Controls.Add(this.L_Seconds);
|
||||
this.GB_Adventure.Controls.Add(this.L_Hours);
|
||||
this.GB_Adventure.Controls.Add(this.MT_Minutes);
|
||||
this.GB_Adventure.Controls.Add(this.L_Minutes);
|
||||
this.GB_Adventure.Controls.Add(this.CAL_AdventureStartTime);
|
||||
this.GB_Adventure.Controls.Add(this.CAL_HoFTime);
|
||||
this.GB_Adventure.Location = new System.Drawing.Point(11, 98);
|
||||
this.GB_Adventure.Name = "GB_Adventure";
|
||||
this.GB_Adventure.Size = new System.Drawing.Size(200, 151);
|
||||
this.GB_Adventure.TabIndex = 70;
|
||||
this.GB_Adventure.TabStop = false;
|
||||
this.GB_Adventure.Text = "Adventure Info";
|
||||
//
|
||||
// L_Started
|
||||
//
|
||||
this.L_Started.Location = new System.Drawing.Point(4, 51);
|
||||
this.L_Started.Name = "L_Started";
|
||||
this.L_Started.Size = new System.Drawing.Size(80, 20);
|
||||
this.L_Started.TabIndex = 36;
|
||||
this.L_Started.Text = "Game Started:";
|
||||
this.L_Started.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// CAL_AdventureStartDate
|
||||
//
|
||||
this.CAL_AdventureStartDate.Format = System.Windows.Forms.DateTimePickerFormat.Short;
|
||||
this.CAL_AdventureStartDate.Location = new System.Drawing.Point(90, 51);
|
||||
this.CAL_AdventureStartDate.MaxDate = new System.DateTime(2050, 12, 31, 0, 0, 0, 0);
|
||||
this.CAL_AdventureStartDate.MinDate = new System.DateTime(2000, 1, 1, 0, 0, 0, 0);
|
||||
this.CAL_AdventureStartDate.Name = "CAL_AdventureStartDate";
|
||||
this.CAL_AdventureStartDate.Size = new System.Drawing.Size(99, 20);
|
||||
this.CAL_AdventureStartDate.TabIndex = 35;
|
||||
this.CAL_AdventureStartDate.Value = new System.DateTime(2000, 1, 1, 0, 0, 0, 0);
|
||||
//
|
||||
// CAL_HoFDate
|
||||
//
|
||||
this.CAL_HoFDate.Format = System.Windows.Forms.DateTimePickerFormat.Short;
|
||||
this.CAL_HoFDate.Location = new System.Drawing.Point(90, 107);
|
||||
this.CAL_HoFDate.MaxDate = new System.DateTime(4095, 12, 31, 0, 0, 0, 0);
|
||||
this.CAL_HoFDate.Name = "CAL_HoFDate";
|
||||
this.CAL_HoFDate.Size = new System.Drawing.Size(99, 20);
|
||||
this.CAL_HoFDate.TabIndex = 31;
|
||||
this.CAL_HoFDate.Value = new System.DateTime(2000, 1, 1, 0, 0, 0, 0);
|
||||
//
|
||||
// L_Fame
|
||||
//
|
||||
this.L_Fame.Location = new System.Drawing.Point(4, 107);
|
||||
this.L_Fame.Name = "L_Fame";
|
||||
this.L_Fame.Size = new System.Drawing.Size(80, 20);
|
||||
this.L_Fame.TabIndex = 32;
|
||||
this.L_Fame.Text = "Hall of Fame:";
|
||||
this.L_Fame.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// MT_Seconds
|
||||
//
|
||||
this.MT_Seconds.Location = new System.Drawing.Point(166, 17);
|
||||
this.MT_Seconds.Mask = "00";
|
||||
this.MT_Seconds.Name = "MT_Seconds";
|
||||
this.MT_Seconds.Size = new System.Drawing.Size(22, 20);
|
||||
this.MT_Seconds.TabIndex = 28;
|
||||
this.MT_Seconds.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// MT_Hours
|
||||
//
|
||||
this.MT_Hours.Location = new System.Drawing.Point(44, 17);
|
||||
this.MT_Hours.Mask = "00000";
|
||||
this.MT_Hours.Name = "MT_Hours";
|
||||
this.MT_Hours.Size = new System.Drawing.Size(38, 20);
|
||||
this.MT_Hours.TabIndex = 25;
|
||||
this.MT_Hours.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// L_Seconds
|
||||
//
|
||||
this.L_Seconds.AutoSize = true;
|
||||
this.L_Seconds.Location = new System.Drawing.Point(136, 20);
|
||||
this.L_Seconds.Name = "L_Seconds";
|
||||
this.L_Seconds.Size = new System.Drawing.Size(29, 13);
|
||||
this.L_Seconds.TabIndex = 30;
|
||||
this.L_Seconds.Text = "Sec:";
|
||||
//
|
||||
// L_Hours
|
||||
//
|
||||
this.L_Hours.AutoSize = true;
|
||||
this.L_Hours.Location = new System.Drawing.Point(12, 20);
|
||||
this.L_Hours.Name = "L_Hours";
|
||||
this.L_Hours.Size = new System.Drawing.Size(26, 13);
|
||||
this.L_Hours.TabIndex = 26;
|
||||
this.L_Hours.Text = "Hrs:";
|
||||
//
|
||||
// MT_Minutes
|
||||
//
|
||||
this.MT_Minutes.Location = new System.Drawing.Point(111, 17);
|
||||
this.MT_Minutes.Mask = "00";
|
||||
this.MT_Minutes.Name = "MT_Minutes";
|
||||
this.MT_Minutes.Size = new System.Drawing.Size(22, 20);
|
||||
this.MT_Minutes.TabIndex = 27;
|
||||
this.MT_Minutes.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// L_Minutes
|
||||
//
|
||||
this.L_Minutes.AutoSize = true;
|
||||
this.L_Minutes.Location = new System.Drawing.Point(84, 20);
|
||||
this.L_Minutes.Name = "L_Minutes";
|
||||
this.L_Minutes.Size = new System.Drawing.Size(27, 13);
|
||||
this.L_Minutes.TabIndex = 29;
|
||||
this.L_Minutes.Text = "Min:";
|
||||
//
|
||||
// CAL_AdventureStartTime
|
||||
//
|
||||
this.CAL_AdventureStartTime.CustomFormat = "hh:mm tt";
|
||||
this.CAL_AdventureStartTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.CAL_AdventureStartTime.Location = new System.Drawing.Point(116, 70);
|
||||
this.CAL_AdventureStartTime.MaxDate = new System.DateTime(2050, 12, 31, 0, 0, 0, 0);
|
||||
this.CAL_AdventureStartTime.MinDate = new System.DateTime(2000, 1, 1, 0, 0, 0, 0);
|
||||
this.CAL_AdventureStartTime.Name = "CAL_AdventureStartTime";
|
||||
this.CAL_AdventureStartTime.ShowUpDown = true;
|
||||
this.CAL_AdventureStartTime.Size = new System.Drawing.Size(73, 20);
|
||||
this.CAL_AdventureStartTime.TabIndex = 34;
|
||||
this.CAL_AdventureStartTime.Value = new System.DateTime(2001, 1, 1, 0, 0, 0, 0);
|
||||
//
|
||||
// CAL_HoFTime
|
||||
//
|
||||
this.CAL_HoFTime.CustomFormat = "hh:mm tt";
|
||||
this.CAL_HoFTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.CAL_HoFTime.Location = new System.Drawing.Point(116, 126);
|
||||
this.CAL_HoFTime.MaxDate = new System.DateTime(2050, 12, 31, 0, 0, 0, 0);
|
||||
this.CAL_HoFTime.MinDate = new System.DateTime(2000, 1, 1, 0, 0, 0, 0);
|
||||
this.CAL_HoFTime.Name = "CAL_HoFTime";
|
||||
this.CAL_HoFTime.ShowUpDown = true;
|
||||
this.CAL_HoFTime.Size = new System.Drawing.Size(73, 20);
|
||||
this.CAL_HoFTime.TabIndex = 37;
|
||||
this.CAL_HoFTime.Value = new System.DateTime(2001, 1, 1, 0, 0, 0, 0);
|
||||
//
|
||||
// TB_OTName
|
||||
//
|
||||
this.TB_OTName.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.TB_OTName.Location = new System.Drawing.Point(99, 11);
|
||||
this.TB_OTName.MaxLength = 12;
|
||||
this.TB_OTName.Name = "TB_OTName";
|
||||
this.TB_OTName.Size = new System.Drawing.Size(93, 20);
|
||||
this.TB_OTName.TabIndex = 57;
|
||||
this.TB_OTName.Text = "WWWWWWWWWWWW";
|
||||
this.TB_OTName.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// CB_Gender
|
||||
//
|
||||
this.CB_Gender.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.CB_Gender.FormattingEnabled = true;
|
||||
this.CB_Gender.Items.AddRange(new object[] {
|
||||
"♂",
|
||||
"♀"});
|
||||
this.CB_Gender.Location = new System.Drawing.Point(99, 55);
|
||||
this.CB_Gender.Name = "CB_Gender";
|
||||
this.CB_Gender.Size = new System.Drawing.Size(40, 21);
|
||||
this.CB_Gender.TabIndex = 68;
|
||||
//
|
||||
// L_TrainerName
|
||||
//
|
||||
this.L_TrainerName.Location = new System.Drawing.Point(7, 13);
|
||||
this.L_TrainerName.Name = "L_TrainerName";
|
||||
this.L_TrainerName.Size = new System.Drawing.Size(87, 16);
|
||||
this.L_TrainerName.TabIndex = 58;
|
||||
this.L_TrainerName.Text = "Name:";
|
||||
this.L_TrainerName.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// L_TID
|
||||
//
|
||||
this.L_TID.Location = new System.Drawing.Point(9, 35);
|
||||
this.L_TID.Name = "L_TID";
|
||||
this.L_TID.Size = new System.Drawing.Size(38, 13);
|
||||
this.L_TID.TabIndex = 61;
|
||||
this.L_TID.Text = "TID:";
|
||||
this.L_TID.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// MT_Money
|
||||
//
|
||||
this.MT_Money.Location = new System.Drawing.Point(119, 33);
|
||||
this.MT_Money.Mask = "0000000";
|
||||
this.MT_Money.Name = "MT_Money";
|
||||
this.MT_Money.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
|
||||
this.MT_Money.Size = new System.Drawing.Size(52, 20);
|
||||
this.MT_Money.TabIndex = 59;
|
||||
this.MT_Money.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// L_SID
|
||||
//
|
||||
this.L_SID.Location = new System.Drawing.Point(9, 58);
|
||||
this.L_SID.Name = "L_SID";
|
||||
this.L_SID.Size = new System.Drawing.Size(38, 13);
|
||||
this.L_SID.TabIndex = 62;
|
||||
this.L_SID.Text = "SID:";
|
||||
this.L_SID.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// L_Money
|
||||
//
|
||||
this.L_Money.AutoSize = true;
|
||||
this.L_Money.Location = new System.Drawing.Point(102, 36);
|
||||
this.L_Money.Name = "L_Money";
|
||||
this.L_Money.Size = new System.Drawing.Size(16, 13);
|
||||
this.L_Money.TabIndex = 60;
|
||||
this.L_Money.Text = "$:";
|
||||
//
|
||||
// MT_TID
|
||||
//
|
||||
this.MT_TID.Location = new System.Drawing.Point(53, 34);
|
||||
this.MT_TID.Mask = "00000";
|
||||
this.MT_TID.Name = "MT_TID";
|
||||
this.MT_TID.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
|
||||
this.MT_TID.Size = new System.Drawing.Size(39, 20);
|
||||
this.MT_TID.TabIndex = 63;
|
||||
this.MT_TID.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
this.MT_TID.TextChanged += new System.EventHandler(this.changeFFFF);
|
||||
//
|
||||
// MT_SID
|
||||
//
|
||||
this.MT_SID.Location = new System.Drawing.Point(53, 55);
|
||||
this.MT_SID.Mask = "00000";
|
||||
this.MT_SID.Name = "MT_SID";
|
||||
this.MT_SID.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
|
||||
this.MT_SID.Size = new System.Drawing.Size(39, 20);
|
||||
this.MT_SID.TabIndex = 64;
|
||||
this.MT_SID.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
this.MT_SID.TextChanged += new System.EventHandler(this.changeFFFF);
|
||||
//
|
||||
// B_MaxCash
|
||||
//
|
||||
this.B_MaxCash.Location = new System.Drawing.Point(172, 33);
|
||||
this.B_MaxCash.Name = "B_MaxCash";
|
||||
this.B_MaxCash.Size = new System.Drawing.Size(20, 20);
|
||||
this.B_MaxCash.TabIndex = 66;
|
||||
this.B_MaxCash.Text = "+";
|
||||
this.B_MaxCash.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// GB_Map
|
||||
//
|
||||
this.GB_Map.Controls.Add(this.NUD_Z);
|
||||
this.GB_Map.Controls.Add(this.NUD_M);
|
||||
this.GB_Map.Controls.Add(this.NUD_Y);
|
||||
this.GB_Map.Controls.Add(this.NUD_X);
|
||||
this.GB_Map.Controls.Add(this.L_Y);
|
||||
this.GB_Map.Controls.Add(this.L_CurrentMap);
|
||||
this.GB_Map.Controls.Add(this.L_Z);
|
||||
this.GB_Map.Controls.Add(this.L_X);
|
||||
this.GB_Map.Location = new System.Drawing.Point(217, 100);
|
||||
this.GB_Map.Name = "GB_Map";
|
||||
this.GB_Map.Size = new System.Drawing.Size(157, 125);
|
||||
this.GB_Map.TabIndex = 71;
|
||||
this.GB_Map.TabStop = false;
|
||||
this.GB_Map.Text = "Map Position";
|
||||
//
|
||||
// NUD_Z
|
||||
//
|
||||
this.NUD_Z.Location = new System.Drawing.Point(93, 68);
|
||||
this.NUD_Z.Maximum = new decimal(new int[] {
|
||||
65535,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.NUD_Z.Minimum = new decimal(new int[] {
|
||||
65535,
|
||||
0,
|
||||
0,
|
||||
-2147483648});
|
||||
this.NUD_Z.Name = "NUD_Z";
|
||||
this.NUD_Z.Size = new System.Drawing.Size(50, 20);
|
||||
this.NUD_Z.TabIndex = 53;
|
||||
//
|
||||
// NUD_M
|
||||
//
|
||||
this.NUD_M.Location = new System.Drawing.Point(93, 16);
|
||||
this.NUD_M.Maximum = new decimal(new int[] {
|
||||
1000,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.NUD_M.Name = "NUD_M";
|
||||
this.NUD_M.Size = new System.Drawing.Size(50, 20);
|
||||
this.NUD_M.TabIndex = 52;
|
||||
//
|
||||
// NUD_Y
|
||||
//
|
||||
this.NUD_Y.Location = new System.Drawing.Point(93, 94);
|
||||
this.NUD_Y.Maximum = new decimal(new int[] {
|
||||
65535,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.NUD_Y.Name = "NUD_Y";
|
||||
this.NUD_Y.Size = new System.Drawing.Size(50, 20);
|
||||
this.NUD_Y.TabIndex = 51;
|
||||
//
|
||||
// NUD_X
|
||||
//
|
||||
this.NUD_X.Location = new System.Drawing.Point(93, 42);
|
||||
this.NUD_X.Maximum = new decimal(new int[] {
|
||||
65535,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.NUD_X.Name = "NUD_X";
|
||||
this.NUD_X.Size = new System.Drawing.Size(50, 20);
|
||||
this.NUD_X.TabIndex = 50;
|
||||
//
|
||||
// L_Y
|
||||
//
|
||||
this.L_Y.Location = new System.Drawing.Point(6, 94);
|
||||
this.L_Y.Name = "L_Y";
|
||||
this.L_Y.Size = new System.Drawing.Size(80, 20);
|
||||
this.L_Y.TabIndex = 49;
|
||||
this.L_Y.Text = "Y Coordinate:";
|
||||
this.L_Y.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// L_CurrentMap
|
||||
//
|
||||
this.L_CurrentMap.Location = new System.Drawing.Point(6, 16);
|
||||
this.L_CurrentMap.Name = "L_CurrentMap";
|
||||
this.L_CurrentMap.Size = new System.Drawing.Size(80, 20);
|
||||
this.L_CurrentMap.TabIndex = 46;
|
||||
this.L_CurrentMap.Text = "Current Map:";
|
||||
this.L_CurrentMap.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// L_Z
|
||||
//
|
||||
this.L_Z.Location = new System.Drawing.Point(6, 68);
|
||||
this.L_Z.Name = "L_Z";
|
||||
this.L_Z.Size = new System.Drawing.Size(80, 20);
|
||||
this.L_Z.TabIndex = 48;
|
||||
this.L_Z.Text = "Z Coordinate:";
|
||||
this.L_Z.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// L_X
|
||||
//
|
||||
this.L_X.Location = new System.Drawing.Point(6, 42);
|
||||
this.L_X.Name = "L_X";
|
||||
this.L_X.Size = new System.Drawing.Size(80, 20);
|
||||
this.L_X.TabIndex = 47;
|
||||
this.L_X.Text = "X Coordinate:";
|
||||
this.L_X.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// B_Save
|
||||
//
|
||||
this.B_Save.Location = new System.Drawing.Point(299, 226);
|
||||
this.B_Save.Name = "B_Save";
|
||||
this.B_Save.Size = new System.Drawing.Size(75, 23);
|
||||
this.B_Save.TabIndex = 73;
|
||||
this.B_Save.Text = "Save";
|
||||
this.B_Save.UseVisualStyleBackColor = true;
|
||||
this.B_Save.Click += new System.EventHandler(this.B_Save_Click);
|
||||
//
|
||||
// B_Cancel
|
||||
//
|
||||
this.B_Cancel.Location = new System.Drawing.Point(218, 226);
|
||||
this.B_Cancel.Name = "B_Cancel";
|
||||
this.B_Cancel.Size = new System.Drawing.Size(75, 23);
|
||||
this.B_Cancel.TabIndex = 72;
|
||||
this.B_Cancel.Text = "Cancel";
|
||||
this.B_Cancel.UseVisualStyleBackColor = true;
|
||||
this.B_Cancel.Click += new System.EventHandler(this.B_Cancel_Click);
|
||||
//
|
||||
// GB_Trainer
|
||||
//
|
||||
this.GB_Trainer.Controls.Add(this.TB_OTName);
|
||||
this.GB_Trainer.Controls.Add(this.B_MaxCash);
|
||||
this.GB_Trainer.Controls.Add(this.MT_SID);
|
||||
this.GB_Trainer.Controls.Add(this.MT_TID);
|
||||
this.GB_Trainer.Controls.Add(this.L_Money);
|
||||
this.GB_Trainer.Controls.Add(this.L_SID);
|
||||
this.GB_Trainer.Controls.Add(this.CB_Gender);
|
||||
this.GB_Trainer.Controls.Add(this.MT_Money);
|
||||
this.GB_Trainer.Controls.Add(this.L_TID);
|
||||
this.GB_Trainer.Controls.Add(this.L_TrainerName);
|
||||
this.GB_Trainer.Location = new System.Drawing.Point(11, 12);
|
||||
this.GB_Trainer.Name = "GB_Trainer";
|
||||
this.GB_Trainer.Size = new System.Drawing.Size(200, 82);
|
||||
this.GB_Trainer.TabIndex = 74;
|
||||
this.GB_Trainer.TabStop = false;
|
||||
this.GB_Trainer.Text = "Trainer";
|
||||
//
|
||||
// GB_Badges
|
||||
//
|
||||
this.GB_Badges.Controls.Add(this.CHK_H8);
|
||||
this.GB_Badges.Controls.Add(this.CHK_H7);
|
||||
this.GB_Badges.Controls.Add(this.CHK_H6);
|
||||
this.GB_Badges.Controls.Add(this.CHK_H5);
|
||||
this.GB_Badges.Controls.Add(this.CHK_H4);
|
||||
this.GB_Badges.Controls.Add(this.CHK_H3);
|
||||
this.GB_Badges.Controls.Add(this.CHK_H2);
|
||||
this.GB_Badges.Controls.Add(this.CHK_H1);
|
||||
this.GB_Badges.Controls.Add(this.CHK_8);
|
||||
this.GB_Badges.Controls.Add(this.CHK_7);
|
||||
this.GB_Badges.Controls.Add(this.CHK_6);
|
||||
this.GB_Badges.Controls.Add(this.CHK_5);
|
||||
this.GB_Badges.Controls.Add(this.CHK_4);
|
||||
this.GB_Badges.Controls.Add(this.CHK_3);
|
||||
this.GB_Badges.Controls.Add(this.CHK_2);
|
||||
this.GB_Badges.Controls.Add(this.CHK_1);
|
||||
this.GB_Badges.Location = new System.Drawing.Point(218, 12);
|
||||
this.GB_Badges.Name = "GB_Badges";
|
||||
this.GB_Badges.Size = new System.Drawing.Size(157, 82);
|
||||
this.GB_Badges.TabIndex = 75;
|
||||
this.GB_Badges.TabStop = false;
|
||||
this.GB_Badges.Text = "Badges";
|
||||
//
|
||||
// CHK_H8
|
||||
//
|
||||
this.CHK_H8.AutoSize = true;
|
||||
this.CHK_H8.Location = new System.Drawing.Point(130, 55);
|
||||
this.CHK_H8.Name = "CHK_H8";
|
||||
this.CHK_H8.Size = new System.Drawing.Size(15, 14);
|
||||
this.CHK_H8.TabIndex = 15;
|
||||
this.CHK_H8.UseVisualStyleBackColor = true;
|
||||
this.CHK_H8.Visible = false;
|
||||
//
|
||||
// CHK_H7
|
||||
//
|
||||
this.CHK_H7.AutoSize = true;
|
||||
this.CHK_H7.Location = new System.Drawing.Point(113, 55);
|
||||
this.CHK_H7.Name = "CHK_H7";
|
||||
this.CHK_H7.Size = new System.Drawing.Size(15, 14);
|
||||
this.CHK_H7.TabIndex = 14;
|
||||
this.CHK_H7.UseVisualStyleBackColor = true;
|
||||
this.CHK_H7.Visible = false;
|
||||
//
|
||||
// CHK_H6
|
||||
//
|
||||
this.CHK_H6.AutoSize = true;
|
||||
this.CHK_H6.Location = new System.Drawing.Point(96, 55);
|
||||
this.CHK_H6.Name = "CHK_H6";
|
||||
this.CHK_H6.Size = new System.Drawing.Size(15, 14);
|
||||
this.CHK_H6.TabIndex = 13;
|
||||
this.CHK_H6.UseVisualStyleBackColor = true;
|
||||
this.CHK_H6.Visible = false;
|
||||
//
|
||||
// CHK_H5
|
||||
//
|
||||
this.CHK_H5.AutoSize = true;
|
||||
this.CHK_H5.Location = new System.Drawing.Point(79, 55);
|
||||
this.CHK_H5.Name = "CHK_H5";
|
||||
this.CHK_H5.Size = new System.Drawing.Size(15, 14);
|
||||
this.CHK_H5.TabIndex = 12;
|
||||
this.CHK_H5.UseVisualStyleBackColor = true;
|
||||
this.CHK_H5.Visible = false;
|
||||
//
|
||||
// CHK_H4
|
||||
//
|
||||
this.CHK_H4.AutoSize = true;
|
||||
this.CHK_H4.Location = new System.Drawing.Point(62, 55);
|
||||
this.CHK_H4.Name = "CHK_H4";
|
||||
this.CHK_H4.Size = new System.Drawing.Size(15, 14);
|
||||
this.CHK_H4.TabIndex = 11;
|
||||
this.CHK_H4.UseVisualStyleBackColor = true;
|
||||
this.CHK_H4.Visible = false;
|
||||
//
|
||||
// CHK_H3
|
||||
//
|
||||
this.CHK_H3.AutoSize = true;
|
||||
this.CHK_H3.Location = new System.Drawing.Point(45, 55);
|
||||
this.CHK_H3.Name = "CHK_H3";
|
||||
this.CHK_H3.Size = new System.Drawing.Size(15, 14);
|
||||
this.CHK_H3.TabIndex = 10;
|
||||
this.CHK_H3.UseVisualStyleBackColor = true;
|
||||
this.CHK_H3.Visible = false;
|
||||
//
|
||||
// CHK_H2
|
||||
//
|
||||
this.CHK_H2.AutoSize = true;
|
||||
this.CHK_H2.Location = new System.Drawing.Point(28, 55);
|
||||
this.CHK_H2.Name = "CHK_H2";
|
||||
this.CHK_H2.Size = new System.Drawing.Size(15, 14);
|
||||
this.CHK_H2.TabIndex = 9;
|
||||
this.CHK_H2.UseVisualStyleBackColor = true;
|
||||
this.CHK_H2.Visible = false;
|
||||
//
|
||||
// CHK_H1
|
||||
//
|
||||
this.CHK_H1.AutoSize = true;
|
||||
this.CHK_H1.Location = new System.Drawing.Point(11, 55);
|
||||
this.CHK_H1.Name = "CHK_H1";
|
||||
this.CHK_H1.Size = new System.Drawing.Size(15, 14);
|
||||
this.CHK_H1.TabIndex = 8;
|
||||
this.CHK_H1.UseVisualStyleBackColor = true;
|
||||
this.CHK_H1.Visible = false;
|
||||
//
|
||||
// CHK_8
|
||||
//
|
||||
this.CHK_8.AutoSize = true;
|
||||
this.CHK_8.Location = new System.Drawing.Point(130, 27);
|
||||
this.CHK_8.Name = "CHK_8";
|
||||
this.CHK_8.Size = new System.Drawing.Size(15, 14);
|
||||
this.CHK_8.TabIndex = 7;
|
||||
this.CHK_8.UseVisualStyleBackColor = true;
|
||||
this.CHK_8.Visible = false;
|
||||
//
|
||||
// CHK_7
|
||||
//
|
||||
this.CHK_7.AutoSize = true;
|
||||
this.CHK_7.Location = new System.Drawing.Point(113, 27);
|
||||
this.CHK_7.Name = "CHK_7";
|
||||
this.CHK_7.Size = new System.Drawing.Size(15, 14);
|
||||
this.CHK_7.TabIndex = 6;
|
||||
this.CHK_7.UseVisualStyleBackColor = true;
|
||||
this.CHK_7.Visible = false;
|
||||
//
|
||||
// CHK_6
|
||||
//
|
||||
this.CHK_6.AutoSize = true;
|
||||
this.CHK_6.Location = new System.Drawing.Point(96, 27);
|
||||
this.CHK_6.Name = "CHK_6";
|
||||
this.CHK_6.Size = new System.Drawing.Size(15, 14);
|
||||
this.CHK_6.TabIndex = 5;
|
||||
this.CHK_6.UseVisualStyleBackColor = true;
|
||||
this.CHK_6.Visible = false;
|
||||
//
|
||||
// CHK_5
|
||||
//
|
||||
this.CHK_5.AutoSize = true;
|
||||
this.CHK_5.Location = new System.Drawing.Point(79, 27);
|
||||
this.CHK_5.Name = "CHK_5";
|
||||
this.CHK_5.Size = new System.Drawing.Size(15, 14);
|
||||
this.CHK_5.TabIndex = 4;
|
||||
this.CHK_5.UseVisualStyleBackColor = true;
|
||||
this.CHK_5.Visible = false;
|
||||
//
|
||||
// CHK_4
|
||||
//
|
||||
this.CHK_4.AutoSize = true;
|
||||
this.CHK_4.Location = new System.Drawing.Point(62, 27);
|
||||
this.CHK_4.Name = "CHK_4";
|
||||
this.CHK_4.Size = new System.Drawing.Size(15, 14);
|
||||
this.CHK_4.TabIndex = 3;
|
||||
this.CHK_4.UseVisualStyleBackColor = true;
|
||||
this.CHK_4.Visible = false;
|
||||
//
|
||||
// CHK_3
|
||||
//
|
||||
this.CHK_3.AutoSize = true;
|
||||
this.CHK_3.Location = new System.Drawing.Point(45, 27);
|
||||
this.CHK_3.Name = "CHK_3";
|
||||
this.CHK_3.Size = new System.Drawing.Size(15, 14);
|
||||
this.CHK_3.TabIndex = 2;
|
||||
this.CHK_3.UseVisualStyleBackColor = true;
|
||||
this.CHK_3.Visible = false;
|
||||
//
|
||||
// CHK_2
|
||||
//
|
||||
this.CHK_2.AutoSize = true;
|
||||
this.CHK_2.Location = new System.Drawing.Point(28, 27);
|
||||
this.CHK_2.Name = "CHK_2";
|
||||
this.CHK_2.Size = new System.Drawing.Size(15, 14);
|
||||
this.CHK_2.TabIndex = 1;
|
||||
this.CHK_2.UseVisualStyleBackColor = true;
|
||||
this.CHK_2.Visible = false;
|
||||
//
|
||||
// CHK_1
|
||||
//
|
||||
this.CHK_1.AutoSize = true;
|
||||
this.CHK_1.Location = new System.Drawing.Point(11, 27);
|
||||
this.CHK_1.Name = "CHK_1";
|
||||
this.CHK_1.Size = new System.Drawing.Size(15, 14);
|
||||
this.CHK_1.TabIndex = 0;
|
||||
this.CHK_1.UseVisualStyleBackColor = true;
|
||||
this.CHK_1.Visible = false;
|
||||
//
|
||||
// SAV_SimpleTrainer
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(384, 261);
|
||||
this.Controls.Add(this.GB_Badges);
|
||||
this.Controls.Add(this.GB_Trainer);
|
||||
this.Controls.Add(this.B_Save);
|
||||
this.Controls.Add(this.B_Cancel);
|
||||
this.Controls.Add(this.GB_Map);
|
||||
this.Controls.Add(this.GB_Adventure);
|
||||
this.MinimumSize = new System.Drawing.Size(400, 300);
|
||||
this.Name = "SAV_SimpleTrainer";
|
||||
this.Text = "Trainer Data Editor";
|
||||
this.GB_Adventure.ResumeLayout(false);
|
||||
this.GB_Adventure.PerformLayout();
|
||||
this.GB_Map.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.NUD_Z)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.NUD_M)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.NUD_Y)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.NUD_X)).EndInit();
|
||||
this.GB_Trainer.ResumeLayout(false);
|
||||
this.GB_Trainer.PerformLayout();
|
||||
this.GB_Badges.ResumeLayout(false);
|
||||
this.GB_Badges.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.GroupBox GB_Adventure;
|
||||
private System.Windows.Forms.Label L_Started;
|
||||
private System.Windows.Forms.DateTimePicker CAL_AdventureStartDate;
|
||||
private System.Windows.Forms.DateTimePicker CAL_HoFDate;
|
||||
private System.Windows.Forms.Label L_Fame;
|
||||
private System.Windows.Forms.MaskedTextBox MT_Seconds;
|
||||
private System.Windows.Forms.MaskedTextBox MT_Hours;
|
||||
private System.Windows.Forms.Label L_Seconds;
|
||||
private System.Windows.Forms.Label L_Hours;
|
||||
private System.Windows.Forms.MaskedTextBox MT_Minutes;
|
||||
private System.Windows.Forms.Label L_Minutes;
|
||||
private System.Windows.Forms.DateTimePicker CAL_AdventureStartTime;
|
||||
private System.Windows.Forms.DateTimePicker CAL_HoFTime;
|
||||
private System.Windows.Forms.TextBox TB_OTName;
|
||||
private System.Windows.Forms.ComboBox CB_Gender;
|
||||
private System.Windows.Forms.Label L_TrainerName;
|
||||
private System.Windows.Forms.Label L_TID;
|
||||
private System.Windows.Forms.MaskedTextBox MT_Money;
|
||||
private System.Windows.Forms.Label L_SID;
|
||||
private System.Windows.Forms.Label L_Money;
|
||||
private System.Windows.Forms.MaskedTextBox MT_TID;
|
||||
private System.Windows.Forms.MaskedTextBox MT_SID;
|
||||
private System.Windows.Forms.Button B_MaxCash;
|
||||
private System.Windows.Forms.GroupBox GB_Map;
|
||||
private System.Windows.Forms.NumericUpDown NUD_Z;
|
||||
private System.Windows.Forms.NumericUpDown NUD_M;
|
||||
private System.Windows.Forms.NumericUpDown NUD_Y;
|
||||
private System.Windows.Forms.NumericUpDown NUD_X;
|
||||
private System.Windows.Forms.Label L_Y;
|
||||
private System.Windows.Forms.Label L_CurrentMap;
|
||||
private System.Windows.Forms.Label L_Z;
|
||||
private System.Windows.Forms.Label L_X;
|
||||
private System.Windows.Forms.Button B_Save;
|
||||
private System.Windows.Forms.Button B_Cancel;
|
||||
private System.Windows.Forms.GroupBox GB_Trainer;
|
||||
private System.Windows.Forms.GroupBox GB_Badges;
|
||||
private System.Windows.Forms.CheckBox CHK_8;
|
||||
private System.Windows.Forms.CheckBox CHK_7;
|
||||
private System.Windows.Forms.CheckBox CHK_6;
|
||||
private System.Windows.Forms.CheckBox CHK_5;
|
||||
private System.Windows.Forms.CheckBox CHK_4;
|
||||
private System.Windows.Forms.CheckBox CHK_3;
|
||||
private System.Windows.Forms.CheckBox CHK_2;
|
||||
private System.Windows.Forms.CheckBox CHK_1;
|
||||
private System.Windows.Forms.CheckBox CHK_H8;
|
||||
private System.Windows.Forms.CheckBox CHK_H7;
|
||||
private System.Windows.Forms.CheckBox CHK_H6;
|
||||
private System.Windows.Forms.CheckBox CHK_H5;
|
||||
private System.Windows.Forms.CheckBox CHK_H4;
|
||||
private System.Windows.Forms.CheckBox CHK_H3;
|
||||
private System.Windows.Forms.CheckBox CHK_H2;
|
||||
private System.Windows.Forms.CheckBox CHK_H1;
|
||||
}
|
||||
}
|
||||
146
SAV/SAV_SimpleTrainer.cs
Normal file
@@ -0,0 +1,146 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace PKHeX
|
||||
{
|
||||
public partial class SAV_SimpleTrainer : Form
|
||||
{
|
||||
public SAV_SimpleTrainer()
|
||||
{
|
||||
InitializeComponent();
|
||||
Util.TranslateInterface(this, Main.curlanguage);
|
||||
|
||||
cba = new[] {CHK_1, CHK_2, CHK_3, CHK_4, CHK_5, CHK_6, CHK_7, CHK_8};
|
||||
TB_OTName.MaxLength = SAV.OTLength;
|
||||
B_MaxCash.Click += (sender, e) => MT_Money.Text = "9,999,999";
|
||||
|
||||
TB_OTName.Text = SAV.OT;
|
||||
CB_Gender.SelectedIndex = SAV.Gender;
|
||||
MT_TID.Text = SAV.TID.ToString("00000");
|
||||
MT_SID.Text = SAV.SID.ToString("00000");
|
||||
MT_Money.Text = SAV.Money.ToString();
|
||||
MT_Hours.Text = SAV.PlayedHours.ToString();
|
||||
MT_Minutes.Text = SAV.PlayedMinutes.ToString();
|
||||
MT_Seconds.Text = SAV.PlayedSeconds.ToString();
|
||||
|
||||
if (SAV is SAV3)
|
||||
{
|
||||
GB_Map.Visible = false;
|
||||
GB_Badges.Visible = false; // todo
|
||||
|
||||
L_Started.Visible = L_Fame.Visible = false;
|
||||
CAL_AdventureStartDate.Visible = CAL_HoFDate.Visible = false;
|
||||
CAL_AdventureStartTime.Visible = CAL_HoFTime.Visible = false;
|
||||
return;
|
||||
}
|
||||
|
||||
int badgeval = 0;
|
||||
if (SAV is SAV4)
|
||||
{
|
||||
SAV4 s = (SAV4)SAV;
|
||||
NUD_M.Value = s.M;
|
||||
NUD_X.Value = s.X;
|
||||
NUD_Z.Value = s.Z;
|
||||
NUD_Y.Value = s.Y;
|
||||
|
||||
badgeval = s.Badges;
|
||||
if (s.Version == GameVersion.HGSS)
|
||||
{
|
||||
badgeval |= s.Badges16 << 8;
|
||||
cba = cba.Concat(new[] {CHK_H1, CHK_H2, CHK_H3, CHK_H4, CHK_H5, CHK_H6, CHK_H7, CHK_H8}).ToArray();
|
||||
}
|
||||
}
|
||||
else if (SAV is SAV5)
|
||||
{
|
||||
SAV5 s = (SAV5)SAV;
|
||||
NUD_M.Value = s.M;
|
||||
NUD_X.Value = s.X;
|
||||
NUD_Z.Value = s.Z;
|
||||
NUD_Y.Value = s.Y;
|
||||
|
||||
badgeval = s.Badges;
|
||||
}
|
||||
|
||||
for (int i = 0; i < cba.Length; i++)
|
||||
{
|
||||
cba[i].Visible = true;
|
||||
cba[i].Checked = (badgeval & 1 << i) != 0;
|
||||
}
|
||||
|
||||
CAL_HoFDate.Value = new DateTime(2000, 1, 1).AddSeconds(SAV.SecondsToFame);
|
||||
CAL_HoFTime.Value = new DateTime(2000, 1, 1).AddSeconds(SAV.SecondsToFame % 86400);
|
||||
CAL_AdventureStartDate.Value = new DateTime(2000, 1, 1).AddSeconds(SAV.SecondsToStart);
|
||||
CAL_AdventureStartTime.Value = new DateTime(2000, 1, 1).AddSeconds(SAV.SecondsToStart % 86400);
|
||||
}
|
||||
private readonly CheckBox[] cba;
|
||||
private readonly SaveFile SAV = Main.SAV.Clone();
|
||||
|
||||
private void changeFFFF(object sender, EventArgs e)
|
||||
{
|
||||
MaskedTextBox box = sender as MaskedTextBox;
|
||||
if (box.Text == "") box.Text = "0";
|
||||
if (Util.ToInt32(box.Text) > 65535) box.Text = "65535";
|
||||
}
|
||||
|
||||
private void B_Save_Click(object sender, EventArgs e)
|
||||
{
|
||||
SAV.OT = TB_OTName.Text;
|
||||
SAV.Gender = (byte)CB_Gender.SelectedIndex;
|
||||
|
||||
SAV.TID = (ushort)Util.ToUInt32(MT_TID.Text);
|
||||
SAV.SID = (ushort)Util.ToUInt32(MT_SID.Text);
|
||||
SAV.Money = Util.ToUInt32(MT_Money.Text);
|
||||
|
||||
SAV.PlayedHours = ushort.Parse(MT_Hours.Text);
|
||||
SAV.PlayedMinutes = ushort.Parse(MT_Minutes.Text) % 60;
|
||||
SAV.PlayedSeconds = ushort.Parse(MT_Seconds.Text) % 60;
|
||||
|
||||
// Copy Badges
|
||||
int badgeval = 0;
|
||||
for (int i = 0; i < cba.Length; i++)
|
||||
badgeval |= (cba[i].Checked ? 1 : 0) << i;
|
||||
|
||||
if (SAV is SAV4)
|
||||
{
|
||||
SAV4 s = (SAV4)SAV;
|
||||
s.M = (int)NUD_M.Value;
|
||||
s.X = (int)NUD_X.Value;
|
||||
s.Z = (int)NUD_Z.Value;
|
||||
s.Y = (int)NUD_Y.Value;
|
||||
s.Badges = badgeval & 0xFF;
|
||||
if (s.Version == GameVersion.HGSS)
|
||||
{
|
||||
s.Badges16 = badgeval >> 8;
|
||||
}
|
||||
}
|
||||
else if (SAV is SAV5)
|
||||
{
|
||||
SAV5 s = (SAV5)SAV;
|
||||
s.M = (int)NUD_M.Value;
|
||||
s.X = (int)NUD_X.Value;
|
||||
s.Z = (int)NUD_Z.Value;
|
||||
s.Y = (int)NUD_Y.Value;
|
||||
s.Badges = badgeval & 0xFF;
|
||||
}
|
||||
|
||||
SAV.SecondsToStart = getSeconds(CAL_AdventureStartDate, CAL_AdventureStartTime);
|
||||
SAV.SecondsToFame = getSeconds(CAL_HoFDate, CAL_HoFTime);
|
||||
|
||||
SAV.Data.CopyTo(Main.SAV.Data, 0);
|
||||
Main.SAV.Edited = true;
|
||||
Close();
|
||||
}
|
||||
private void B_Cancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
private int getSeconds(DateTimePicker date, DateTimePicker time)
|
||||
{
|
||||
int val = (int)(date.Value - new DateTime(2000, 1, 1)).TotalSeconds;
|
||||
val -= val % 86400;
|
||||
val += (int)(time.Value - new DateTime(2000, 1, 1)).TotalSeconds;
|
||||
return val;
|
||||
}
|
||||
}
|
||||
}
|
||||