diff --git a/module/actor.js b/module/actor.js index e3c3a5c4..181b1830 100644 --- a/module/actor.js +++ b/module/actor.js @@ -3454,13 +3454,11 @@ export class RdDActor extends Actor { } if (acheteur) { - // TODO: achat depuis un compendium - const itemData = Misc.data(vendeur?.getObjet(itemId) ?? game.items.get(itemId)); const achat = { - type: itemData.type, - img: itemData.img, - name: itemData.name, - data: itemData.data + type: venteData.item.type, + img: venteData.item.img, + name: venteData.item.name, + data: venteData.item.data } achat.data.quantite = venteData.quantiteTotal; await acheteur.createEmbeddedDocuments("Item", [achat]);