Fixed spells having a stray deativatedBySelf flag

This commit is contained in:
Stefan Zermatten
2021-03-01 14:01:34 +02:00
parent 57fa162c89
commit a8aa1923a8
2 changed files with 3 additions and 1 deletions

View File

@@ -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

View File

@@ -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,