From eaaa5ad7f3214b848463c84d36c076171726fbf5 Mon Sep 17 00:00:00 2001 From: Keith Holliday Date: Fri, 17 Aug 2018 06:29:32 -0500 Subject: [PATCH] Added amoire food to user immediately (#10596) * Added amoire food to user immediately * Fixed user item set --- website/client/store/actions/shops.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/website/client/store/actions/shops.js b/website/client/store/actions/shops.js index acb2f46888..0d8359ef95 100644 --- a/website/client/store/actions/shops.js +++ b/website/client/store/actions/shops.js @@ -64,6 +64,12 @@ async function buyArmoire (store, params) { if (item.type === 'gear') { store.state.user.data.items.gear.owned[item.dropKey] = true; } + + if (item.type === 'food') { + if (!store.state.user.data.items.food[item.dropKey]) store.state.user.data.items.food[item.dropKey] = 0; + store.state.user.data.items.food[item.dropKey] += 1; + } + store.state.user.data.stats.gp -= armoire.value; // @TODO: We might need to abstract notifications to library rather than mixin