Added amoire food to user immediately (#10596)

* Added amoire food to user immediately

* Fixed user item set
This commit is contained in:
Keith Holliday 2018-08-17 06:29:32 -05:00 committed by GitHub
parent 54468ff499
commit eaaa5ad7f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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