From 7b8ed68743e0a617d5f8cbccbae8097675490382 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 2 Dec 2023 14:32:02 +0100 Subject: Fixed minion features disappear inside the minion inventory when picking up an item. --- src/main/java/at/hannibal2/skyhanni/data/OtherInventoryData.kt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/data') diff --git a/src/main/java/at/hannibal2/skyhanni/data/OtherInventoryData.kt b/src/main/java/at/hannibal2/skyhanni/data/OtherInventoryData.kt index 5950d5fb8..921d591b2 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/OtherInventoryData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/OtherInventoryData.kt @@ -22,9 +22,9 @@ object OtherInventoryData { close() } - fun close() { + fun close(reopenSameName: Boolean = false) { currentInventory?.let { - InventoryCloseEvent(it).postAndCatch() + InventoryCloseEvent(it, reopenSameName).postAndCatch() currentInventory = null } } @@ -49,7 +49,8 @@ object OtherInventoryData { val windowId = packet.windowId val title = packet.windowTitle.unformattedText val slotCount = packet.slotCount - close() + val reopenSameName = title == currentInventory?.title + close(reopenSameName) currentInventory = Inventory(windowId, title, slotCount) acceptItems = true @@ -104,4 +105,4 @@ object OtherInventoryData { val slotCount: Int, val items: MutableMap = mutableMapOf(), ) -} \ No newline at end of file +} -- cgit