Fix TIC display for NPC owned by players

This commit is contained in:
2023-09-17 20:53:13 +02:00
parent 9de2bc48b8
commit 588c6655b3
4 changed files with 31 additions and 3 deletions

View File

@@ -104,6 +104,12 @@ export class PegasusRollDialog extends Dialog {
if (armor) {
armor.applied = toggled
}
this.rollData.armorUsed = false
for(let a of this.rollData.armorsList) {
if (a.applied) {
this.rollData.armorUsed = true
}
}
console.log("Armor", armorIdx, toggled)
PegasusUtility.updateArmorDicePool(this.rollData)
}
@@ -120,6 +126,12 @@ export class PegasusRollDialog extends Dialog {
}
weapon.applied = toggled
}
this.rollData.weaponUsed = false
for(let a of this.rollData.weaponsList) {
if (a.applied) {
this.rollData.weaponUsed = true
}
}
console.log("Weapon", weaponIdx, toggled, weapon)
PegasusUtility.updateDamageDicePool(this.rollData)
}