From fa060a06a1b7ad9d1545e9f24fe5cec03e34af5e Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Mon, 14 Jun 2021 23:41:46 +0200 Subject: [PATCH 1/4] =?UTF-8?q?fix:=20ne=20pas=20afficher=20qu'on=20re?= =?UTF-8?q?=C3=A7oit=200=20deniers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/actor.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/module/actor.js b/module/actor.js index f62ad86c..4d3012bb 100644 --- a/module/actor.js +++ b/module/actor.js @@ -3495,13 +3495,17 @@ export class RdDActor extends Actor { } async ajouterDeniers(gain, fromActorId = undefined) { + gain = Number.parseInt(gain); + if (gain == 0){ + return; + } if (fromActorId && !game.user.isGM) { RdDActor.remoteActorCall({ userId: Misc.connectedGMOrUser(), actorId: this.id, method: 'ajouterDeniers', args: [gain, fromActorId] }); } else { const fromActor = game.actors.get(fromActorId) let fortune = this.getFortune(); - fortune += Number(gain); + fortune += gain; await this.optimizeArgent(fortune); RdDAudio.PlayContextAudio("argent"); // Petit son From c36b32e5e8d10a120e05f77f73fef3a7adcaf109 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Mon, 14 Jun 2021 23:42:24 +0200 Subject: [PATCH 2/4] Fix: suppression du message si qty=0 --- module/actor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/actor.js b/module/actor.js index 4d3012bb..d30d2b72 100644 --- a/module/actor.js +++ b/module/actor.js @@ -3594,7 +3594,7 @@ export class RdDActor extends Actor { if (!vente.quantiteIllimite) { if (vente.quantiteNbLots <= achat.nombreLots) { - ChatUtility.removeChatMessageId(chatMessageIdVente); + ChatUtility.removeChatMessageId(achat.chatMessageIdVente); } else { vente["properties"] = new RdDItem(vente.item).getProprietes(); From b19bc68d22da052d4aa99442a04417445277450e Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Mon, 14 Jun 2021 23:46:57 +0200 Subject: [PATCH 3/4] Fix: Bouton prendre/acheter selon prix --- templates/chat-vente-item.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/chat-vente-item.html b/templates/chat-vente-item.html index 04ef2f24..c4774436 100644 --- a/templates/chat-vente-item.html +++ b/templates/chat-vente-item.html @@ -17,7 +17,7 @@ {{#if (gt tailleLot 1)}} Lots de: {{tailleLot}}
{{/if}} - {{#if prixLot}} + {{#if (ne prixLot 0)}} Prix {{#if (gt tailleLot 1)}}du lot {{else}}unitaire{{/if}}: {{prixLot}} Sols
{{/if}} @@ -31,6 +31,6 @@ data-quantiteNbLots="{{quantiteNbLots}}" data-quantiteIllimite="{{#if quantiteIllimite}}true{{else}}false{{/if}}" data-prixLot="{{prixLot}}"> - {{#if prixLot}}Acheter{{else}}Prendre{{/if}} + {{#if (eq prixLot 0)}}Prendre{{else}}Acheter{{/if}} From 93f8cfa4529b54da39c1e9b5ccd456885d07fb7c Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Mon, 14 Jun 2021 23:47:40 +0200 Subject: [PATCH 4/4] Version 1.4.33 --- system.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system.json b/system.json index 137f7ff0..7811de3c 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": "1.4.32", + "version": "1.4.33", "manifestPlusVersion": "1.0.0", "minimumCoreVersion": "0.8.0", "compatibleCoreVersion": "0.8.99",