From b39b75e959bc68d54bf99392c22e85ef71273b84 Mon Sep 17 00:00:00 2001 From: Bishop Date: Sun, 8 Feb 2026 12:58:12 +0000 Subject: [PATCH] Restocking regular shop stock no longer affects player stock UI --- Server/src/main/core/game/shops/Shop.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Server/src/main/core/game/shops/Shop.kt b/Server/src/main/core/game/shops/Shop.kt index 1d041cf8a..9d8425993 100644 --- a/Server/src/main/core/game/shops/Shop.kt +++ b/Server/src/main/core/game/shops/Shop.kt @@ -62,17 +62,18 @@ class Shop(val title: String, val stock: Array, val general: Boolean = fun showTab(player: Player, main: Boolean) { - val cont = if (main) getAttribute(player, "shop-cont", null) ?: return else playerStock + val mainCont = getAttribute(player, "shop-cont", null) ?: return + val cont = if (main) mainCont else playerStock if(!main) { - cont.listeners.remove(listenerInstances[player.details.uid]) + mainCont.listeners.remove(listenerInstances[player.details.uid]) playerStock.listeners.add(listenerInstances[player.details.uid]) } else { playerStock.listeners.remove(listenerInstances[player.details.uid]) - cont.listeners.add(listenerInstances[player.details.uid]) + mainCont.listeners.add(listenerInstances[player.details.uid]) } val settings = IfaceSettingsBuilder()