Skip to content

Commit

Permalink
every current season gear is purchased by gold - prevent buyModal on …
Browse files Browse the repository at this point in the history
…locked items
  • Loading branch information
negue committed Sep 15, 2017
1 parent 99d981c commit aebb9ed
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 3 additions & 1 deletion website/client/components/shops/seasonal/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,9 @@
}
},
itemSelected (item) {
this.$root.$emit('buyModal::showItem', item);
if (!item.locked) {
this.$root.$emit('buyModal::showItem', item);
}
},
},
};
Expand Down
6 changes: 5 additions & 1 deletion website/client/components/shops/shopItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,16 @@ div
.item-wrapper {
z-index: 10;
cursor: pointer;
}
.item {
min-height: 106px;
}
.item:not(.locked) {
cursor: pointer;
}
.item.item-empty {
border-radius: 2px;
background-color: #f9f9f9;
Expand Down Expand Up @@ -232,6 +235,7 @@ div
'item-empty': this.emptyItem,
'highlight-border': this.highlightBorder,
suggested: this.item.isSuggested,
locked: this.item.locked,
};
},
},
Expand Down
6 changes: 2 additions & 4 deletions website/common/script/libs/shops.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,10 +366,8 @@ shops.getSeasonalGearBySet = function getSeasonalGearBySet (user, set, officialP
}).map(gear => {
let currentSet = gear.set === seasonalShopConfig.pinnedSets[gear.specialClass];

// only the current season set for the user's class can be purchased by gold
let goldPurchase = currentSet && user.stats.class === gear.specialClass;

let itemInfo = getItemInfo(null, goldPurchase ? 'marketGear' : 'gear', gear, officialPinnedItems, language);
// only the current season set can be purchased by gold
let itemInfo = getItemInfo(null, currentSet ? 'marketGear' : 'gear', gear, officialPinnedItems, language);
itemInfo.locked = currentSet && user.stats.class !== gear.specialClass;

return itemInfo;
Expand Down

0 comments on commit aebb9ed

Please sign in to comment.