From df5954bf7518460066d122bde0642715e5b16da5 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Wed, 9 Dec 2020 00:00:59 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20ref=C3=A9rence=20circulaire?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit La méthode rollData fait le jet fourni dans rollData et l'ajoute dans rollData.rolled. Pas besoin de retourner rollData, la tentation est forte de mettre le résultat dans "rolled" --- module/actor.js | 2 +- module/rdd-resolution-table.js | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/module/actor.js b/module/actor.js index 9d7fade3..d2419f50 100644 --- a/module/actor.js +++ b/module/actor.js @@ -142,7 +142,7 @@ export class RdDActor extends Actor { /* -------------------------------------------- */ async performRoll(rollData, attacker = undefined) { // garder le résultat - rollData.rolled = await RdDResolutionTable.rollData(rollData); + await RdDResolutionTable.rollData(rollData); //console.log("performRoll", rollData) if ( !rollData.attackerRoll) {// Store in the registry if not a defense roll diff --git a/module/rdd-resolution-table.js b/module/rdd-resolution-table.js index 534667f3..66f3a8f6 100644 --- a/module/rdd-resolution-table.js +++ b/module/rdd-resolution-table.js @@ -100,7 +100,6 @@ export class RdDResolutionTable { /* -------------------------------------------- */ static async rollData(rollData ) { rollData.rolled = await this.roll(rollData.caracValue, rollData.finalLevel, rollData.bonus); - return rollData; } /* -------------------------------------------- */