Ajouter compteurs success/echec pour les points de tache #215

This commit is contained in:
sladecraven 2021-10-30 10:31:10 +02:00
parent e7c4be9e19
commit 4318af5495

View File

@ -347,10 +347,10 @@ export class RdDActorSheet extends ActorSheet {
html.find('.arme-label a').click(async event => {
let armeName = event.currentTarget.text;
let compName = event.currentTarget.attributes['data-competence-name'].value;
let arme = this.actor.data.find(it =>
let arme = this.actor.data.items.find(it =>
it.name == armeName &&
RdDItemArme.isArme(it) &&
((compName ?? it.data.competence) == it.data.competence)
((compName || it.data.data.competence) == it.data.data.competence)
);
if (!arme) {
arme = { name: armeName, data: { competence: compName } };