Fix: absence d'heure de naissance
Quand on n'a opas d'heure de naissance, on a toujours 0 d'ajustement astrologique
This commit is contained in:
@ -264,19 +264,24 @@ export class RdDCalendrier extends Application {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getAjustementAstrologique(heureNaissance)
|
||||
getAjustementAstrologique(heureNaissance, name='inconnu')
|
||||
{
|
||||
let hn = heuresDef[heureNaissance].heure;
|
||||
let chiffreAstral = this.getCurrentNombreAstral();
|
||||
let heureCourante = this.calendrier.heureRdD;
|
||||
let ecartChance = (hn + chiffreAstral - heureCourante)%12;
|
||||
console.log("ajustementAstrologique", heureNaissance, hn, chiffreAstral, heureCourante, ecartChance);
|
||||
switch (ecartChance)
|
||||
{
|
||||
case 0: return 4;
|
||||
case 4: case 8: return 2;
|
||||
case 6: return -4;
|
||||
case 3: case 9: return -2;
|
||||
if (heureNaissance && heuresDef[heureNaissance]) {
|
||||
let hn = heuresDef[heureNaissance].heure;
|
||||
let chiffreAstral = this.getCurrentNombreAstral();
|
||||
let heureCourante = this.calendrier.heureRdD;
|
||||
let ecartChance = (hn + chiffreAstral - heureCourante)%12;
|
||||
console.log("ajustementAstrologique", heureNaissance, hn, chiffreAstral, heureCourante, ecartChance);
|
||||
switch (ecartChance)
|
||||
{
|
||||
case 0: return 4;
|
||||
case 4: case 8: return 2;
|
||||
case 6: return -4;
|
||||
case 3: case 9: return -2;
|
||||
}
|
||||
}
|
||||
else {
|
||||
ui.notifications.warn(, this.data.name + " n'a pas d'heure de naissance, ou elle est incorrecte");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user