Petit fixes de synchro + essai pour corriger message XP + roll
All checks were successful
Release Creation / build (release) Successful in 2m32s

This commit is contained in:
LeRatierBretonnien 2025-02-27 22:53:06 +01:00
parent 0009876a6d
commit 921e470498
2 changed files with 8 additions and 3 deletions

View File

@ -557,7 +557,10 @@ export class RdDActor extends RdDBaseActorSang {
return; return;
} }
fatigue = Math.max(fatigueMin, this._calculRecuperationSegment(fatigue)); fatigue = Math.max(fatigueMin, this._calculRecuperationSegment(fatigue));
await this.update({ "system.sante.fatigue.value": fatigue }); setTimeout( // On attend un peu pour que le message de récupération de r
async () => {
await this.update({ 'system.sante.fatigue.value': fatigue });
}, 200);
if (fatigue == 0) { if (fatigue == 0) {
message.content += "Vous êtes complêtement reposé. "; message.content += "Vous êtes complêtement reposé. ";
} }
@ -1800,8 +1803,10 @@ export class RdDActor extends RdDBaseActorSang {
}; };
RollDataAjustements.calcul(rollData, this); RollDataAjustements.calcul(rollData, this);
await RdDResolutionTable.rollData(rollData); await RdDResolutionTable.rollData(rollData);
this.gererExperience(rollData);
await RdDRollResult.displayRollData(rollData, this) await RdDRollResult.displayRollData(rollData, this)
this.gererExperience(rollData);
return rollData.rolled; return rollData.rolled;
} }

View File

@ -265,7 +265,7 @@ export class Misc {
const subset = elements.filter(options.preFilter) const subset = elements.filter(options.preFilter)
.filter(it => Grammar.toLowerCaseNoAccent(options.mapper(it))?.includes(value)) .filter(it => Grammar.toLowerCaseNoAccent(options.mapper(it))?.includes(value))
.sort(Misc.ascending(it => options.mapper(it))) .sort(Misc.ascending(it => options.mapper(it)))
if (subset.length == 0) { if (subset.length == 0 && options?.onMessage) {
options.onMessage(`Pas de ${options.description} correspondant à ${value}`); options.onMessage(`Pas de ${options.description} correspondant à ${value}`);
} }
return subset; return subset;