From 46df3d9f110928cbcba4c708331f22e5f397fc97 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Thu, 5 Jan 2023 14:32:35 +0100 Subject: [PATCH 1/3] Fix: regression sur les ventes --- module/actor/base-actor.js | 2 +- module/actor/commerce.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module/actor/base-actor.js b/module/actor/base-actor.js index b62ac03d..5740b70f 100644 --- a/module/actor/base-actor.js +++ b/module/actor/base-actor.js @@ -310,7 +310,7 @@ export class RdDBaseActor extends Actor { async decrementerQuantiteItem(item, quantite, options = { supprimerSiZero: true }) { - if (itemVendu.isService()) { + if (item.isService()) { return; } let resteQuantite = (item.system.quantite ?? 1) - quantite; diff --git a/module/actor/commerce.js b/module/actor/commerce.js index 0288dd99..fffc6535 100644 --- a/module/actor/commerce.js +++ b/module/actor/commerce.js @@ -39,11 +39,11 @@ export class RdDCommerce extends RdDBaseActor { // ne pas consommer pour un commerce } - async decrementerQuantiteItem(itemVendu, quantite) { + async decrementerQuantiteItem(item, quantite) { if (this.system.illimite) { return; } - await super.decrementerQuantiteItem(itemVendu, quantite, { supprimerSiZero: false }); + await super.decrementerQuantiteItem(item, quantite, { supprimerSiZero: false }); } calculerPrix(item) { From 5ab6c5989e686db193fee50402f6c826c6d22fac Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Thu, 5 Jan 2023 14:36:01 +0100 Subject: [PATCH 2/3] Fix: name unique pour tabulations --- templates/actor/commerce-inventaire-item.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/actor/commerce-inventaire-item.html b/templates/actor/commerce-inventaire-item.html index 831e7440..5190fbeb 100644 --- a/templates/actor/commerce-inventaire-item.html +++ b/templates/actor/commerce-inventaire-item.html @@ -20,7 +20,7 @@ {{/if}} {{#if options.isOwner}} @@ -31,7 +31,7 @@ {{#unless (and (eq item.type 'conteneur') (not vide))}} Date: Thu, 5 Jan 2023 14:44:38 +0100 Subject: [PATCH 3/3] Version 10.4.9 --- system.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system.json b/system.json index c13e5c5b..1422c70e 100644 --- a/system.json +++ b/system.json @@ -1,8 +1,8 @@ { "id": "foundryvtt-reve-de-dragon", "title": "RĂªve de Dragon", - "version": "10.4.8", - "download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-10.4.8.zip", + "version": "10.4.9", + "download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-10.4.9.zip", "manifest": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/v10/system.json", "compatibility": { "minimum": "10",