Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix logic for finding generic unusual items in cart #1712

Merged
merged 1 commit into from
Apr 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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).
  • Loading branch information
purplebarber committed Apr 4, 2024
commit 42ea50732a8e52f8b424cfccdaa7965d6e6b449d
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
Loading