foundryvtt-wh4-lang-fr-fr/scripts/ezGqDoC9hNRBnFTB.js

7 lines
363 B
JavaScript

let choices = await Promise.all([warhammer.utility.findItemId("1zaqojk0Oq1m8vYv"), warhammer.utility.findItemId("zIuarD5mB0EF0ji0")])
let items = await game.wfrp4e.apps.ItemDialog.create(choices, 1, "Choisissez a Weapon")
items = items.map(i => i.toObject())
items.forEach(i => i.system.equipped.value = true);
this.actor.createEmbeddedDocuments("Item", items);