Achat fonctionne quel que soit l'Item
This commit is contained in:
parent
bb8b56f534
commit
fd964690e0
@ -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]);
|
||||
|
Loading…
Reference in New Issue
Block a user