From 84b406378913f58b3cdb6d2e00f21cb9688d0885 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Thu, 17 Dec 2020 11:41:34 +0100 Subject: [PATCH] Fix: ajustement astrologique pour les joueurs --- module/rdd-calendrier.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/rdd-calendrier.js b/module/rdd-calendrier.js index ee248b73..878cc357 100644 --- a/module/rdd-calendrier.js +++ b/module/rdd-calendrier.js @@ -109,13 +109,13 @@ export class RdDCalendrier extends Application { /* -------------------------------------------- */ getCurrentNombreAstral() { let index = this.getCurrentDayIndex(); - let astralData = this.listeNombreAstral.find( (nombreAstral, i) => nombreAstral.index == index ); - return astralData.nombreAstral || "N/A"; + return this.getNombreAstral(index); } /* -------------------------------------------- */ getNombreAstral( index ) { - let astralData = this.listeNombreAstral.find( (nombreAstral, i) => nombreAstral.index == index ); + const liste = this.listeNombreAstral || game.settings.get("foundryvtt-reve-de-dragon", "liste-nombre-astral") + let astralData = liste.find( (nombreAstral, i) => nombreAstral.index == index ); return astralData.nombreAstral || "N/A"; }