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