From 810e1b7c5303e01eff1a9b631476f8a71680f478 Mon Sep 17 00:00:00 2001 From: John Downey Date: Sat, 9 Apr 2022 19:54:34 -0500 Subject: [PATCH] Fix treasure calculations --- src/module/actor/entity.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/module/actor/entity.js b/src/module/actor/entity.js index 1071af4..d2ebbfb 100644 --- a/src/module/actor/entity.js +++ b/src/module/actor/entity.js @@ -705,10 +705,10 @@ export class AcksActor extends Actor { // Compute treasure let total = 0; let treasure = this.data.items.filter( - (i) => i.type == "item" && i.data.treasure + (i) => i.data.type == "item" && i.data.data.treasure ); treasure.forEach((item) => { - total += item.data.quantity.value * item.data.cost + total += item.data.data.quantity.value * item.data.data.cost }); data.treasure = total; }