[WIP] shops + market gear api (#8980)

* lock other classes gear

* fix avatar in equip-gear-modal

* fix seasonal shop

* seasonal : new gear type order

* fix pin gear (and get new gear on buying)

* API: /shops/market-gear  - refactoring pinnedGearUtils - move _isPinned to common/libs

* use shops.getMarketGearCategories to list the marketGear

* use shops.getMarketCategories instead of API-call

* mark gear reward items as locked

* purchase time-travelers stuff + update view + use method instead of http-api + add missing mammoth shop image

* Time Travelers Shop: open/closed state

* time travelers: show gear preview + hide sidebar if closed

* update resized images

* fix lint
This commit is contained in:
negue
2017-08-24 07:16:18 +02:00
committed by GitHub
parent 7b7f5c09fd
commit 2624b06729
35 changed files with 324 additions and 134 deletions

View File

@@ -3,6 +3,8 @@ import content from '../content/index';
import { BadRequest } from './errors';
import count from '../count';
import isPinned from './isPinned';
import _mapValues from 'lodash/mapValues';
function lockQuest (quest, user) {
@@ -37,6 +39,7 @@ function getDefaultGearProps (item, language) {
int: item.int,
per: item.per,
con: item.con,
klass: item.klass,
};
}
@@ -264,6 +267,7 @@ module.exports = function getItemInfo (user, type, item, language = 'en') {
if (itemInfo) {
itemInfo.isSuggested = isItemSuggested(itemInfo);
itemInfo.pinned = isPinned(user, itemInfo);
} else {
throw new BadRequest(i18n.t('wrongItemType', {type}, language));
}