From 9defd9b01b3c733c2e423f32e92c748d70765c87 Mon Sep 17 00:00:00 2001 From: mat Date: Wed, 18 May 2022 15:35:31 +0000 Subject: split pets into their own auction items --- src/cleaners/skyblock/inventory.ts | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/cleaners/skyblock/inventory.ts') diff --git a/src/cleaners/skyblock/inventory.ts b/src/cleaners/skyblock/inventory.ts index df30be3..b5c85e2 100644 --- a/src/cleaners/skyblock/inventory.ts +++ b/src/cleaners/skyblock/inventory.ts @@ -21,6 +21,9 @@ export interface Item { anvilUses?: number timestamp?: string enchantments?: { [name: string]: number } + petInfo?: { + id: string + } headTexture?: string } @@ -54,6 +57,7 @@ function cleanItem(rawItem): Item | null { headId = headIdFromBase64(headDataBase64) } + return { id: extraAttributes?.id ?? null, count: itemCount ?? 1, @@ -70,6 +74,9 @@ function cleanItem(rawItem): Item | null { enchantments: extraAttributes?.enchantments, anvilUses: extraAttributes?.anvil_uses, timestamp: extraAttributes?.timestamp, + petInfo: extraAttributes?.petInfo ? { + id: JSON.parse(extraAttributes.petInfo).type + } : undefined, headTexture: headId, } -- cgit