diff --git a/PKHeX.Core/Game/GameStrings/GameInfo.cs b/PKHeX.Core/Game/GameStrings/GameInfo.cs index 561ae39ee..f6b0a91e1 100644 --- a/PKHeX.Core/Game/GameStrings/GameInfo.cs +++ b/PKHeX.Core/Game/GameStrings/GameInfo.cs @@ -94,57 +94,77 @@ private static IReadOnlyList GetLocationNames(int gen, int bankID, GameV case 2: return Strings.metGSC_00000; case 3: return version == GameVersion.CXD ? Strings.metCXD_00000 : Strings.metRSEFRLG_00000; - case 4: - switch (bankID) - { - case 0: return Strings.metHGSS_00000; - case 2: return Strings.metHGSS_02000; - case 3: return Strings.metHGSS_03000; - default: return null; - } - case 5: - switch (bankID) - { - case 0: return Strings.metBW2_00000; - case 3: return Strings.metBW2_30000; - case 4: return Strings.metBW2_40000; - case 6: return Strings.metBW2_60000; - default: return null; - } - case 6: - switch (bankID) - { - case 0: return Strings.metXY_00000; - case 3: return Strings.metXY_30000; - case 4: return Strings.metXY_40000; - case 6: return Strings.metXY_60000; - default: return null; - } + case 4: return GetLocationNames4(bankID); + case 5: return GetLocationNames5(bankID); + case 6: return GetLocationNames6(bankID); case 7: if (GameVersion.GG.Contains(version)) - { - switch (bankID) - { - case 0: return Strings.metGG_00000; - case 3: return Strings.metGG_30000; - case 4: return Strings.metGG_40000; - case 6: return Strings.metGG_60000; - default: return null; - } - } - switch (bankID) - { - case 0: return Strings.metSM_00000; - case 3: return Strings.metSM_30000; - case 4: return Strings.metSM_40000; - case 6: return Strings.metSM_60000; - default: return null; - } + return GetLocationNames7GG(bankID); + return GetLocationNames7(bankID); default: return null; } } + private static IReadOnlyList GetLocationNames4(int bankID) + { + switch (bankID) + { + case 0: return Strings.metHGSS_00000; + case 2: return Strings.metHGSS_02000; + case 3: return Strings.metHGSS_03000; + default: return null; + } + } + + private static IReadOnlyList GetLocationNames5(int bankID) + { + switch (bankID) + { + case 0: return Strings.metBW2_00000; + case 3: return Strings.metBW2_30000; + case 4: return Strings.metBW2_40000; + case 6: return Strings.metBW2_60000; + default: return null; + } + } + + private static IReadOnlyList GetLocationNames6(int bankID) + { + switch (bankID) + { + case 0: return Strings.metXY_00000; + case 3: return Strings.metXY_30000; + case 4: return Strings.metXY_40000; + case 6: return Strings.metXY_60000; + default: return null; + } + } + + private static IReadOnlyList GetLocationNames7(int bankID) + { + switch (bankID) + { + case 0: return Strings.metSM_00000; + case 3: return Strings.metSM_30000; + case 4: return Strings.metSM_40000; + case 6: return Strings.metSM_60000; + default: return null; + } + } + + private static IReadOnlyList GetLocationNames7GG(int bankID) + { + switch (bankID) + { + case 0: return Strings.metGG_00000; + case 3: return Strings.metGG_30000; + case 4: return Strings.metGG_40000; + case 6: return Strings.metGG_60000; + default: return null; + } + } + /// /// Gets the location name for the specified parameters. ///