Fix /astro avec ou sans accents

This commit is contained in:
Vincent Vandemeulebrouck
2021-01-26 19:47:18 +01:00
parent 99183be4cb
commit 8db6313574
4 changed files with 20 additions and 7 deletions

View File

@ -4,6 +4,7 @@ import { RdDAstrologieEditeur } from "./rdd-astrologie-editeur.js";
import { HtmlUtility } from "./html-utility.js";
import { RdDResolutionTable } from "./rdd-resolution-table.js";
import { RdDUtility } from "./rdd-utility.js";
import { Grammar } from "./grammar.js";
/* -------------------------------------------- */
const dossierIconesHeures = 'systems/foundryvtt-reve-de-dragon/icons/heures/'
@ -274,8 +275,9 @@ export class RdDCalendrier extends Application {
/* -------------------------------------------- */
getAjustementAstrologique(heureNaissance, name='inconnu')
{
if (heureNaissance && heuresDef[heureNaissance]) {
let hn = heuresDef[heureNaissance].heure;
let heure = Grammar.toLowerCaseNoAccent(heureNaissance);
if (heure && heuresDef[heure]) {
let hn = heuresDef[heure].heure;
let chiffreAstral = this.getCurrentNombreAstral();
let heureCourante = this.calendrier.heureRdD;
let ecartChance = (hn + chiffreAstral - heureCourante)%12;