diff --git a/source/module/actors/M5Character.ts b/source/module/actors/M5Character.ts index beb7fc7..61d05fe 100644 --- a/source/module/actors/M5Character.ts +++ b/source/module/actors/M5Character.ts @@ -288,19 +288,19 @@ export class M5Character extends Actor { label += "*"; } if (item.system.valuable) { - ret.stats.wealth += this.calculateValue(item.system.value, item.system.currency); + ret.stats.wealth += parseFloat((this.calculateValue(item.system.value, item.system.currency) * (item.system.quantity)).toPrecision(3)); } if (item.system.hoarded) { - ret.stats.hoard += item.system.value || 0; + ret.stats.hoard += parseFloat((this.calculateValue(item.system.value, item.system.currency) * (item.system.quantity)).toPrecision(3)); } - + if (!!item.system.containerId) { - ret.gear.containers[item.system.containerId].weight += item.system.weight; + ret.gear.containers[item.system.containerId].weight += parseFloat((item.system.weight * item.system.quantity).toPrecision(3)); if (ret.gear.containers[item.system.containerId].equipped) { - ret.stats.encumbrance += item.system.weight; + ret.stats.encumbrance += parseFloat((item.system.weight * item.system.quantity).toPrecision(3)); } } else if (item.system.equipped) { - ret.stats.encumbrance += item.system.weight || 0; + ret.stats.encumbrance += parseFloat(((item.system.weight || 0) * (item.system.quantity)).toPrecision(3)); } let icon = item.img;