Skip to content

Commit

Permalink
Fixed issue where the server would crash when withdrawing multiple items
Browse files Browse the repository at this point in the history
  • Loading branch information
SchauweM committed Aug 8, 2021
1 parent 4cd35be commit 38ad912
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/plugins/objects/bank/bank.plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
Expand Down

0 comments on commit 38ad912

Please sign in to comment.