Version 12.0.16 - Le secret d'Astrobazzarh #718
@ -327,7 +327,8 @@ export class Mapping {
|
|||||||
const txtByCategories = Object.values(byCategories)
|
const txtByCategories = Object.values(byCategories)
|
||||||
.map(it => it.competencesParNiveau)
|
.map(it => it.competencesParNiveau)
|
||||||
.map(byNiveau => {
|
.map(byNiveau => {
|
||||||
const niveaux = Object.keys(byNiveau).map(it => Number(it)).sort(Misc.ascending())
|
const niveaux = Object.keys(byNiveau)
|
||||||
|
.map(it => Number(it)).sort(Misc.ascending())
|
||||||
if (niveaux.length == 0) {
|
if (niveaux.length == 0) {
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
|
@ -190,7 +190,7 @@ export class RdDItemCompetence extends Item {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static isNiveauBase(item) {
|
static isNiveauBase(item) {
|
||||||
return Number(item.system.niveau) == RdDItemCompetence.getNiveauBase(item.system.categorie, item.type);
|
return item.system.niveau == undefined || Number(item.system.niveau) == RdDItemCompetence.getNiveauBase(item.system.categorie, item.type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
@ -267,10 +267,17 @@ export class RdDItemSheet extends ItemSheet {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
/** @override */
|
/** @override */
|
||||||
_updateObject(event, formData) {
|
_updateObject(event, formData) {
|
||||||
if (this.item.type == 'sort') {
|
switch (this.item.type) {
|
||||||
// Données de bonus de cases ?
|
case ITEM_TYPES.sort:
|
||||||
formData['system.bonuscase'] = RdDItemSort.buildBonuscaseFromArrays(formData.bonusValue, formData.caseValue);
|
// Données de bonus de cases ?
|
||||||
|
formData['system.bonuscase'] = RdDItemSort.buildBonuscaseFromArrays(formData.bonusValue, formData.caseValue)
|
||||||
|
break
|
||||||
|
case ITEM_TYPES.competence:
|
||||||
|
if (formData['system.niveau'] == undefined) {
|
||||||
|
formData['system.niveau'] = formData['system.base']
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.item.update(formData);
|
return this.item.update(formData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user