diff --git a/module/actor-sheet.js b/module/actor-sheet.js index ad2f2a3d..24a1efd9 100644 --- a/module/actor-sheet.js +++ b/module/actor-sheet.js @@ -142,7 +142,7 @@ export class RdDActorSheet extends ActorSheet { if (objet) { objet.estContenu = true; // Permet de filtrer ce qui est porté dans le template this.objetVersConteneur[id] = conteneur._id; - conteneur.encTotal += objet.data.encombrement; + conteneur.encTotal += objet.data.encombrement * ((objet.data.quantite)?objet.data.quantite:1); conteneur.subItems.push( objet ); } } diff --git a/module/actor.js b/module/actor.js index 12ffc4f1..b56850ef 100644 --- a/module/actor.js +++ b/module/actor.js @@ -589,7 +589,7 @@ export class RdDActor extends Actor { let totalEnc = 0; for (const item of this.data.items) { if ( item.data && item.data.encombrement ) { // Enc value filtering - totalEnc += Number(item.data.encombrement); + totalEnc += Number(item.data.encombrement) * Number(((item.data.quantite)?item.data.quantite:1)); } } this.encombrementTotal = totalEnc; diff --git a/system.json b/system.json index 044fb1d5..a3ac5878 100644 --- a/system.json +++ b/system.json @@ -2,7 +2,7 @@ "name": "foundryvtt-reve-de-dragon", "title": "Rêve de Dragon", "description": "Rêve de Dragon RPG for FoundryVTT", - "version": "0.9.54", + "version": "0.9.55", "minimumCoreVersion": "0.7.5", "compatibleCoreVersion": "0.7.6", "templateVersion": 46, diff --git a/templates/actor-inventaire-conteneur.html b/templates/actor-inventaire-conteneur.html index 6e924503..b85a3e1f 100644 --- a/templates/actor-inventaire-conteneur.html +++ b/templates/actor-inventaire-conteneur.html @@ -1,6 +1,9 @@