diff --git a/Server/src/main/content/global/handlers/item/SnowscapeSatchelListener.kt b/Server/src/main/content/global/handlers/item/SnowscapeSatchelListener.kt index d2eed85fc..7df3b7d74 100755 --- a/Server/src/main/content/global/handlers/item/SnowscapeSatchelListener.kt +++ b/Server/src/main/content/global/handlers/item/SnowscapeSatchelListener.kt @@ -133,7 +133,7 @@ class SnowscapeSatchelListener : InteractionListener { return satchel!! } - // Checks if the item is allowed in the satchel. The NPCDropTables.java function calls this on the Red Satchel if the player has one + // Checks if the item is allowed in the satchel. The NPCDropTables.java function calls this on satchels the player is carrying. fun isAllowed(player: Player, satchelId: Int, itemId: Int): Boolean { when (satchelId) { plainSatchelId -> return itemId !in satchelIds 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 e971313df..07a58af70 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 @@ -271,12 +271,17 @@ public final class NPCDropTables { return true; } - //Snowscape modification: loot certain items into the red satchel if carried + //Snowscape modification: loot certain items into the satchels if carried private boolean handleSatchel(Player player, Item item) { - if (inEquipmentOrInventory(player,10879,1)){ - if (SnowscapeSatchelListener.Companion.isAllowed(player,10879,item.getId()) && player.redSatchel.add(item)) { - player.sendMessage("Your red satchel stashed " + item.getAmount() + " " + item.getName() + "."); - return true; + for (int satchelId = 10877; satchelId <= 10882; satchelId++) { + if (inEquipmentOrInventory(player,satchelId,1) && SnowscapeSatchelListener.Companion.isAllowed(player,satchelId,item.getId())){ + if (satchelId == 10877 && !player.plainSatchel.contains(item.getId(),1)) { + continue; + } + if (SnowscapeSatchelListener.Companion.getSatchel(player, satchelId).add(unnote(item))) { + player.sendMessage("Your " + new Item(satchelId).getName() + " stashed " + item.getAmount() + " " + item.getName() + "."); + return true; + } } } return false;