diff --git a/PKHeX.Core/Game/GameStrings/FilteredGameDataSource.cs b/PKHeX.Core/Game/GameStrings/FilteredGameDataSource.cs index 04c61eb6d..8e8bf8bf9 100644 --- a/PKHeX.Core/Game/GameStrings/FilteredGameDataSource.cs +++ b/PKHeX.Core/Game/GameStrings/FilteredGameDataSource.cs @@ -45,7 +45,7 @@ namespace PKHeX.Core return sav switch { SAV7b => source.SpeciesDataSource // LGPE: Kanto 151, Meltan/Melmetal - .Where(s => s.Value <= (int)Core.Species.Mew || s.Value is (int)Core.Species.Meltan or (int)Core.Species.Melmetal), + .Where(s => s.Value is <= (int)Core.Species.Mew or (int)Core.Species.Meltan or (int)Core.Species.Melmetal), _ => source.SpeciesDataSource.Where(s => s.Value <= sav.MaxSpeciesID) }; } @@ -87,10 +87,13 @@ namespace PKHeX.Core { var count = format == 3 && (abilities[1] == 0 || abilities[1] == abilities[0]) ? 1 : abilities.Count; var list = new ComboItem[count]; + + var alist = Source.Strings.Ability; + var suffix = AbilityIndexSuffixes; for (int i = 0; i < list.Length; i++) { var ability = abilities[i]; - list[i] = new ComboItem(Source.Source.Ability[ability] + AbilityIndexSuffixes[i], ability); + list[i] = new ComboItem(alist[ability] + suffix[i], ability); } return list; diff --git a/PKHeX.Core/Game/GameStrings/GameDataSource.cs b/PKHeX.Core/Game/GameStrings/GameDataSource.cs index 6ee322e95..bbfbde177 100644 --- a/PKHeX.Core/Game/GameStrings/GameDataSource.cs +++ b/PKHeX.Core/Game/GameStrings/GameDataSource.cs @@ -1,7 +1,5 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; -using static PKHeX.Core.GameVersion; namespace PKHeX.Core { @@ -11,7 +9,7 @@ namespace PKHeX.Core public sealed class GameDataSource { public static readonly IReadOnlyList Regions = Util.GetCSVUnsortedCBList("regions3ds"); - public static readonly IReadOnlyList LanguageList = Util.GetCSVUnsortedCBList("languages"); + private static readonly List LanguageList = Util.GetCSVUnsortedCBList("languages"); // ignores Poke/Great/Ultra private static readonly ushort[] ball_nums = { 007, 576, 013, 492, 497, 014, 495, 493, 496, 494, 011, 498, 008, 006, 012, 015, 009, 005, 499, 010, 001, 016, 851 }; @@ -20,32 +18,34 @@ namespace PKHeX.Core public GameDataSource(GameStrings s) { - Source = s; + Strings = s; BallDataSource = Util.GetVariedCBListBall(s.itemlist, ball_nums, ball_vals); SpeciesDataSource = Util.GetCBList(s.specieslist); NatureDataSource = Util.GetCBList(s.natures); AbilityDataSource = Util.GetCBList(s.abilitylist); EncounterTypeDataSource = Util.GetUnsortedCBList(s.encountertypelist, Gen4EncounterTypes); - HaXMoveDataSource = Util.GetCBList(s.movelist); - LegalMoveDataSource = HaXMoveDataSource.Where(m => !Legal.Z_Moves.Contains(m.Value)).ToList(); + var moves = Util.GetCBList(s.movelist); + HaXMoveDataSource = moves; + var legal = new List(moves); + legal.RemoveAll(m => Legal.Z_Moves.Contains(m.Value)); + LegalMoveDataSource = legal; VersionDataSource = GetVersionList(s); - MetGen2 = CreateGen2(s); - MetGen3 = CreateGen3(s); - MetGen3CXD = CreateGen3CXD(s); - MetGen4 = CreateGen4(s); - MetGen5 = CreateGen5(s); - MetGen6 = CreateGen6(s); - MetGen7 = CreateGen7(s); - MetGen7GG = CreateGen7GG(s); - MetGen8 = CreateGen8(s); + Met = new MetDataSource(s); Empty = new ComboItem(s.Species[0], 0); } - public readonly GameStrings Source; + /// Strings that this object's lists were generated with. + public readonly GameStrings Strings; + + /// Contains Met Data lists to source lists from. + public readonly MetDataSource Met; + + /// Represents "(None)", localized to this object's language strings. + public readonly ComboItem Empty; public readonly IReadOnlyList SpeciesDataSource; public readonly IReadOnlyList BallDataSource; @@ -56,18 +56,6 @@ namespace PKHeX.Core public readonly IReadOnlyList HaXMoveDataSource; public readonly IReadOnlyList EncounterTypeDataSource; - private readonly IReadOnlyList MetGen2; - private readonly IReadOnlyList MetGen3; - private readonly IReadOnlyList MetGen3CXD; - private readonly IReadOnlyList MetGen4; - private readonly IReadOnlyList MetGen5; - private readonly IReadOnlyList MetGen6; - private readonly IReadOnlyList MetGen7; - private readonly IReadOnlyList MetGen7GG; - private readonly IReadOnlyList MetGen8; - - public readonly ComboItem Empty; - private static IReadOnlyList GetVersionList(GameStrings s) { var list = s.gamelist; @@ -95,177 +83,12 @@ namespace PKHeX.Core return Util.GetUnsortedCBList(list, games); } - private static List CreateGen2(GameStrings s) - { - var locations = Util.GetCBList(s.metGSC_00000, Enumerable.Range(0, 0x5F).ToArray()); - Util.AddCBWithOffset(locations, s.metGSC_00000, 00000, 0x7E, 0x7F); - return locations; - } - - private static List CreateGen3(GameStrings s) - { - var locations = Util.GetCBList(s.metRSEFRLG_00000, Enumerable.Range(0, 213).ToArray()); - Util.AddCBWithOffset(locations, s.metRSEFRLG_00000, 00000, 253, 254, 255); - return locations; - } - - private static List CreateGen3CXD(GameStrings s) - { - return Util.GetCBList(s.metCXD_00000, Enumerable.Range(0, s.metCXD_00000.Length).ToArray()).Where(c => c.Text.Length > 0).ToList(); - } - - private static List CreateGen4(GameStrings s) - { - var locations = Util.GetCBList(s.metHGSS_00000, 0); - Util.AddCBWithOffset(locations, s.metHGSS_02000, 2000, Locations.Daycare4); - Util.AddCBWithOffset(locations, s.metHGSS_02000, 2000, Locations.LinkTrade4); - Util.AddCBWithOffset(locations, s.metHGSS_03000, 3000, Locations.Ranger4); - Util.AddCBWithOffset(locations, s.metHGSS_00000, 0000, Legal.Met_HGSS_0); - Util.AddCBWithOffset(locations, s.metHGSS_02000, 2000, Legal.Met_HGSS_2); - Util.AddCBWithOffset(locations, s.metHGSS_03000, 3000, Legal.Met_HGSS_3); - return locations; - } - - private static List CreateGen5(GameStrings s) - { - var locations = Util.GetCBList(s.metBW2_00000, 0); - Util.AddCBWithOffset(locations, s.metBW2_60000, 60001, Locations.Daycare5); - Util.AddCBWithOffset(locations, s.metBW2_30000, 30001, Locations.LinkTrade5); - Util.AddCBWithOffset(locations, s.metBW2_00000, 00000, Legal.Met_BW2_0); - Util.AddCBWithOffset(locations, s.metBW2_30000, 30001, Legal.Met_BW2_3); - Util.AddCBWithOffset(locations, s.metBW2_40000, 40001, Legal.Met_BW2_4); - Util.AddCBWithOffset(locations, s.metBW2_60000, 60001, Legal.Met_BW2_6); - return locations; - } - - private static List CreateGen6(GameStrings s) - { - var locations = Util.GetCBList(s.metXY_00000, 0); - Util.AddCBWithOffset(locations, s.metXY_60000, 60001, Locations.Daycare5); - Util.AddCBWithOffset(locations, s.metXY_30000, 30001, Locations.LinkTrade6); - Util.AddCBWithOffset(locations, s.metXY_00000, 00000, Legal.Met_XY_0); - Util.AddCBWithOffset(locations, s.metXY_30000, 30001, Legal.Met_XY_3); - Util.AddCBWithOffset(locations, s.metXY_40000, 40001, Legal.Met_XY_4); - Util.AddCBWithOffset(locations, s.metXY_60000, 60001, Legal.Met_XY_6); - return locations; - } - - private static List CreateGen7(GameStrings s) - { - var locations = Util.GetCBList(s.metSM_00000, 0); - Util.AddCBWithOffset(locations, s.metSM_60000, 60001, Locations.Daycare5); - Util.AddCBWithOffset(locations, s.metSM_30000, 30001, Locations.LinkTrade6); - Util.AddCBWithOffset(locations, s.metSM_00000, 00000, Legal.Met_SM_0); - Util.AddCBWithOffset(locations, s.metSM_30000, 30001, Legal.Met_SM_3); - Util.AddCBWithOffset(locations, s.metSM_40000, 40001, Legal.Met_SM_4); - Util.AddCBWithOffset(locations, s.metSM_60000, 60001, Legal.Met_SM_6); - return locations; - } - - private static List CreateGen7GG(GameStrings s) - { - var locations = Util.GetCBList(s.metGG_00000, 0); - Util.AddCBWithOffset(locations, s.metGG_60000, 60001, 60002); - Util.AddCBWithOffset(locations, s.metGG_30000, 30001, Locations.LinkTrade6); - Util.AddCBWithOffset(locations, s.metGG_00000, 00000, Legal.Met_GG_0); - Util.AddCBWithOffset(locations, s.metGG_30000, 30001, Legal.Met_GG_3); - Util.AddCBWithOffset(locations, s.metGG_40000, 40001, Legal.Met_GG_4); - Util.AddCBWithOffset(locations, s.metGG_60000, 60001, Legal.Met_GG_6); - return locations; - } - - private static List CreateGen8(GameStrings s) - { - var locations = Util.GetCBList(s.metSWSH_00000, 0); - Util.AddCBWithOffset(locations, s.metSWSH_60000, 60001, 60002); - Util.AddCBWithOffset(locations, s.metSWSH_30000, 30001, Locations.LinkTrade6); - Util.AddCBWithOffset(locations, s.metSWSH_00000, 00000, Legal.Met_SWSH_0); - Util.AddCBWithOffset(locations, s.metSWSH_30000, 30001, Legal.Met_SWSH_3); - Util.AddCBWithOffset(locations, s.metSWSH_40000, 40001, Legal.Met_SWSH_4); - Util.AddCBWithOffset(locations, s.metSWSH_60000, 60001, Legal.Met_SWSH_6); - return locations; - } - public List GetItemDataSource(GameVersion game, int generation, IReadOnlyList allowed, bool HaX = false) { - var items = Source.GetItemStrings(generation, game); + var items = Strings.GetItemStrings(generation, game); return HaX ? Util.GetCBList(items) : Util.GetCBList(items, allowed); } - /// - /// Fetches a Met Location list for a that has been transferred away from and overwritten. - /// - /// Origin version - /// Current save file generation - /// True if an egg location list, false if a regular met location list - /// Met location list - public IReadOnlyList GetLocationList(GameVersion version, int currentGen, bool egg = false) - { - if (currentGen == 2) - return MetGen2; - - if (egg && version < W && currentGen >= 5) - return MetGen4; - - return version switch - { - CXD when currentGen == 3 => MetGen3CXD, - R or S when currentGen == 3 => Partition1(MetGen3, z => z is <= 87), // Ferry - E when currentGen == 3 => Partition1(MetGen3, z => z is <= 87 or >= 197 and <= 212), // Trainer Hill - FR or LG when currentGen == 3 => Partition1(MetGen3, z => z is > 87 and < 197), // Celadon Dept. - D or P when currentGen == 4 => Partition2(MetGen4, z => z is <= 111, 4), // Battle Park - Pt when currentGen == 4 => Partition2(MetGen4, z => z is <= 125, 4), // Rock Peak Ruins - HG or SS when currentGen == 4 => Partition2(MetGen4, z => z is > 125 and < 234, 4), // Celadon Dept. - - B or W => MetGen5, - B2 or W2 => Partition2(MetGen5, z => z is <= 116), // Abyssal Ruins - X or Y => Partition2(MetGen6, z => z is <= 168), // Unknown Dungeon - OR or AS => Partition2(MetGen6, z => z is > 168 and <= 354), // Secret Base - SN or MN => Partition2(MetGen7, z => z is < 200), // Outer Cape - US or UM - or RD or BU or GN or YW - or GD or SV or C => Partition2(MetGen7, z => z < 234), // Dividing Peak Tunnel - GP or GE or GO => Partition2(MetGen7GG, z => z <= 54), // Pokémon League - SW or SH => Partition2(MetGen8, z => z < 400), - _ => GetLocationListModified(version, currentGen), - }; - - static IReadOnlyList Partition1(IEnumerable list, Func criteria) - { - return list.OrderByDescending(loc => criteria(loc.Value)).ToList(); - } - - static IReadOnlyList Partition2(IReadOnlyList list, Func criteria, int keepFirst = 3) - { - return list.Take(keepFirst).Concat(list.Skip(keepFirst).OrderByDescending(loc => criteria(loc.Value))).ToList(); - } - } - - /// - /// Fetches a Met Location list for a that has been transferred away from and overwritten. - /// - /// Origin version - /// Current save file generation - /// Met location list - private IReadOnlyList GetLocationListModified(GameVersion version, int currentGen) - { - if (version <= CXD && currentGen == 4) - { - return MetGen4.Where(loc => loc.Value == Locations.Transfer3) // Pal Park to front - .Concat(MetGen4.Take(4)) - .Concat(MetGen4.Skip(4).Where(loc => loc.Value != Locations.Transfer3)).ToList(); - } - - if (version < X && currentGen >= 5) // PokéTransfer to front - { - return MetGen5.Where(loc => loc.Value == Locations.Transfer4) - .Concat(MetGen5.Take(3)) - .Concat(MetGen5.Skip(3).Where(loc => loc.Value != Locations.Transfer4)).ToList(); - } - - return Array.Empty(); - } - public static IReadOnlyList LanguageDataSource(int gen) { var languages = LanguageList.ToList(); diff --git a/PKHeX.Core/Game/GameStrings/GameInfo.cs b/PKHeX.Core/Game/GameStrings/GameInfo.cs index df3d5538e..4f0aa45d4 100644 --- a/PKHeX.Core/Game/GameStrings/GameInfo.cs +++ b/PKHeX.Core/Game/GameStrings/GameInfo.cs @@ -77,7 +77,7 @@ namespace PKHeX.Core /// Consumable list of met locations public static IReadOnlyList GetLocationList(GameVersion version, int pkmFormat, bool egg = false) { - return Sources.GetLocationList(version, pkmFormat, egg); + return Sources.Met.GetLocationList(version, pkmFormat, egg); } } } diff --git a/PKHeX.Core/Game/GameStrings/MetDataSource.cs b/PKHeX.Core/Game/GameStrings/MetDataSource.cs new file mode 100644 index 000000000..76aad0a5f --- /dev/null +++ b/PKHeX.Core/Game/GameStrings/MetDataSource.cs @@ -0,0 +1,198 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using static PKHeX.Core.GameVersion; + +namespace PKHeX.Core +{ + public sealed class MetDataSource + { + private readonly List MetGen2; + private readonly List MetGen3; + private readonly List MetGen3CXD; + private readonly List MetGen4; + private readonly List MetGen5; + private readonly List MetGen6; + private readonly List MetGen7; + private readonly List MetGen7GG; + private readonly List MetGen8; + + public MetDataSource(GameStrings s) + { + MetGen2 = CreateGen2(s); + MetGen3 = CreateGen3(s); + MetGen3CXD = CreateGen3CXD(s); + MetGen4 = CreateGen4(s); + MetGen5 = CreateGen5(s); + MetGen6 = CreateGen6(s); + MetGen7 = CreateGen7(s); + MetGen7GG = CreateGen7GG(s); + MetGen8 = CreateGen8(s); + } + + private static List CreateGen2(GameStrings s) + { + var locations = Util.GetCBList(s.metGSC_00000, Enumerable.Range(0, 0x5F).ToArray()); + Util.AddCBWithOffset(locations, s.metGSC_00000, 00000, 0x7E, 0x7F); + return locations; + } + + private static List CreateGen3(GameStrings s) + { + var locations = Util.GetCBList(s.metRSEFRLG_00000, Enumerable.Range(0, 213).ToArray()); + Util.AddCBWithOffset(locations, s.metRSEFRLG_00000, 00000, 253, 254, 255); + return locations; + } + + private static List CreateGen3CXD(GameStrings s) + { + return Util.GetCBList(s.metCXD_00000, Enumerable.Range(0, s.metCXD_00000.Length).ToArray()).Where(c => c.Text.Length > 0).ToList(); + } + + private static List CreateGen4(GameStrings s) + { + var locations = Util.GetCBList(s.metHGSS_00000, 0); + Util.AddCBWithOffset(locations, s.metHGSS_02000, 2000, Locations.Daycare4); + Util.AddCBWithOffset(locations, s.metHGSS_02000, 2000, Locations.LinkTrade4); + Util.AddCBWithOffset(locations, s.metHGSS_03000, 3000, Locations.Ranger4); + Util.AddCBWithOffset(locations, s.metHGSS_00000, 0000, Legal.Met_HGSS_0); + Util.AddCBWithOffset(locations, s.metHGSS_02000, 2000, Legal.Met_HGSS_2); + Util.AddCBWithOffset(locations, s.metHGSS_03000, 3000, Legal.Met_HGSS_3); + return locations; + } + + private static List CreateGen5(GameStrings s) + { + var locations = Util.GetCBList(s.metBW2_00000, 0); + Util.AddCBWithOffset(locations, s.metBW2_60000, 60001, Locations.Daycare5); + Util.AddCBWithOffset(locations, s.metBW2_30000, 30001, Locations.LinkTrade5); + Util.AddCBWithOffset(locations, s.metBW2_00000, 00000, Legal.Met_BW2_0); + Util.AddCBWithOffset(locations, s.metBW2_30000, 30001, Legal.Met_BW2_3); + Util.AddCBWithOffset(locations, s.metBW2_40000, 40001, Legal.Met_BW2_4); + Util.AddCBWithOffset(locations, s.metBW2_60000, 60001, Legal.Met_BW2_6); + return locations; + } + + private static List CreateGen6(GameStrings s) + { + var locations = Util.GetCBList(s.metXY_00000, 0); + Util.AddCBWithOffset(locations, s.metXY_60000, 60001, Locations.Daycare5); + Util.AddCBWithOffset(locations, s.metXY_30000, 30001, Locations.LinkTrade6); + Util.AddCBWithOffset(locations, s.metXY_00000, 00000, Legal.Met_XY_0); + Util.AddCBWithOffset(locations, s.metXY_30000, 30001, Legal.Met_XY_3); + Util.AddCBWithOffset(locations, s.metXY_40000, 40001, Legal.Met_XY_4); + Util.AddCBWithOffset(locations, s.metXY_60000, 60001, Legal.Met_XY_6); + return locations; + } + + private static List CreateGen7(GameStrings s) + { + var locations = Util.GetCBList(s.metSM_00000, 0); + Util.AddCBWithOffset(locations, s.metSM_60000, 60001, Locations.Daycare5); + Util.AddCBWithOffset(locations, s.metSM_30000, 30001, Locations.LinkTrade6); + Util.AddCBWithOffset(locations, s.metSM_00000, 00000, Legal.Met_SM_0); + Util.AddCBWithOffset(locations, s.metSM_30000, 30001, Legal.Met_SM_3); + Util.AddCBWithOffset(locations, s.metSM_40000, 40001, Legal.Met_SM_4); + Util.AddCBWithOffset(locations, s.metSM_60000, 60001, Legal.Met_SM_6); + return locations; + } + + private static List CreateGen7GG(GameStrings s) + { + var locations = Util.GetCBList(s.metGG_00000, 0); + Util.AddCBWithOffset(locations, s.metGG_60000, 60001, 60002); + Util.AddCBWithOffset(locations, s.metGG_30000, 30001, Locations.LinkTrade6); + Util.AddCBWithOffset(locations, s.metGG_00000, 00000, Legal.Met_GG_0); + Util.AddCBWithOffset(locations, s.metGG_30000, 30001, Legal.Met_GG_3); + Util.AddCBWithOffset(locations, s.metGG_40000, 40001, Legal.Met_GG_4); + Util.AddCBWithOffset(locations, s.metGG_60000, 60001, Legal.Met_GG_6); + return locations; + } + + private static List CreateGen8(GameStrings s) + { + var locations = Util.GetCBList(s.metSWSH_00000, 0); + Util.AddCBWithOffset(locations, s.metSWSH_60000, 60001, 60002); + Util.AddCBWithOffset(locations, s.metSWSH_30000, 30001, Locations.LinkTrade6); + Util.AddCBWithOffset(locations, s.metSWSH_00000, 00000, Legal.Met_SWSH_0); + Util.AddCBWithOffset(locations, s.metSWSH_30000, 30001, Legal.Met_SWSH_3); + Util.AddCBWithOffset(locations, s.metSWSH_40000, 40001, Legal.Met_SWSH_4); + Util.AddCBWithOffset(locations, s.metSWSH_60000, 60001, Legal.Met_SWSH_6); + return locations; + } + + /// + /// Fetches a Met Location list for a that has been transferred away from and overwritten. + /// + /// Origin version + /// Current save file generation + /// True if an egg location list, false if a regular met location list + /// Met location list + public IReadOnlyList GetLocationList(GameVersion version, int currentGen, bool egg = false) + { + if (currentGen == 2) + return MetGen2; + + if (egg && version < W && currentGen >= 5) + return MetGen4; + + return version switch + { + CXD when currentGen == 3 => MetGen3CXD, + R or S when currentGen == 3 => Partition1(MetGen3, z => z is <= 87), // Ferry + E when currentGen == 3 => Partition1(MetGen3, z => z is <= 87 or >= 197 and <= 212), // Trainer Hill + FR or LG when currentGen == 3 => Partition1(MetGen3, z => z is > 87 and < 197), // Celadon Dept. + D or P when currentGen == 4 => Partition2(MetGen4, z => z is <= 111, 4), // Battle Park + Pt when currentGen == 4 => Partition2(MetGen4, z => z is <= 125, 4), // Rock Peak Ruins + HG or SS when currentGen == 4 => Partition2(MetGen4, z => z is > 125 and < 234, 4), // Celadon Dept. + + B or W => MetGen5, + B2 or W2 => Partition2(MetGen5, z => z is <= 116), // Abyssal Ruins + X or Y => Partition2(MetGen6, z => z is <= 168), // Unknown Dungeon + OR or AS => Partition2(MetGen6, z => z is > 168 and <= 354), // Secret Base + SN or MN => Partition2(MetGen7, z => z is < 200), // Outer Cape + US or UM + or RD or BU or GN or YW + or GD or SV or C => Partition2(MetGen7, z => z < 234), // Dividing Peak Tunnel + GP or GE or GO => Partition2(MetGen7GG, z => z <= 54), // Pokémon League + SW or SH => Partition2(MetGen8, z => z < 400), + _ => GetLocationListModified(version, currentGen), + }; + + static IReadOnlyList Partition1(IEnumerable list, Func criteria) + { + return list.OrderByDescending(loc => criteria(loc.Value)).ToList(); + } + + static IReadOnlyList Partition2(IReadOnlyList list, Func criteria, int keepFirst = 3) + { + return list.Take(keepFirst).Concat(list.Skip(keepFirst).OrderByDescending(loc => criteria(loc.Value))).ToList(); + } + } + + /// + /// Fetches a Met Location list for a that has been transferred away from and overwritten. + /// + /// Origin version + /// Current save file generation + /// Met location list + private IReadOnlyList GetLocationListModified(GameVersion version, int currentGen) + { + if (version <= CXD && currentGen == 4) + { + return MetGen4.Where(loc => loc.Value == Locations.Transfer3) // Pal Park to front + .Concat(MetGen4.Take(4)) + .Concat(MetGen4.Skip(4).Where(loc => loc.Value != Locations.Transfer3)).ToList(); + } + + if (version < X && currentGen >= 5) // PokéTransfer to front + { + return MetGen5.Where(loc => loc.Value == Locations.Transfer4) + .Concat(MetGen5.Take(3)) + .Concat(MetGen5.Skip(3).Where(loc => loc.Value != Locations.Transfer4)).ToList(); + } + + return Array.Empty(); + } + } +} diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen4/SAV_Misc4.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen4/SAV_Misc4.cs index ebcaa8ef9..bcfe8a80b 100644 --- a/PKHeX.WinForms/Subforms/Save Editors/Gen4/SAV_Misc4.cs +++ b/PKHeX.WinForms/Subforms/Save Editors/Gen4/SAV_Misc4.cs @@ -781,7 +781,7 @@ namespace PKHeX.WinForms private void ReadWalker(SAV4HGSS s) { - string[] walkercourses = GameInfo.Sources.Source.walkercourses; + string[] walkercourses = GameInfo.Sources.Strings.walkercourses; bool[] isChecked = s.GetPokewalkerCoursesUnlocked(); CLB_WalkerCourses.Items.Clear(); for (int i = 0; i < walkercourses.Length; i++)