death: notify users of broken item
This commit is contained in:
Vendored
+4
-1
@@ -11148,7 +11148,10 @@ var process=require("__browserify_process");(function() {
|
||||
if (typeof user.markModified === "function") {
|
||||
user.markModified('items.gear');
|
||||
}
|
||||
return typeof cb === "function" ? cb(null, req) : void 0;
|
||||
return typeof cb === "function" ? cb((item ? {
|
||||
code: 200,
|
||||
message: "Your " + item.text + " broke."
|
||||
} : null), req) : void 0;
|
||||
},
|
||||
hatch: function(req, cb) {
|
||||
var egg, hatchingPotion, pet, _ref;
|
||||
|
||||
+1
-1
@@ -438,7 +438,7 @@ api.wrap = (user) ->
|
||||
user.items.gear.costume[item.type] = "#{item.type}_base_0" if user.items.gear.costume[item.type] is lostItem
|
||||
user.markModified? 'items.gear'
|
||||
|
||||
cb? null, req
|
||||
cb? (if item then {code:200,message:"Your #{item.text} broke."} else null), req
|
||||
|
||||
hatch: (req, cb) ->
|
||||
{egg, hatchingPotion} = req.query
|
||||
|
||||
Reference in New Issue
Block a user