mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-04 01:29: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 item = resData.armoire;
|
||||||
|
|
||||||
const isExperience = item.type === 'experience';
|
const isExperience = item.type === 'experience';
|
||||||
|
|
||||||
if (item.type === 'gear') {
|
if (item.type === 'gear') {
|
||||||
store.state.user.data.items.gear.owned[item.dropKey] = true;
|
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
|
// @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', {
|
store.dispatch('snackbars:add', {
|
||||||
title: '',
|
title: '',
|
||||||
text: isExperience ? item.value : item.dropText,
|
text: isExperience ? item.value : item.dropText,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue