mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-15 21:57:22 +01:00
[WIP] Make saddles not sellable
This commit is contained in:
@@ -43,6 +43,10 @@ module.exports = function sell (user, req = {}) {
|
||||
throw new NotFound(i18n.t('userItemsNotEnough', {type}, req.language));
|
||||
}
|
||||
|
||||
if (content[type][key].sellWarningNote) {
|
||||
throw new NotAuthorized(i18n.t('positiveAmountRequired', req.language));
|
||||
}
|
||||
|
||||
user.items[type][key] -= amount;
|
||||
if (user.markModified) user.markModified(`items.${type}`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user