diff --git a/Server/src/main/content/global/handlers/item/SnowscapeSatchelListener.kt b/Server/src/main/content/global/handlers/item/SnowscapeSatchelListener.kt index 5dde40e25..d2eed85fc 100755 --- a/Server/src/main/content/global/handlers/item/SnowscapeSatchelListener.kt +++ b/Server/src/main/content/global/handlers/item/SnowscapeSatchelListener.kt @@ -44,7 +44,7 @@ class SnowscapeSatchelListener : InteractionListener { private fun transferItem(player: Player, satchelId: Int, item: Item, amount: Int, withdraw: Boolean, asNote: Boolean = false) { - if (withdraw == false && !isAllowed(satchelId, unnote(item).getId())) { + if (withdraw == false && !isAllowed(player, satchelId, unnote(item).getId())) { player.sendMessage(item.getName() + " cannot be stored in the " + Item(satchelId).getName() + ".") return } @@ -134,14 +134,14 @@ class SnowscapeSatchelListener : InteractionListener { } // Checks if the item is allowed in the satchel. The NPCDropTables.java function calls this on the Red Satchel if the player has one - fun isAllowed(satchelId: Int, itemId: Int): Boolean { + fun isAllowed(player: Player, satchelId: Int, itemId: Int): Boolean { when (satchelId) { plainSatchelId -> return itemId !in satchelIds greenSatchelId -> return (Item(itemId).getName().contains(" seed") || Item(itemId).getName().contains("Grimy") || Item(itemId).getName().contains("Clean ")) - redSatchelId -> return itemId in intArrayOf(12158,12159,12160,12161,12162,12163,12164,12165,12166,12167,12168) + redSatchelId -> return itemId in intArrayOf(12158,12159,12160,12161,12162,12163,12164,12165,12166,12167,12168) || Item(itemId).getName().equals("Clue scroll") blackSatchelId -> return itemId in intArrayOf(995) goldSatchelId -> return itemId in intArrayOf(436,438,440,442,444,446,447,449,451,453,668,2892) - runeSatchelId -> return itemId in intArrayOf(558,559,564,562,9075,561,563,560,565,566) + runeSatchelId -> return itemId in intArrayOf(558,559,564,562,9075,561,563,560,565,566) || (getAttribute(player,"snowscape:boostedmode",false) && itemId in intArrayOf(556,555,557,554,4694,4695,4696,4697,4698,4699)) } return false } diff --git a/Server/src/main/core/game/node/entity/npc/drop/NPCDropTables.java b/Server/src/main/core/game/node/entity/npc/drop/NPCDropTables.java index 216f15638..e971313df 100644 --- a/Server/src/main/core/game/node/entity/npc/drop/NPCDropTables.java +++ b/Server/src/main/core/game/node/entity/npc/drop/NPCDropTables.java @@ -274,7 +274,7 @@ public final class NPCDropTables { //Snowscape modification: loot certain items into the red satchel if carried private boolean handleSatchel(Player player, Item item) { if (inEquipmentOrInventory(player,10879,1)){ - if (SnowscapeSatchelListener.Companion.isAllowed(10879,item.getId()) && player.redSatchel.add(item)) { + if (SnowscapeSatchelListener.Companion.isAllowed(player,10879,item.getId()) && player.redSatchel.add(item)) { player.sendMessage("Your red satchel stashed " + item.getAmount() + " " + item.getName() + "."); return true; }