From 2ffa0d8dc71dfe7c1b95e7e6bf101bd5bba0a013 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Sat, 11 Feb 2023 01:18:05 +0100 Subject: [PATCH] =?UTF-8?q?Fix:=20utiliser=20les=20comp=C3=A9tences=20des?= =?UTF-8?q?=20humano=C3=AFdes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Utiliser les compétences de l'acteur empêchait l'édition des armes (et objets liés à une compétence) stockées sur un animal, dans un véhicule, ou dans un commerce --- module/item-sheet.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/item-sheet.js b/module/item-sheet.js index 8747e0a3..558fe8c7 100644 --- a/module/item-sheet.js +++ b/module/item-sheet.js @@ -99,7 +99,7 @@ export class RdDItemSheet extends ItemSheet { options: RdDSheetUtility.mergeDocumentRights(this.options, this.item, this.isEditable) } - const competences = await SystemCompendiums.getCompetences(this.actor?.type); + const competences = await SystemCompendiums.getCompetences('personnage'); formData.categorieCompetences = RdDItemCompetence.getCategorieCompetences() if (this.item.type == 'tache' || this.item.type == 'livre' || this.item.type == 'meditation' || this.item.type == 'oeuvre') { formData.caracList = duplicate(game.system.model.Actor.personnage.carac) @@ -107,7 +107,7 @@ export class RdDItemSheet extends ItemSheet { formData.competences = competences; } if (this.item.type == 'arme') { - formData.competences = competences.filter(it => RdDItemCompetence.isCompetenceArme(it)); + formData.competences = competences.filter(it => RdDItemCompetence.isCompetenceArme(it)) } if (['sort', 'sortreserve'].includes(this.item.type)) { formData.competences = competences.filter(it => RdDItemCompetence.isDraconic(it));