From 46401e5d6398c67d253aadcdd60a499b47bb2c51 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Tue, 11 Jul 2023 02:35:12 +0200 Subject: [PATCH] Cleanup: simplification _computeFinalLevel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit méthode supprimée dasn RdDRoll (car basée sur les ajustements), pas utile ici non plus. --- module/rdd-roll-resolution-table.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/module/rdd-roll-resolution-table.js b/module/rdd-roll-resolution-table.js index fcb456f9..9155af00 100644 --- a/module/rdd-roll-resolution-table.js +++ b/module/rdd-roll-resolution-table.js @@ -112,7 +112,7 @@ export class RdDRollResolutionTable extends Dialog { async updateRollResult() { let rollData = this.rollData; rollData.caracValue = parseInt(rollData.selectedCarac.value) - rollData.finalLevel = this._computeFinalLevel(rollData); + rollData.finalLevel = Misc.toInt(rollData.diffConditions) + Misc.toInt(rollData.diffLibre); const htmlTable = await RdDResolutionTable.buildHTMLTable({ carac: rollData.caracValue, @@ -129,12 +129,6 @@ export class RdDRollResolutionTable extends Dialog { } /* -------------------------------------------- */ - _computeFinalLevel(rollData) { - const diffConditions = Misc.toInt(rollData.diffConditions); - const diffLibre = Misc.toInt(rollData.diffLibre); - - return diffLibre + diffConditions; - } async close() { await super.close();