Skip to content

Commit c76e9f5

Browse files
committed
Exclude trade protected items from inventory count
1 parent a6074d4 commit c76e9f5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/components/table.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,17 +220,17 @@ export default class Table {
220220
// Build Footer Elements
221221

222222
if (this.#mode === Table.MODE.RETRIEVE) {
223-
this.#selectionLimit = Constant.INVENTORY_ITEM_LIMIT - inventory.items.length;
223+
this.#selectionLimit = Constant.INVENTORY_ITEM_LIMIT - inventory.items.filter(x => typeof x.attributes["trade protected escrow date"] === "undefined").length;
224224
} else {
225225
this.#selectionLimit = Constant.STORAGE_UNIT_ITEM_LIMIT - inventory.storedItems.filter(x => x.casket_id == this.#casket.iteminfo.id).length;
226226
}
227227

228228
const onStatusUpdate = (status) => {
229-
if (this.#mode !== Table.MODE.RETRIEVE || typeof status.Plugin?.InventorySize === "undefined") {
229+
if (this.#mode !== Table.MODE.RETRIEVE || typeof status.Plugin?.UnprotectedInventorySize === "undefined") {
230230
return;
231231
}
232232

233-
this.#selectionLimit = Constant.INVENTORY_ITEM_LIMIT - status.Plugin.InventorySize;
233+
this.#selectionLimit = Constant.INVENTORY_ITEM_LIMIT - status.Plugin.UnprotectedInventorySize;
234234
this.#UpdateFooter();
235235
};
236236

0 commit comments

Comments
 (0)