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
This commit is contained in:
Travis 2016-09-13 06:15:11 -07:00 committed by Blade Barringer
parent f20a7b851f
commit 282822def6
2 changed files with 3 additions and 5 deletions

View file

@ -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,

View file

@ -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',