From a8aa1923a84d8f7866da0701f25e6a202756565e Mon Sep 17 00:00:00 2001 From: Stefan Zermatten Date: Mon, 1 Mar 2021 14:01:34 +0200 Subject: [PATCH] Fixed spells having a stray deativatedBySelf flag --- app/imports/api/creature/actions/castSpellWithSlot.js | 2 +- .../api/creature/denormalise/recomputeInactiveProperties.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/imports/api/creature/actions/castSpellWithSlot.js b/app/imports/api/creature/actions/castSpellWithSlot.js index 041008a4..06349477 100644 --- a/app/imports/api/creature/actions/castSpellWithSlot.js +++ b/app/imports/api/creature/actions/castSpellWithSlot.js @@ -65,7 +65,7 @@ const castSpellWithSlot = new ValidatedMethod({ action: spell, context: {slotLevel}, creature, - target, + targets: [target], method: this, }); // Note this only recomputes the top-level creature, not the nearest one diff --git a/app/imports/api/creature/denormalise/recomputeInactiveProperties.js b/app/imports/api/creature/denormalise/recomputeInactiveProperties.js index 891050d9..8cff24a5 100644 --- a/app/imports/api/creature/denormalise/recomputeInactiveProperties.js +++ b/app/imports/api/creature/denormalise/recomputeInactiveProperties.js @@ -60,11 +60,13 @@ export default function recomputeInactiveProperties(ancestorId){ $or: [ {inactive: true}, {deactivatedByAncestor: true}, + {deactivatedBySelf: true} ], }, { $unset: { inactive: 1, deactivatedByAncestor: 1, + deactivatedBySelf: 1, }, }, { multi: true,