diff --git a/website/common/script/libs/shops.js b/website/common/script/libs/shops.js index a278069192..662f461750 100644 --- a/website/common/script/libs/shops.js +++ b/website/common/script/libs/shops.js @@ -108,12 +108,6 @@ shops.checkMarketGearLocked = function checkMarketGearLocked (user, items) { gear.locked = true; } - if (Boolean(gear.specialClass) && Boolean(gear.set)) { - const currentSet = gear.set === seasonalShopConfig.pinnedSets[gear.specialClass]; - - gear.locked = currentSet && user.stats.class !== gear.specialClass; - } - if (gear.canOwn) { gear.locked = !gear.canOwn(user); } @@ -124,6 +118,12 @@ shops.checkMarketGearLocked = function checkMarketGearLocked (user, items) { gear.locked = true; } + if (Boolean(gear.specialClass) && Boolean(gear.set)) { + const currentSet = gear.set === seasonalShopConfig.pinnedSets[gear.specialClass]; + + gear.locked = currentSet && user.stats.class !== gear.specialClass; + } + gear.owned = itemOwned; // @TODO: I'm not sure what the logic for locking is supposed to be diff --git a/website/common/script/ops/buy/buyMarketGear.js b/website/common/script/ops/buy/buyMarketGear.js index 8c87ef6fa2..83e638360d 100644 --- a/website/common/script/ops/buy/buyMarketGear.js +++ b/website/common/script/ops/buy/buyMarketGear.js @@ -28,7 +28,7 @@ export class BuyMarketGearOperation extends AbstractGoldItemOperation { // eslin const checkSpecialClass = item.klass === 'special' && item.specialClass && item.specialClass !== user.stats.class; // check for different class gear - if (checkKlass || checkSpecialClass) { + if ((checkKlass || checkSpecialClass) && user.items.gear.owned[item.key] !== false) { throw new NotAuthorized(this.i18n('cannotBuyItem')); } }