diff --git a/module/actor.js b/module/actor.js index 00993a89..6dc88e88 100644 --- a/module/actor.js +++ b/module/actor.js @@ -2388,9 +2388,10 @@ export class RdDActor extends RdDBaseActor { /* -------------------------------------------- */ async creerTacheDepuisLivre(item, options = { renderSheet: true }) { + // TODO: déplacer vers Item pour livres const nomTache = "Lire " + item.name; - const filterTacheLecture = it => it.type == 'tache' && it.name == nomTache; - let tachesExistantes = this.filterItems(filterTacheLecture); + const filterTacheLecture = it => it.name == nomTache; + let tachesExistantes = this.filterItems(filterTacheLecture, 'tache'); if (tachesExistantes.length == 0) { const tache = { name: nomTache, type: 'tache', @@ -2406,7 +2407,7 @@ export class RdDActor extends RdDBaseActor { } } await this.createEmbeddedDocuments('Item', [tache], options); - tachesExistantes = this.filterItems(filterTacheLecture); + tachesExistantes = this.filterItems(filterTacheLecture, 'tache'); } return tachesExistantes.length > 0 ? tachesExistantes[0] : undefined; } diff --git a/module/rdd-main.js b/module/rdd-main.js index 849a7a48..73cf5d55 100644 --- a/module/rdd-main.js +++ b/module/rdd-main.js @@ -77,21 +77,21 @@ export class SystemReveDeDragon { this.RdDHotbar = RdDHotbar; this.itemClasses = { blessure: RdDItemBlessure, - service: RdDItemService, maladie: RdDItemMaladie, + ombre: RdDItemOmbre, poison: RdDItemPoison, queue: RdDItemQueue, - ombre: RdDItemOmbre, - souffle: RdDItemSouffle, + rencontre: RdDRencontre, + service: RdDItemService, signedraconique: RdDItemSigneDraconique, - rencontre: RdDRencontre + souffle: RdDItemSouffle, } this.actorClasses = { + commerce: RdDCommerce, creature: RdDActor, entite: RdDActor, personnage: RdDActor, vehicule: RdDActor, - commerce: RdDCommerce, } }