From fd964690e07d5db5b7e5925e006612064db01d93 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Thu, 20 May 2021 21:53:54 +0200 Subject: [PATCH] Achat fonctionne quel que soit l'Item --- module/actor.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) 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]);