diff --git a/PKHeX.Core/PKM/Shared/G6PKM.cs b/PKHeX.Core/PKM/Shared/G6PKM.cs index 746db594c..9f2022c1a 100644 --- a/PKHeX.Core/PKM/Shared/G6PKM.cs +++ b/PKHeX.Core/PKM/Shared/G6PKM.cs @@ -110,7 +110,7 @@ public void Trade(ITrainerInfo tr, int Day = 1, int Month = 1, int Year = 2015) protected abstract bool TradeOT(ITrainerInfo tr); protected abstract void TradeHT(ITrainerInfo tr); - + // Maximums public sealed override int MaxIV => 31; public sealed override int MaxEV => 252; diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen3/SAV_Misc3.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen3/SAV_Misc3.cs index 2cbb7dda6..bc7f741f3 100644 --- a/PKHeX.WinForms/Subforms/Save Editors/Gen3/SAV_Misc3.cs +++ b/PKHeX.WinForms/Subforms/Save Editors/Gen3/SAV_Misc3.cs @@ -128,7 +128,7 @@ private void B_GetTickets_Click(object sender, EventArgs e) var p = Pouches.FirstOrDefault(z => z.Type == InventoryType.KeyItems); if (p == null) - throw new ArgumentOutOfRangeException(nameof(InventoryPouch.Type)); + throw new ArgumentException(nameof(InventoryPouch.Type)); // check for missing tickets var missing = tickets.Where(z => !p.Items.Any(item => item.Index == z && item.Count == 1)).ToList(); diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_PokedexSWSH.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_PokedexSWSH.cs index 0df84d2e4..c46edd94d 100644 --- a/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_PokedexSWSH.cs +++ b/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_PokedexSWSH.cs @@ -65,9 +65,7 @@ private void ChangeCBSpecies(object sender, EventArgs e) return; var species = WinFormsUtil.GetIndex(CB_Species); - if (!Dex.DexLookup.TryGetValue(species, out var info)) - throw new ArgumentOutOfRangeException(nameof(species)); - + var info = Dex.DexLookup[species]; var index = info.AbsoluteIndex - 1; if (LB_Species.SelectedIndex != index) LB_Species.SelectedIndex = index; // trigger event