forked from 2009Scape/Server
Fixed a bug that could cause item loss when depositing to a near-maxed bank stack
This commit is contained in:
parent
f124e27f33
commit
cb753f2a12
1 changed files with 3 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue