From bdc2d8db3aa06386e42913711988193b875a910a Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Thu, 19 Jan 2023 01:48:35 +0100 Subject: [PATCH] Fix blocage du round MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Les ActiveEffect n'ont pas de system, et causaint une exception dans la méthode de passage de fin de round --- module/actor.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/module/actor.js b/module/actor.js index db382a10..450f9591 100644 --- a/module/actor.js +++ b/module/actor.js @@ -859,7 +859,7 @@ export class RdDActor extends RdDBaseActor { return undefined } const path = getPath(fieldName); - if (path){ + if (path) { await this.updateEmbeddedDocuments('Item', [{ _id: competence.id, [path]: value }]); // updates one EmbeddedEntity } } @@ -1284,12 +1284,7 @@ export class RdDActor extends RdDBaseActor { async finDeRound(options = { terminer: false }) { for (let effect of this.getEffects()) { if (effect.duration.type !== 'none' && (effect.duration.remaining <= 0 || options.terminer)) { - if (effect.system.origin) { - await effect.update({ 'disabled': true }); - } - else { - await effect.delete(); - } + await effect.delete(); ChatMessage.create({ content: `${this.name} n'est plus ${Misc.lowerFirst(game.i18n.localize(effect.system.label))} !` }); } }