From 95ea7c530e4a24e1bda4281f0f875c9aed84c1a4 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Tue, 22 Jun 2021 21:30:16 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20quantit=C3=A9=20prise=20manquante=20dans?= =?UTF-8?q?=20message?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/actor.js | 5 +++-- templates/chat-achat-item.html | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/module/actor.js b/module/actor.js index cf4a37c6..6609d976 100644 --- a/module/actor.js +++ b/module/actor.js @@ -3591,10 +3591,11 @@ export class RdDActor extends Actor { if (coutDeniers > 0) { RdDAudio.PlayContextAudio("argent"); } - + const chatAchatItem = duplicate(vente); + chatAchatItem.quantiteTotal = achat.quantiteTotal; ChatMessage.create({ whisper: ChatUtility.getWhisperRecipientsAndGMs(this.name), - content: await renderTemplate('systems/foundryvtt-reve-de-dragon/templates/chat-achat-item.html', vente) + content: await renderTemplate('systems/foundryvtt-reve-de-dragon/templates/chat-achat-item.html', chatAchatItem) }); if (!vente.quantiteIllimite) { diff --git a/templates/chat-achat-item.html b/templates/chat-achat-item.html index 8cf107f1..69ac3c2f 100644 --- a/templates/chat-achat-item.html +++ b/templates/chat-achat-item.html @@ -3,6 +3,6 @@

{{#if acheteur}}{{acheteur.name}}{{else}}L'acheteur{{/if}} a {{#if isVente}}acheté{{else}}pris{{/if}} - {{#if vendeur}}à {{vendeur.name}}{{/if}} + {{#if vendeur}}à {{vendeur.name}}{{/if}}: {{quantiteTotal}} {{item.name}} pour {{prixTotal}} sols.

\ No newline at end of file