diff --git a/website/client/store/actions/shops.js b/website/client/store/actions/shops.js index ac668ff13b..8a7acbe4ea 100644 --- a/website/client/store/actions/shops.js +++ b/website/client/store/actions/shops.js @@ -1,5 +1,6 @@ import axios from 'axios'; import buyOp from 'common/script/ops/buy'; +import content from 'common/script/content/index'; import purchaseOp from 'common/script/ops/purchaseWithSpell'; import hourglassPurchaseOp from 'common/script/ops/hourglassPurchase'; import sellOp from 'common/script/ops/sell'; @@ -38,21 +39,14 @@ export function buyQuestItem (store, params) { async function buyArmoire (store, params) { const quantity = params.quantity || 1; + let armoire = content.armoire; - let buyResult = buyOp(store.state.user.data, { - params: { - key: 'armoire', - }, - type: 'armoire', - quantity, - }); - - // We need the server result because armoir has random item in the result + // We need the server result because Armoire has random item in the result let result = await axios.post('/api/v3/user/buy/armoire', { type: 'armoire', quantity, }); - buyResult = result.data.data; + let buyResult = result.data.data; if (buyResult) { const resData = buyResult; @@ -65,6 +59,14 @@ async function buyArmoire (store, params) { } // @TODO: We might need to abstract notifications to library rather than mixin + store.dispatch('snackbars:add', { + title: '', + text: `- ${armoire.value}`, + type: 'gp', + icon: '', + sign: '-', + timeout: true, + }); store.dispatch('snackbars:add', { title: '', text: isExperience ? item.value : item.dropText,