Fixed a bug that could cause item loss when depositing to a near-maxed bank stack
This commit is contained in:
@@ -231,8 +231,9 @@ public final class BankContainer extends Container {
|
||||
|
||||
int maxCount = super.getMaximumAdd(add);
|
||||
if (amount > maxCount) {
|
||||
amount = maxCount;
|
||||
if (amount < 1) {
|
||||
add.setAmount(maxCount);
|
||||
item.setAmount(maxCount);
|
||||
if (maxCount < 1) {
|
||||
player.getPacketDispatch().sendMessage("There is not enough space left in your bank.");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user