mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-18 20:04:38 +00:00
Added amoire food to user immediately (#10596)
* Added amoire food to user immediately * Fixed user item set
This commit is contained in:
parent
54468ff499
commit
eaaa5ad7f3
1 changed files with 6 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue