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);
|
int maxCount = super.getMaximumAdd(add);
|
||||||
if (amount > maxCount) {
|
if (amount > maxCount) {
|
||||||
amount = maxCount;
|
add.setAmount(maxCount);
|
||||||
if (amount < 1) {
|
item.setAmount(maxCount);
|
||||||
|
if (maxCount < 1) {
|
||||||
player.getPacketDispatch().sendMessage("There is not enough space left in your bank.");
|
player.getPacketDispatch().sendMessage("There is not enough space left in your bank.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user