mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2026-08-01 14:39:13 -06:00
Restocking regular shop stock no longer affects player stock UI
This commit is contained in:
parent
f2e8e64cf6
commit
b39b75e959
1 changed files with 4 additions and 3 deletions
|
|
@ -62,17 +62,18 @@ class Shop(val title: String, val stock: Array<ShopItem>, val general: Boolean =
|
|||
|
||||
fun showTab(player: Player, main: Boolean)
|
||||
{
|
||||
val cont = if (main) getAttribute<Container?>(player, "shop-cont", null) ?: return else playerStock
|
||||
val mainCont = getAttribute<Container?>(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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue