diff --git a/src/server/components/stats.js b/src/server/components/stats.js index f6d32750..c5d589c7 100644 --- a/src/server/components/stats.js +++ b/src/server/components/stats.js @@ -438,7 +438,7 @@ module.exports = { this.obj.spellbook.die(); obj.destroyed = true; - obj.destroyedBy = 'death'; + obj.destructionEvent = 'death'; let deathAnimation = _.getDeepProperty(animations, ['mobs', obj.sheetName, obj.cell, 'death']); if (deathAnimation) { diff --git a/src/server/world/syncer.js b/src/server/world/syncer.js index 1160aed5..79ab5777 100644 --- a/src/server/world/syncer.js +++ b/src/server/world/syncer.js @@ -70,7 +70,7 @@ module.exports = { sync = { id: o.id, destroyed: true, - destroyedBy: o.destroyedBy + destructionEvent: o.destructionEvent }; objects.removeObject(o); @@ -113,8 +113,14 @@ module.exports = { } if (destroyed || !canSee) { - if (!canSee) - queueFunction({ id: oId, destroyed: true }, [ p.serverId ]); + if (!canSee) { + queueFunction({ + id: oId, + destroyed: true, + destructionEvent: 'visibility' + }, + [ p.serverId ]); + } p.player.unsee(oId); }