@@ -436,7 +436,9 @@ module.exports = { | |||||
obj.effects.die(); | obj.effects.die(); | ||||
if (this.obj.spellbook) | if (this.obj.spellbook) | ||||
this.obj.spellbook.die(); | this.obj.spellbook.die(); | ||||
obj.destroyed = true; | obj.destroyed = true; | ||||
obj.destroyedBy = 'death'; | |||||
let deathAnimation = _.getDeepProperty(animations, ['mobs', obj.sheetName, obj.cell, 'death']); | let deathAnimation = _.getDeepProperty(animations, ['mobs', obj.sheetName, obj.cell, 'death']); | ||||
if (deathAnimation) { | if (deathAnimation) { | ||||
@@ -59,7 +59,8 @@ module.exports = { | |||||
continue; | continue; | ||||
let destroyed = o.destroyed; | let destroyed = o.destroyed; | ||||
let destroyedBy = o.destroyedBy; | |||||
let sync = null; | let sync = null; | ||||
let syncSelf = null; | let syncSelf = null; | ||||
if (!destroyed) { | if (!destroyed) { | ||||
@@ -69,7 +70,8 @@ module.exports = { | |||||
} else { | } else { | ||||
sync = { | sync = { | ||||
id: o.id, | id: o.id, | ||||
destroyed: true | |||||
destroyed: true, | |||||
destroyedBy | |||||
}; | }; | ||||
objects.removeObject(o); | objects.removeObject(o); | ||||