Skip to content

Commit b465995

Browse files
authored
Merge pull request #339 from SchauweM/bugfix/bank-withdraw-crash
Fixed issue where the server would crash when withdrawing multiple items
2 parents 4cd35be + 38ad912 commit b465995

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/plugins/objects/bank/bank.plugin.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,7 @@ export const withdrawItem: itemInteractionActionHandler = (details) => {
170170
amount: removeFromContainer(playerBank, details.itemId, countToRemove)
171171
};
172172

173-
for (let i = 0; i < itemToAdd.amount; i++) {
174-
playerInventory.add({ itemId: itemIdToAdd, amount: 1 });
175-
}
173+
playerInventory.add({ itemId: itemToAdd.itemId, amount: itemToAdd.amount });
176174

177175
updateBankingInterface(details.player);
178176
};

0 commit comments

Comments
 (0)