diff --git a/PKHeX.Core/Editing/HiddenPower.cs b/PKHeX.Core/Editing/HiddenPower.cs index 059fa2b38..5b190ccf8 100644 --- a/PKHeX.Core/Editing/HiddenPower.cs +++ b/PKHeX.Core/Editing/HiddenPower.cs @@ -231,7 +231,7 @@ private static int GetFlawedBitCount(ReadOnlySpan ivs, int bitValue) /// Hidden Power Type /// Individual Values (H/A/B/S/C/D) /// Generation specific format - public static void SetIVs(int type, Span ivs, EntityContext context = PKX.Context) + public static void SetIVs(int type, Span ivs, EntityContext context = Latest.Context) { if (context.Generation() <= 2) { diff --git a/PKHeX.Core/Legality/Breeding.cs b/PKHeX.Core/Legality/Breeding.cs index cc1629f49..73075e354 100644 --- a/PKHeX.Core/Legality/Breeding.cs +++ b/PKHeX.Core/Legality/Breeding.cs @@ -38,12 +38,12 @@ public static class Breeding }; /// - /// Checks if the species is valid for the if originated from Gen3/4 daycare eggs. + /// Checks if the species is valid for the if originated from Gen3/4 daycare eggs. /// - /// Encryption Constant + /// Encryption Constant /// Gender /// True if valid - public static bool IsValidSpeciesBit34(uint ec, byte gender) => gender != (ec & 0x8000) >> 15; // 1 = Male, 0 = Female, valid if different from Gender value. + public static bool IsValidSpeciesBit34(uint encryptionConstant, byte gender) => gender != (encryptionConstant & 0x8000) >> 15; // 1 = Male, 0 = Female, valid if different from Gender value. /// /// Checks if the can be born with inherited moves from the parents. @@ -52,8 +52,7 @@ public static class Breeding /// True if it can inherit moves, false if cannot. internal static bool GetCanInheritMoves(ushort species) { - var pi = PKX.GetGenderDetail(species); - if (pi is { Genderless: false, OnlyMale: false }) + if (EntityGender.IsFemaleOrDualGender(species)) return true; if (IsMixedGenderBreed(species)) return true; diff --git a/PKHeX.Core/Legality/Encounters/Verifiers/MysteryGiftVerifier.cs b/PKHeX.Core/Legality/Encounters/Verifiers/MysteryGiftVerifier.cs index a93611f0c..4b58821e8 100644 --- a/PKHeX.Core/Legality/Encounters/Verifiers/MysteryGiftVerifier.cs +++ b/PKHeX.Core/Legality/Encounters/Verifiers/MysteryGiftVerifier.cs @@ -11,7 +11,7 @@ public static class MysteryGiftVerifier private static Dictionary?[] Get() { - var s = new Dictionary?[PKX.Generation + 1]; + var s = new Dictionary?[Latest.Generation + 1]; for (byte i = 3; i < s.Length; i++) s[i] = GetRestriction(i); return s; diff --git a/PKHeX.Core/Legality/RNG/CuteCharm4.cs b/PKHeX.Core/Legality/RNG/CuteCharm4.cs index 67c2594d9..0f7680494 100644 --- a/PKHeX.Core/Legality/RNG/CuteCharm4.cs +++ b/PKHeX.Core/Legality/RNG/CuteCharm4.cs @@ -36,7 +36,7 @@ private static byte GetGenderRatio(ushort species) { return species <= Legal.MaxSpeciesID_4 ? PersonalTable.HGSS[species].Gender - : PKX.GetGenderRatio(species); // fallback (don't bother trying to devolve to Gen1-4 encounter species) + : EntityGender.GetGenderRatio(species); // fallback (don't bother trying to devolve to Gen1-4 encounter species) } private static bool IsAzurillMale(uint pid) => pid is >= 0xC8 and <= 0xE0; diff --git a/PKHeX.Core/Legality/Verifiers/PIDVerifier.cs b/PKHeX.Core/Legality/Verifiers/PIDVerifier.cs index 1f44a6327..cdabb165a 100644 --- a/PKHeX.Core/Legality/Verifiers/PIDVerifier.cs +++ b/PKHeX.Core/Legality/Verifiers/PIDVerifier.cs @@ -130,7 +130,7 @@ private static void VerifyEC100(LegalityAnalysis data, ushort encSpecies) return; // Evolved, don't need to calculate the final evolution for the verbose report. // Indicate the evolution for the user. - const EntityContext mostRecent = PKX.Context; // latest ec100 form here + const EntityContext mostRecent = Latest.Context; // latest ec100 form here uint evoVal = pk.EncryptionConstant % 100; bool rare = evoVal == 0; var (species, form) = EvolutionRestrictions.GetEvolvedSpeciesFormEC100(encSpecies, rare); diff --git a/PKHeX.Core/PKM/Util/EntityFileExtension.cs b/PKHeX.Core/PKM/Util/EntityFileExtension.cs index 9548830ca..8d026801f 100644 --- a/PKHeX.Core/PKM/Util/EntityFileExtension.cs +++ b/PKHeX.Core/PKM/Util/EntityFileExtension.cs @@ -26,7 +26,7 @@ public static class EntityFileExtension /// /// Maximum Generation to permit /// Valid file extensions. - public static string[] GetExtensions(int maxGeneration = PKX.Generation) + public static string[] GetExtensions(int maxGeneration = Latest.Generation) { int min = maxGeneration is <= 2 or >= 7 ? 1 : 3; int size = maxGeneration - min + 1 + CountExtra; diff --git a/PKHeX.Core/PKM/Util/EntityGender.cs b/PKHeX.Core/PKM/Util/EntityGender.cs index 97f04004e..86ee94f48 100644 --- a/PKHeX.Core/PKM/Util/EntityGender.cs +++ b/PKHeX.Core/PKM/Util/EntityGender.cs @@ -2,6 +2,9 @@ namespace PKHeX.Core; +/// +/// Logic for interacting with Entity Gender +/// public static class EntityGender { public const byte Male = 0; @@ -39,7 +42,7 @@ public static byte GetFromString(ReadOnlySpan s) /// This method should only be used for Generations 3-5 origin. public static byte GetFromPID(ushort species, uint pid) { - var gt = PKX.GetGenderRatio(species); + var gt = GetGenderRatio(species); return GetFromPIDAndRatio(pid, gt); } @@ -50,4 +53,65 @@ public static byte GetFromPID(ushort species, uint pid) PersonalInfo.RatioMagicMale => Male, _ => (pid & 0xFF) < gr ? Female : Male, }; + + /// + /// Checks if the species (base form) can be female. + /// + public static bool IsFemaleOrDualGender(ushort species) => GetGenderRatio(species) is not (OM or NG); + + /// + /// Gets the magic gender value used in past generations (3-8) for logic checks. + /// + public static byte GetGenderRatio(ushort species) + { + var arr = GenderRatios; + if (species < arr.Length) + return arr[species]; + return NG; + } + + // 256/100% gender ratios + private const byte OM = 000; // 100% Male + private const byte VM = 031; // 7:1 Male + private const byte MM = 063; // 3:1 Male + private const byte HH = 127; // 1:1 50% + private const byte MF = 191; // 3:1 Mostly-Female + private const byte VF = 225; // 7:1 Female + private const byte OF = 254; // 100% Female + private const byte NG = 255; // Only-Genderless + + private static ReadOnlySpan GenderRatios => + [ + NG, VM, VM, VM, VM, VM, VM, VM, VM, VM, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, OF, OF, OF, OM, OM, OM, MF, MF, MF, MF, MF, + MF, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, MM, MM, HH, HH, HH, MM, MM, MM, MM, MM, MM, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, + HH, NG, NG, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, NG, NG, HH, HH, HH, HH, OM, OM, HH, HH, HH, HH, HH, OF, HH, OF, HH, HH, HH, HH, + NG, NG, HH, HH, OF, MM, MM, HH, OM, HH, HH, HH, NG, VM, VM, VM, VM, NG, VM, VM, VM, VM, VM, VM, NG, NG, NG, HH, HH, HH, NG, NG, VM, VM, VM, VM, VM, VM, VM, VM, + VM, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, MF, MF, VM, VM, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, VM, VM, HH, HH, + // 200 + HH, NG, HH, HH, HH, HH, HH, HH, HH, MF, MF, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, MF, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, NG, HH, HH, OM, OM, OF, MM, + MM, OF, OF, NG, NG, NG, HH, HH, HH, NG, NG, NG, VM, VM, VM, VM, VM, VM, VM, VM, VM, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, + HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, NG, HH, HH, HH, MM, MM, MF, HH, MF, MF, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, OM, OF, HH, HH, HH, HH, HH, + HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, NG, NG, HH, HH, HH, HH, NG, NG, VM, VM, VM, VM, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, + HH, HH, HH, HH, HH, HH, HH, HH, HH, VM, MF, HH, HH, HH, NG, NG, NG, NG, NG, NG, OF, OM, NG, NG, NG, NG, NG, VM, VM, VM, VM, VM, VM, VM, VM, VM, HH, HH, HH, HH, + // 400 + HH, HH, HH, HH, HH, HH, HH, HH, VM, VM, VM, VM, HH, OF, OM, VM, OF, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, MF, MF, HH, HH, HH, NG, NG, HH, HH, + OF, HH, HH, HH, HH, HH, VM, VM, VM, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, NG, HH, HH, HH, MM, MM, VM, HH, VM, VM, HH, HH, NG, OM, HH, HH, OF, NG, + NG, NG, NG, NG, NG, HH, NG, NG, OF, NG, NG, NG, NG, NG, NG, VM, VM, VM, VM, VM, VM, VM, VM, VM, HH, HH, HH, HH, HH, HH, HH, VM, VM, VM, VM, VM, VM, HH, HH, HH, + HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, MM, MM, MM, HH, HH, HH, OM, OM, HH, HH, HH, HH, HH, HH, HH, HH, OF, OF, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, + HH, HH, HH, HH, VM, VM, VM, VM, HH, HH, VM, VM, MF, MF, MF, MF, MF, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, NG, + // 600 + NG, NG, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, NG, HH, HH, HH, HH, HH, HH, NG, NG, HH, HH, HH, OM, OM, OF, OF, HH, HH, HH, HH, HH, HH, HH, NG, NG, + NG, OM, OM, NG, NG, OM, NG, NG, NG, NG, VM, VM, VM, VM, VM, VM, VM, VM, VM, HH, HH, HH, HH, HH, HH, HH, HH, VF, VF, OF, OF, OF, HH, HH, HH, HH, HH, HH, OM, HH, + HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, VM, VM, VM, VM, VM, HH, HH, NG, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, NG, NG, NG, NG, + NG, NG, VM, VM, VM, VM, VM, VM, VM, VM, VM, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, MF, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, VM, OF, HH, + HH, OF, OF, OF, MF, HH, HH, HH, HH, HH, HH, HH, NG, NG, NG, HH, HH, HH, HH, HH, HH, NG, HH, HH, HH, NG, NG, NG, NG, NG, NG, NG, NG, NG, NG, NG, NG, NG, NG, NG, + // 800 + NG, NG, NG, NG, NG, NG, NG, NG, NG, NG, VM, VM, VM, VM, VM, VM, VM, VM, VM, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, + HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, NG, NG, OF, OF, OF, OM, OM, OM, HH, HH, MF, HH, HH, HH, OF, OF, NG, HH, HH, HH, HH, HH, OM, HH, HH, HH, + NG, NG, NG, NG, HH, HH, HH, HH, NG, NG, NG, VM, VM, NG, NG, NG, NG, NG, NG, HH, HH, HH, OM, HH, HH, OF, VM, VM, VM, VM, VM, VM, VM, VM, VM, HH, OM, HH, HH, HH, + HH, HH, HH, HH, NG, NG, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, OF, OF, OF, + HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, HH, NG, NG, NG, NG, NG, NG, NG, NG, NG, NG, NG, NG, HH, HH, HH, NG, + // 1000 + NG, NG, NG, NG, NG, NG, NG, NG, NG, NG, NG, HH, NG, NG, OM, OM, OM, OF, HH, HH, NG, NG, NG, NG, NG, + ]; } diff --git a/PKHeX.Core/PKM/Util/Language.cs b/PKHeX.Core/PKM/Util/Language.cs index e3a84beb3..684c76cb5 100644 --- a/PKHeX.Core/PKM/Util/Language.cs +++ b/PKHeX.Core/PKM/Util/Language.cs @@ -34,7 +34,7 @@ public static class Language /// /// Generation to check. /// Available languages for the given generation. - public static ReadOnlySpan GetAvailableGameLanguages(byte generation = PKX.Generation) => generation switch + public static ReadOnlySpan GetAvailableGameLanguages(byte generation = Latest.Generation) => generation switch { 1 => Languages_3, // No KOR 2 => Languages_GB, diff --git a/PKHeX.Core/PKM/Util/Latest.cs b/PKHeX.Core/PKM/Util/Latest.cs new file mode 100644 index 000000000..fe7d292fb --- /dev/null +++ b/PKHeX.Core/PKM/Util/Latest.cs @@ -0,0 +1,11 @@ +namespace PKHeX.Core; + +/// +/// Latest/most-recent game values for data providing and manipulation. +/// +public static class Latest +{ + public const EntityContext Context = EntityContext.Gen9; + public const GameVersion Version = GameVersion.SL; + public const byte Generation = 9; +} diff --git a/PKHeX.Core/PKM/Util/PKX.cs b/PKHeX.Core/PKM/Util/PKX.cs deleted file mode 100644 index 41e79e04c..000000000 --- a/PKHeX.Core/PKM/Util/PKX.cs +++ /dev/null @@ -1,26 +0,0 @@ -namespace PKHeX.Core; - -/// -/// Latest game values for data providing and manipulation. -/// -public static class PKX -{ - public const EntityContext Context = EntityContext.Gen9; - public const GameVersion Version = GameVersion.SL; - public const byte Generation = 9; - - // We need to expose gender info for backwards compatibility / arbitrary game logic. - - /// - /// Gets the gender details for the requested species (base form). - /// - /// Gender details for the personal info. - internal static IGenderDetail GetGenderDetail(ushort species) - => PersonalTable.SV[species]; - - /// - /// Gets the magic gender value used in past generations (3-8) for logic checks. - /// - internal static byte GetGenderRatio(ushort species) - => PersonalTable.SV[species].Gender; -} diff --git a/PKHeX.Core/PKM/Util/SpeciesName.cs b/PKHeX.Core/PKM/Util/SpeciesName.cs index 40f0904fd..38673a0de 100644 --- a/PKHeX.Core/PKM/Util/SpeciesName.cs +++ b/PKHeX.Core/PKM/Util/SpeciesName.cs @@ -8,8 +8,6 @@ namespace PKHeX.Core; /// public static class SpeciesName { - private const int LatestGeneration = PKX.Generation; - /// /// Species name lists indexed by the value. /// @@ -246,7 +244,7 @@ private static string GetEggName1234(ushort species, int language, byte generati /// Current name /// Generation specific formatting option /// True if it does not match any language name, False if not nicknamed - public static bool IsNicknamedAnyLanguage(ushort species, ReadOnlySpan nickname, byte generation = LatestGeneration) + public static bool IsNicknamedAnyLanguage(ushort species, ReadOnlySpan nickname, byte generation = Latest.Generation) { var langs = Language.GetAvailableGameLanguages(generation); foreach (var language in langs) @@ -265,7 +263,7 @@ public static bool IsNicknamedAnyLanguage(ushort species, ReadOnlySpan nic /// Language ID of the Pokémon /// Generation specific formatting option /// True if it does not match the language name, False if not nicknamed (matches). - public static bool IsNicknamed(ushort species, ReadOnlySpan nickname, int language, byte generation = LatestGeneration) + public static bool IsNicknamed(ushort species, ReadOnlySpan nickname, int language, byte generation = Latest.Generation) { var expect = GetSpeciesNameGeneration(species, language, generation); return !nickname.SequenceEqual(expect); @@ -279,7 +277,7 @@ public static bool IsNicknamed(ushort species, ReadOnlySpan nickname, int /// Current name /// Generation specific formatting option /// Language ID if it does not match any language name, -1 if no matches - public static int GetSpeciesNameLanguage(ushort species, int priorityLanguage, ReadOnlySpan nickname, byte generation = LatestGeneration) + public static int GetSpeciesNameLanguage(ushort species, int priorityLanguage, ReadOnlySpan nickname, byte generation = Latest.Generation) { var langs = Language.GetAvailableGameLanguages(generation); var priorityIndex = langs.IndexOf((byte)priorityLanguage); @@ -300,7 +298,7 @@ public static int GetSpeciesNameLanguage(ushort species, int priorityLanguage, R /// Current name /// Generation specific formatting option /// Language ID if it does not match any language name, -1 if no matches - public static int GetSpeciesNameLanguage(ushort species, ReadOnlySpan nickname, byte generation = LatestGeneration) + public static int GetSpeciesNameLanguage(ushort species, ReadOnlySpan nickname, byte generation = Latest.Generation) { var langs = Language.GetAvailableGameLanguages(generation); return GetSpeciesNameLanguage(species, nickname, generation, langs); @@ -329,7 +327,7 @@ public static bool TryGetSpecies(ReadOnlySpan speciesName, int language, o return SpeciesDict[language].TryGetValue(speciesName, out species); } - public static bool TryGetSpeciesAnyLanguage(ReadOnlySpan speciesName, out ushort species, byte generation = LatestGeneration) + public static bool TryGetSpeciesAnyLanguage(ReadOnlySpan speciesName, out ushort species, byte generation = Latest.Generation) { foreach (var language in Language.GetAvailableGameLanguages(generation)) { @@ -340,7 +338,7 @@ public static bool TryGetSpeciesAnyLanguage(ReadOnlySpan speciesName, out return false; } - public static bool TryGetSpeciesAnyLanguageCaseInsensitive(ReadOnlySpan speciesName, out ushort species, byte generation = LatestGeneration) + public static bool TryGetSpeciesAnyLanguageCaseInsensitive(ReadOnlySpan speciesName, out ushort species, byte generation = Latest.Generation) { Span lowercase = stackalloc char[speciesName.Length]; speciesName.ToLowerInvariant(lowercase); diff --git a/PKHeX.Core/Saves/Abstractions/SimpleTrainerInfo.cs b/PKHeX.Core/Saves/Abstractions/SimpleTrainerInfo.cs index eb2238b13..2b63a21f1 100644 --- a/PKHeX.Core/Saves/Abstractions/SimpleTrainerInfo.cs +++ b/PKHeX.Core/Saves/Abstractions/SimpleTrainerInfo.cs @@ -19,10 +19,10 @@ public sealed record SimpleTrainerInfo : ITrainerInfo, IRegionOrigin public byte Country { get; set; } = 49; // USA public GameVersion Version { get; } - public byte Generation { get; init; } = PKX.Generation; - public EntityContext Context { get; init; } = PKX.Context; + public byte Generation { get; init; } = Latest.Generation; + public EntityContext Context { get; init; } = Latest.Context; - public SimpleTrainerInfo(GameVersion game = PKX.Version) + public SimpleTrainerInfo(GameVersion game = Latest.Version) { Version = game; Context = Version.GetContext(); diff --git a/PKHeX.Drawing.Misc/Util/TypeSpriteUtil.cs b/PKHeX.Drawing.Misc/Util/TypeSpriteUtil.cs index a4d8098cd..a5ede8163 100644 --- a/PKHeX.Drawing.Misc/Util/TypeSpriteUtil.cs +++ b/PKHeX.Drawing.Misc/Util/TypeSpriteUtil.cs @@ -8,21 +8,21 @@ public static class TypeSpriteUtil { private static Bitmap? Get(string name) => Resources.ResourceManager.GetObject(name) as Bitmap; - public static Bitmap? GetTypeSpriteWide(byte type, byte generation = PKX.Generation) + public static Bitmap? GetTypeSpriteWide(byte type, byte generation = Latest.Generation) { if (generation <= 2) type = (byte)((MoveType)type).GetMoveTypeGeneration(generation); return Get($"type_wide_{type:00}"); } - public static Bitmap? GetTypeSpriteIcon(byte type, byte generation = PKX.Generation) + public static Bitmap? GetTypeSpriteIcon(byte type, byte generation = Latest.Generation) { if (generation <= 2) type = (byte)((MoveType)type).GetMoveTypeGeneration(generation); return Get($"type_icon_{type:00}"); } - public static Bitmap? GetTypeSpriteIconSmall(byte type, byte generation = PKX.Generation) + public static Bitmap? GetTypeSpriteIconSmall(byte type, byte generation = Latest.Generation) { if (generation <= 2) type = (byte)((MoveType)type).GetMoveTypeGeneration(generation); diff --git a/PKHeX.Drawing.PokeSprite/Util/SpriteName.cs b/PKHeX.Drawing.PokeSprite/Util/SpriteName.cs index a372fc487..e6666f3fa 100644 --- a/PKHeX.Drawing.PokeSprite/Util/SpriteName.cs +++ b/PKHeX.Drawing.PokeSprite/Util/SpriteName.cs @@ -22,7 +22,7 @@ public static class SpriteName /// /// Gets the resource name of the Pokémon sprite. /// - public static string GetResourceStringSprite(ushort species, byte form, byte gender, uint formarg, EntityContext context = PKX.Context, bool shiny = false) + public static string GetResourceStringSprite(ushort species, byte form, byte gender, uint formarg, EntityContext context = Latest.Context, bool shiny = false) { if (SpeciesDefaultFormSprite.Contains(species)) // Species who show their default sprite regardless of Form form = 0; diff --git a/PKHeX.WinForms/Properties/PKHeXSettings.cs b/PKHeX.WinForms/Properties/PKHeXSettings.cs index 3a2927422..a1f981751 100644 --- a/PKHeX.WinForms/Properties/PKHeXSettings.cs +++ b/PKHeX.WinForms/Properties/PKHeXSettings.cs @@ -156,7 +156,7 @@ public uint RecentlyLoadedMaxCount } // Don't let invalid values slip into the startup version. - private GameVersion _defaultSaveVersion = PKX.Version; + private GameVersion _defaultSaveVersion = Latest.Version; private string _language = WinFormsUtil.GetCultureLanguage(); [Browsable(false)] diff --git a/PKHeX.WinForms/Subforms/SAV_Database.cs b/PKHeX.WinForms/Subforms/SAV_Database.cs index 820b98c66..4212f23f3 100644 --- a/PKHeX.WinForms/Subforms/SAV_Database.cs +++ b/PKHeX.WinForms/Subforms/SAV_Database.cs @@ -38,7 +38,7 @@ public partial class SAV_Database : Form private const int RES_MAX = GridWidth * GridHeight; private readonly string Counter; private readonly string Viewed; - private const int MAXFORMAT = PKX.Generation; + private const int MAXFORMAT = Latest.Generation; private readonly SummaryPreviewer ShowSet = new(); private CancellationTokenSource cts = new(); diff --git a/PKHeX.WinForms/Subforms/SAV_MysteryGiftDB.cs b/PKHeX.WinForms/Subforms/SAV_MysteryGiftDB.cs index 8f6b451c2..3716e5f8f 100644 --- a/PKHeX.WinForms/Subforms/SAV_MysteryGiftDB.cs +++ b/PKHeX.WinForms/Subforms/SAV_MysteryGiftDB.cs @@ -117,7 +117,7 @@ public SAV_MysteryGiftDB(PKMEditor tabs, SAVEditor sav) private const int RES_MAX = GridWidth * GridHeight; private readonly string Counter; private readonly string Viewed; - private const int MAXFORMAT = PKX.Generation; + private const int MAXFORMAT = Latest.Generation; private bool GetShiftedIndex(ref int index) {