From 282822def6ceec8e357d5683575df383ccdf9697 Mon Sep 17 00:00:00 2001 From: Travis Date: Tue, 13 Sep 2016 06:15:11 -0700 Subject: [PATCH] Don't show items in the seasonal shop that can't be purchased (#7859) * making an api chnage so the seasonal shop will only return items that the user has never owned instead of all items the user doesn't currently own * fixing commit so shop doesn't show already owned items * recommenting out seasonal shop message as it's currently closed --- common/script/libs/shops.js | 2 +- website/views/options/inventory/seasonal-shop.jade | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/common/script/libs/shops.js b/common/script/libs/shops.js index a4fc7905fd..836032bc08 100644 --- a/common/script/libs/shops.js +++ b/common/script/libs/shops.js @@ -231,7 +231,7 @@ shops.getSeasonalShopCategories = function getSeasonalShopCategories (user, lang if (gear.index !== key) { return false; } - return user.items.gear.owned[gear.key] !== true; + return user.items.gear.owned[gear.key] === undefined; }).where({index: key}).map(gear => { return { key: gear.key, diff --git a/website/views/options/inventory/seasonal-shop.jade b/website/views/options/inventory/seasonal-shop.jade index f8b9e320d1..7faf8ff168 100644 --- a/website/views/options/inventory/seasonal-shop.jade +++ b/website/views/options/inventory/seasonal-shop.jade @@ -8,7 +8,7 @@ p(ng-if='!env.worldDmg.seasonalShop')!=env.t('seasonalShopClosedText') p(ng-if='env.worldDmg.seasonalShop')!=env.t('seasonalShopClosedText') - .well(ng-if='User.user.achievements.rebirths > 0')=env.t('seasonalShopRebirth') + // .well=env.t('seasonalShopRebirth') // li.customize-menu.inventory-gear menu.pets-menu(label=env.t('seasonalItems')) @@ -22,9 +22,7 @@ p {{::Content.spells.special.seafoam.value}} span(class='shop_gold') menu.pets-menu(label='{{category.text}}', ng-repeat='category in seasonalShopCategories') - div(ng-repeat='item in category.items', - ng-class="{transparent: user.items.gear.owned[item.key] !== undefined}", - ng-if='!user.items.gear.owned[item.key]') + div(ng-repeat='item in category.items', ng-if='!user.items.gear.owned[item.key]') button.customize-option(class='shop_{{item.key}}', popover='{{item.notes}}', popover-title='{{item.text}}', popover-trigger='mouseenter', popover-placement='right',