Fix: ajustement astrologique pour les joueurs

This commit is contained in:
Vincent Vandemeulebrouck 2020-12-17 11:41:34 +01:00
parent 6c503ce528
commit 84b4063789

View File

@ -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";
}