mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-14 18:22:21 +00:00
Made user pay for amoire locally (#9673)
This commit is contained in:
parent
2f956252ab
commit
c02aadfac4
1 changed files with 1 additions and 9 deletions
|
|
@ -53,20 +53,12 @@ async function buyArmoire (store, params) {
|
|||
const item = resData.armoire;
|
||||
|
||||
const isExperience = item.type === 'experience';
|
||||
|
||||
if (item.type === 'gear') {
|
||||
store.state.user.data.items.gear.owned[item.dropKey] = true;
|
||||
}
|
||||
store.state.user.data.stats.gp -= armoire.value;
|
||||
|
||||
// @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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue