Skip to content

Commit

Permalink
skip fillers?
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam- committed Jun 20, 2024
1 parent d1bef01 commit 0b727f3
Showing 1 changed file with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
import net.runelite.api.Item;
import net.runelite.api.ItemComposition;
import net.runelite.api.ItemContainer;
import net.runelite.api.ItemID;
import net.runelite.api.MenuAction;
import net.runelite.api.NullItemID;
import net.runelite.api.ScriptEvent;
Expand Down Expand Up @@ -193,16 +194,8 @@ void layout(Layout l)
ItemComposition def = itemManager.getItemComposition(itemId);
log.debug("Layout contains {}{} with no matching item", def.getName(), def.getPlaceholderTemplateId() > -1 && def.getPlaceholderId() > -1 ? " (placeholder)" : "");

int qty = bank.count(itemId);
// if (qty == 0 && def.getPlaceholderTemplateId() > -1 && def.getPlaceholderId() > -1)
// {
// itemId = def.getPlaceholderId();
// qty = bank.count(def.getPlaceholderId());
// log.debug("Converting {} to a regular item with qty {}", def.getName(), qty);
// }

Widget c = itemContainer.getChild(pos);
drawItem(l, c, itemId, qty, pos);
drawItem(l, c, itemId, bank.count(itemId), pos);
}

int lastEmptySlot = -1;
Expand Down Expand Up @@ -256,7 +249,7 @@ void layout(Layout l)
// mostly from ~bankmain_drawitem
private void drawItem(Layout l, Widget c, int item, int qty, int idx)
{
if (item > -1)
if (item > -1 && item != ItemID.BANK_FILLER)
{
ItemComposition def = client.getItemDefinition(item);

Expand Down

0 comments on commit 0b727f3

Please sign in to comment.