Skip to content

Commit

Permalink
hotfix(processor): EVENT_OBJECT_DESTROYED room event
Browse files Browse the repository at this point in the history
DEV-488
  • Loading branch information
o4kapuk authored and artch committed Dec 28, 2019
1 parent d7b2c47 commit d53b19d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/processor/intents/_damage.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ module.exports = function(object, target, damage, attackType, scope) {

require('./structures/_destroy')(target, scope, attackType);

eventLog.push({event: C.EVENT_OBJECT_DESTROYED, objectId: target._id, type: object.type});
eventLog.push({event: C.EVENT_OBJECT_DESTROYED, objectId: target._id, data: { type: target.type }});
}
}
else {
Expand Down
2 changes: 1 addition & 1 deletion src/processor/intents/creeps/_die.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ module.exports = function(object, dropRate, violentDeath, {roomObjects, bulk, st
bulk.insert(tombstone);
}

eventLog.push({event: C.EVENT_OBJECT_DESTROYED, objectId: object._id, type: 'creep'});
eventLog.push({event: C.EVENT_OBJECT_DESTROYED, objectId: object._id, data: { type: 'creep' }});

if (violentDeath && stats && object.user != '3' && object.user != '2') {
stats.inc('creepsLost', object.user, object.body.length);
Expand Down

0 comments on commit d53b19d

Please sign in to comment.