Various fixes

This commit is contained in:
2022-04-30 23:42:55 +02:00
parent f64928858c
commit 5214b036d3
11 changed files with 96 additions and 98 deletions

View File

@ -37,13 +37,13 @@ export class RdDItemArme extends Item {
static computeNiveauArmes(armes, competences) {
for (const arme of armes) {
arme.data.niveau = RdDItemArme.niveauCompetenceArme(arme, competences);
arme.system.niveau = RdDItemArme.niveauCompetenceArme(arme, competences)
}
}
static niveauCompetenceArme(arme, competences) {
const compArme = competences.find(it => it.name == arme.data.competence);
return compArme?.data.niveau ?? -8;
const compArme = competences.find(it => it.name == arme.system.competence);
return compArme?.system.niveau ?? -8;
}
/* -------------------------------------------- */