aboutsummaryrefslogtreecommitdiff
path: root/src/cleaners/skyblock/inventory.ts
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2021-02-14 12:03:01 -0600
committermat <27899617+mat-1@users.noreply.github.com>2021-02-14 12:03:01 -0600
commita12f0eaf3349160282bdc9f48cf9f253a154e500 (patch)
tree4d4ca3578c99ae802df0821bf8c0903799b59a9e /src/cleaners/skyblock/inventory.ts
parentd3c4b954545eae9869f6347e1b6edc580210bfcd (diff)
downloadskyblock-api-a12f0eaf3349160282bdc9f48cf9f253a154e500.tar.gz
skyblock-api-a12f0eaf3349160282bdc9f48cf9f253a154e500.tar.bz2
skyblock-api-a12f0eaf3349160282bdc9f48cf9f253a154e500.zip
add visited zones
Diffstat (limited to 'src/cleaners/skyblock/inventory.ts')
-rw-r--r--src/cleaners/skyblock/inventory.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cleaners/skyblock/inventory.ts b/src/cleaners/skyblock/inventory.ts
index 1b49e95..96cd629 100644
--- a/src/cleaners/skyblock/inventory.ts
+++ b/src/cleaners/skyblock/inventory.ts
@@ -27,7 +27,9 @@ interface Item {
export type Inventory = Item[]
function cleanItem(rawItem): Item {
- const vanillaId: number = rawItem.id
+ // if the item doesn't have an id, it isn't an item
+ if (rawItem.id === undefined) return null
+ const vanillaId: number = rawItem.id && -1
const itemCount = rawItem.Count
const damageValue = rawItem.Damage
const itemTag = rawItem.tag