From 73b8128af992dcdd6b088519f72e267d83483564 Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Thu, 22 May 2014 23:22:53 +0200 Subject: [PATCH] fix(accessories): add body accessory to user model, fixes https://github.com/HabitRPG/habitrpg/issues/3346 --- dist/habitrpg-shared.js | 3 +++ script/index.coffee | 1 + 2 files changed, 4 insertions(+) diff --git a/dist/habitrpg-shared.js b/dist/habitrpg-shared.js index 0fe57ea30d..12a2575ddb 100644 --- a/dist/habitrpg-shared.js +++ b/dist/habitrpg-shared.js @@ -12977,6 +12977,9 @@ api.wrap = function(user, main) { message = user.fns.handleTwoHanded(item, type, req); } } + if (typeof user.markModified === "function") { + user.markModified("items.gear." + type); + } return typeof cb === "function" ? cb((message ? { code: 200, message: message diff --git a/script/index.coffee b/script/index.coffee index 28b8c30b6c..2c2f74f23c 100644 --- a/script/index.coffee +++ b/script/index.coffee @@ -653,6 +653,7 @@ api.wrap = (user, main=true) -> else user.items.gear[type][item.type] = item.key message = user.fns.handleTwoHanded(item,type,req) + user.markModified? "items.gear.#{type}" cb? (if message then {code:200,message} else null), user.items hatch: (req, cb) ->