Skip to content

Commit

Permalink
Merge pull request #339 from SchauweM/bugfix/bank-withdraw-crash
Browse files Browse the repository at this point in the history
Fixed issue where the server would crash when withdrawing multiple items
  • Loading branch information
Tynarus authored Aug 8, 2021
2 parents 4cd35be + 38ad912 commit b465995
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 b465995

Please sign in to comment.