Skip to content

Commit

Permalink
Fix logic for finding generic unusual items in cart
Browse files Browse the repository at this point in the history
Distinguishes generics from taunt unusualifiers with a craftability check when running the !sell command.(generics are craftable while unusualifiers are not).
  • Loading branch information
purplebarber committed Apr 4, 2024
1 parent dbab3b6 commit 42ea507
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/classes/Carts/UserCart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 42ea507

Please sign in to comment.