mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-09 16:45:44 -07:00
Improved bank updates, likely fix for bank UI delay
This commit is contained in:
parent
97b8ed19a6
commit
5abe50430d
1 changed files with 5 additions and 2 deletions
|
|
@ -2,6 +2,7 @@ package core.game.container.impl;
|
|||
|
||||
import core.api.IfaceSettingsBuilder;
|
||||
import core.game.container.access.InterfaceContainer;
|
||||
import kotlin.Unit;
|
||||
import kotlin.ranges.IntRange;
|
||||
import org.rs09.consts.Vars;
|
||||
import core.ServerConstants;
|
||||
|
|
@ -238,7 +239,7 @@ public final class BankContainer extends Container {
|
|||
}
|
||||
}
|
||||
|
||||
if (player.getInventory().remove(item, slot, true)) {
|
||||
if (player.getInventory().remove(item, slot, false)) {
|
||||
int preferredSlot = -1;
|
||||
if (tabIndex != 0 && tabIndex != 10 && !super.contains(add.getId(), 1)) {
|
||||
preferredSlot = tabStartSlot[tabIndex] + getItemsInTab(tabIndex);
|
||||
|
|
@ -246,6 +247,7 @@ public final class BankContainer extends Container {
|
|||
increaseTabStartSlots(tabIndex);
|
||||
}
|
||||
super.add(add, true, preferredSlot);
|
||||
player.getInventory().update();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -283,13 +285,14 @@ public final class BankContainer extends Container {
|
|||
add = item;
|
||||
}
|
||||
if (super.remove(item, slot, false)) {
|
||||
player.getInventory().add(add);
|
||||
player.getInventory().add(add, false);
|
||||
}
|
||||
if (get(slot) == null) {
|
||||
int tabId = getTabByItemSlot(slot);
|
||||
decreaseTabStartSlots(tabId);
|
||||
shift();
|
||||
} else update();
|
||||
player.getInventory().update();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue