From 38ad9123b6da071b8b57dc55da9c65c28048deab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Schauwers?= Date: Sun, 8 Aug 2021 18:48:08 +0200 Subject: [PATCH] Fixed issue where the server would crash when withdrawing multiple items --- src/plugins/objects/bank/bank.plugin.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/plugins/objects/bank/bank.plugin.ts b/src/plugins/objects/bank/bank.plugin.ts index 2afc96771..34432164c 100644 --- a/src/plugins/objects/bank/bank.plugin.ts +++ b/src/plugins/objects/bank/bank.plugin.ts @@ -170,9 +170,7 @@ export const withdrawItem: itemInteractionActionHandler = (details) => { amount: removeFromContainer(playerBank, details.itemId, countToRemove) }; - for (let i = 0; i < itemToAdd.amount; i++) { - playerInventory.add({ itemId: itemIdToAdd, amount: 1 }); - } + playerInventory.add({ itemId: itemToAdd.itemId, amount: itemToAdd.amount }); updateBankingInterface(details.player); };