Fixed talisman bag wiping out all of it's contents
This commit is contained in:
@@ -80,6 +80,10 @@ object TalismanBag {
|
||||
setSlot(row, column, slot({ player, menu ->
|
||||
val bagSize = player.bagSize
|
||||
|
||||
if (menu.talismanBag[player].isEmpty()) {
|
||||
menu.talismanBag[player] = player.profile.read(key).map { Items.lookup(it).item }
|
||||
}
|
||||
|
||||
val index = MenuUtils.rowColumnToSlot(row, column)
|
||||
|
||||
if (index >= bagSize) {
|
||||
@@ -98,10 +102,6 @@ object TalismanBag {
|
||||
}
|
||||
}
|
||||
|
||||
onOpen { player, menu ->
|
||||
menu.talismanBag[player] = player.profile.read(key).map { Items.lookup(it).item }
|
||||
}
|
||||
|
||||
onRender { player, menu ->
|
||||
val items = menu.getCaptiveItems(player)
|
||||
.filterNot { EmptyTestableItem().matches(it) }
|
||||
|
||||
Reference in New Issue
Block a user