From abb7daebba749ecffc85dae61e2537d0eb5fdc83 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Fri, 11 Nov 2016 18:36:20 -0800 Subject: [PATCH] Add missing Gen VII locations, better duplicate handling --- PKHeX/Game/GameInfo.cs | 2 ++ PKHeX/Legality/Tables7.cs | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/PKHeX/Game/GameInfo.cs b/PKHeX/Game/GameInfo.cs index 3e4c14df5..5c10f2e4a 100644 --- a/PKHeX/Game/GameInfo.cs +++ b/PKHeX/Game/GameInfo.cs @@ -207,6 +207,8 @@ private void Sanitize() var nextLoc = metSM_00000[i + 1]; if (!string.IsNullOrWhiteSpace(nextLoc) && nextLoc[0] != '[') metSM_00000_good[i] += $" ({nextLoc})"; + if (i > 0 && !string.IsNullOrWhiteSpace(metSM_00000_good[i]) && metSM_00000_good.Take(i - 1).Contains(metSM_00000_good[i])) + metSM_00000_good[i] += $" ({metSM_00000_good.Take(i - 1).Count(s => s == metSM_00000_good[i]) + 1})"; } metSM_00000_good.CopyTo(metSM_00000, 0); diff --git a/PKHeX/Legality/Tables7.cs b/PKHeX/Legality/Tables7.cs index 66e554e4e..445581693 100644 --- a/PKHeX/Legality/Tables7.cs +++ b/PKHeX/Legality/Tables7.cs @@ -13,10 +13,10 @@ public static partial class Legal internal static readonly int[] Met_SM_0 = { - 006, 008, 010, 012, 014, 016, 018, 020, 022, 024, 026, 028, 030, 034, 036, 038, 040, 042, 044, 046, 048, - 050, 052, 054, 056, 058, 060, 062, 064, 068, 070, 072, 074, 076, 078, 082, 084, 086, 088, 090, 092, 094, - 100, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, - 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 192 + 006, 008, 010, 012, 014, 016, 018, 020, 022, 024, 026, 028, 030, 032, 034, 036, 038, 040, 042, 044, 046, 048, + 050, 052, 054, 056, 058, 060, 062, 064, 066, 068, 070, 072, 074, 076, 078, 082, 084, 086, 088, 090, 092, 094, + 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, + 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190, 192 }; internal static readonly int[] Met_SM_3 =