From 941a8fa13e02863ddf8ec9b29066593081ef27fb Mon Sep 17 00:00:00 2001 From: Kurt Date: Sun, 28 May 2023 02:01:36 -0700 Subject: [PATCH] Update SAV_Inventory.cs Closes #3892 --- PKHeX.WinForms/Subforms/Save Editors/SAV_Inventory.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/PKHeX.WinForms/Subforms/Save Editors/SAV_Inventory.cs b/PKHeX.WinForms/Subforms/Save Editors/SAV_Inventory.cs index 6f0e6c514..727db30b3 100644 --- a/PKHeX.WinForms/Subforms/Save Editors/SAV_Inventory.cs +++ b/PKHeX.WinForms/Subforms/Save Editors/SAV_Inventory.cs @@ -197,9 +197,13 @@ private void SetBags() private void GetBag(DataGridView dgv, InventoryPouch pouch) { + var valid = pouch.GetAllItems(); for (int i = 0; i < dgv.Rows.Count; i++) { var item = pouch.Items[i]; + if (item.Index != 0 && !valid.Contains((ushort)item.Index) && !Main.HaX) + item = pouch.Items[i] = pouch.GetEmpty(); + var cells = dgv.Rows[i].Cells; cells[ColumnItem].Value = itemlist[item.Index]; cells[ColumnCount].Value = item.Count;