* for locking items, special overrides available * fix(market): allow purchase of broken item Co-authored-by: Megan Shepherd <meg.d.shep@gmail.com> Co-authored-by: SabreCat <sabe@habitica.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user