Minor clean

This commit is contained in:
Kurt
2021-08-22 00:05:41 -07:00
parent 92d1666970
commit 5b42dc8ae4
3 changed files with 3 additions and 5 deletions

View File

@@ -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;

View File

@@ -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();

View File

@@ -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