Gestion des signes draconiques #455
@ -623,11 +623,10 @@ export class RdDActorSheet extends ActorSheet {
|
||||
}
|
||||
|
||||
async _onSplitItem(item, split) {
|
||||
const itemData = Misc.data(item);
|
||||
if (split >= 1 && split < itemData.data.quantite) {
|
||||
if (split >= 1 && split < Misc.data(item).data.quantite) {
|
||||
await item.diminuerQuantite(split);
|
||||
const itemData = duplicate( Misc.data(item));
|
||||
itemData.data.quantite = split;
|
||||
itemData.id = undefined;
|
||||
await this.actor.createEmbeddedDocuments('Item', [itemData])
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user