From 201b4551a3d29f50d5ec9e98e965141e2ce82f91 Mon Sep 17 00:00:00 2001 From: Gurkirpal Date: Wed, 11 Sep 2019 19:32:51 +0530 Subject: [PATCH] Check food is Saddle before selling --- website/common/script/ops/sell.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/common/script/ops/sell.js b/website/common/script/ops/sell.js index 2973c79499..69e132da37 100644 --- a/website/common/script/ops/sell.js +++ b/website/common/script/ops/sell.js @@ -43,8 +43,8 @@ module.exports = function sell (user, req = {}) { throw new NotFound(i18n.t('userItemsNotEnough', {type}, req.language)); } - if (content[type][key].sellWarningNote) { - throw new NotAuthorized(content[type][key].sellWarningNote()); + if (type === 'food' && key === 'Saddle') { + throw new NotAuthorized(content[type][key].sellWarningNote(req.language)); } user.items[type][key] -= amount;