HotFix nicht öffenbare Charaktere

Changes:
 + Currency hat bei (fast) allen Items gefehlt weswegen das Charakterblatt nicht mehr öffenbar war, nachdem man Wert und Currency eingetragen hat.
 + Beachte Menge für Vermögensrechnung
 + Hort rechnung beachtet jetzt Currency
This commit is contained in:
Byroks 2024-02-05 13:29:29 +01:00
parent 26b2bddc2d
commit 24426bb248
1 changed files with 11 additions and 8 deletions

View File

@ -178,10 +178,10 @@ export class M5Character extends Actor {
label += "*"; label += "*";
} }
if (item.system.valuable) { if (item.system.valuable) {
ret.stats.wealth += this.calculateValue(item.system.value, item.system.currency); ret.stats.wealth += this.calculateValue(item.system.value * item.system.quantity, item.system.currency);
} }
if (item.system.hoarded) { if (item.system.hoarded) {
ret.stats.hoard += item.system.value || 0; ret.stats.hoard += this.calculateValue(item.system.value * item.system.quantity, item.system.currency);
} }
let icon = item.img; let icon = item.img;
@ -303,10 +303,10 @@ export class M5Character extends Actor {
")"; ")";
} }
if (item.system.valuable) { if (item.system.valuable) {
ret.stats.wealth += this.calculateValue(item.system.value, item.system.currency); ret.stats.wealth += this.calculateValue(item.system.value * item.system.quantity, item.system.currency);
} }
if (item.system.hoarded) { if (item.system.hoarded) {
ret.stats.hoard += item.system.value || 0; ret.stats.hoard += this.calculateValue(item.system.value * item.system.quantity, item.system.currency);
} }
ret.gear.weapons[item.id] = { ret.gear.weapons[item.id] = {
@ -316,6 +316,7 @@ export class M5Character extends Actor {
valuable: item.system?.valuable, valuable: item.system?.valuable,
hoarded: item.system?.hoarded, hoarded: item.system?.hoarded,
value: item.system.value || 0, value: item.system.value || 0,
currency: item.system.currency || "",
calc: item.system.calc, calc: item.system.calc,
special: item.system.special, special: item.system.special,
damageBase: item.system.damageBase, damageBase: item.system.damageBase,
@ -336,10 +337,10 @@ export class M5Character extends Actor {
label += "*(" + (item.system.stats.defenseBonus < 0 ? "" : "+") + item.system.stats.defenseBonus + ")"; label += "*(" + (item.system.stats.defenseBonus < 0 ? "" : "+") + item.system.stats.defenseBonus + ")";
} }
if (item.system.valuable) { if (item.system.valuable) {
ret.stats.wealth += this.calculateValue(item.system.value, item.system.currency); ret.stats.wealth += this.calculateValue(item.system.value * item.system.quantity, item.system.currency);
} }
if (item.system.hoarded) { if (item.system.hoarded) {
ret.stats.hoard += item.system.value || 0; ret.stats.hoard += this.calculateValue(item.system.value * item.system.quantity, item.system.currency);
} }
ret.gear.defensiveWeapons[item.id] = { ret.gear.defensiveWeapons[item.id] = {
@ -349,6 +350,7 @@ export class M5Character extends Actor {
valuable: item.system?.valuable, valuable: item.system?.valuable,
hoarded: item.system?.hoarded, hoarded: item.system?.hoarded,
value: item.system.value || 0, value: item.system.value || 0,
currency: item.system.currency || "",
defenseBonus: item.system.stats.defenseBonus, defenseBonus: item.system.stats.defenseBonus,
calc: item.system.calc, calc: item.system.calc,
equipped: item.system?.equipped, equipped: item.system?.equipped,
@ -368,10 +370,10 @@ export class M5Character extends Actor {
label += "*"; label += "*";
} }
if (item.system.valuable) { if (item.system.valuable) {
ret.stats.wealth += this.calculateValue(item.system.value, item.system.currency); ret.stats.wealth += this.calculateValue(item.system.value * item.system.quantity, item.system.currency);
} }
if (item.system.hoarded) { if (item.system.hoarded) {
ret.stats.hoard += item.system.value || 0; ret.stats.hoard += this.calculateValue(item.system.value * item.system.quantity, item.system.currency);
} }
ret.gear.armor[item.id] = { ret.gear.armor[item.id] = {
@ -380,6 +382,7 @@ export class M5Character extends Actor {
valuable: item.system?.valuable, valuable: item.system?.valuable,
hoarded: item.system?.hoarded, hoarded: item.system?.hoarded,
value: item.system.value || 0, value: item.system.value || 0,
currency: item.system.currency || "",
lpProtection: item.system.lpProtection, lpProtection: item.system.lpProtection,
calc: item.system.calc, calc: item.system.calc,
equipped: item.system?.equipped, equipped: item.system?.equipped,