From d136199433e561adb11071254d6a24f4cd2e366a Mon Sep 17 00:00:00 2001 From: Melledy <121644117+Melledy@users.noreply.github.com> Date: Tue, 6 Feb 2024 23:32:34 -0800 Subject: [PATCH] Fix issue with mail not giving out items after a relog --- src/main/java/emu/lunarcore/game/inventory/Inventory.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/emu/lunarcore/game/inventory/Inventory.java b/src/main/java/emu/lunarcore/game/inventory/Inventory.java index 9b3e2b236..61e06b44a 100644 --- a/src/main/java/emu/lunarcore/game/inventory/Inventory.java +++ b/src/main/java/emu/lunarcore/game/inventory/Inventory.java @@ -117,6 +117,12 @@ public boolean addItem(ItemExcel itemExcel, int count) { } public boolean addItem(GameItem item) { + // Set excel in case its missing + if (item.getExcel() == null) { + item.setExcel(GameData.getItemExcelMap().get(item.getItemId())); + } + + // Put item into inventory GameItem result = putItem(item); if (result != null) {