From 42ea50732a8e52f8b424cfccdaa7965d6e6b449d Mon Sep 17 00:00:00 2001 From: Purple <87976511+purplebarber@users.noreply.github.com> Date: Thu, 4 Apr 2024 23:22:43 +0400 Subject: [PATCH] Fix logic for finding generic unusual items in cart Distinguishes generics from taunt unusualifiers with a craftability check when running the !sell command.(generics are craftable while unusualifiers are not). --- src/classes/Carts/UserCart.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/classes/Carts/UserCart.ts b/src/classes/Carts/UserCart.ts index b8eabc64d..4cfead688 100644 --- a/src/classes/Carts/UserCart.ts +++ b/src/classes/Carts/UserCart.ts @@ -522,7 +522,7 @@ export default class UserCart extends Cart { let findByPartialSku = false; let elevatedStrange = false; const item_object = SKU.fromString(sku); - if (item_object.quality == 5 && !item_object.effect) { + if (item_object.quality == 5 && !item_object.effect && item_object.craftable) { log.debug('Generic Unusual in their cart, finding by partial sku'); findByPartialSku = true; if (item_object.quality2 == 11) { @@ -767,7 +767,7 @@ export default class UserCart extends Cart { const item_object = SKU.fromString(sku); let findByPartialSku = false; let elevatedStrange = false; - if (item_object.quality == 5 && !item_object.effect) { + if (item_object.quality == 5 && !item_object.effect && item_object.craftable) { findByPartialSku = true; if (item_object.quality2 == 11) { elevatedStrange = true;