From f15a3f2762282af573f506ddb265e22cce3a6128 Mon Sep 17 00:00:00 2001 From: 0dr Date: Wed, 31 Jul 2024 16:51:17 +0200 Subject: [PATCH 1/2] fix #13140 by adding missing try catch and variable --- Splittermond/Sheet.html | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/Splittermond/Sheet.html b/Splittermond/Sheet.html index 5274da784de..853a84d2a21 100644 --- a/Splittermond/Sheet.html +++ b/Splittermond/Sheet.html @@ -7788,27 +7788,29 @@

21.10.2021

getAttrs(["repeating_nahkampfwaffen_" + currentID +"_waffenname", "repeating_nahkampfwaffen_" + currentID +"_waffenskill", "repeating_nahkampfwaffen_" + currentID +"_waffenattr1", "repeating_nahkampfwaffen_" + currentID +"_waffenattr2"], async function(v) { - let lol = await Promise.all([baseAttr, nhkAttr, nhkMastery]); + + let promiseAwait = await Promise.all([baseAttr, nhkAttr, nhkMastery]); //debugger; Promise.allSettled() - [baseAttr, nhkAttr, nhkMastery] = lol; + [baseAttr, nhkAttr, nhkMastery] = promiseAwait; var name = v["repeating_nahkampfwaffen_" + currentID +"_waffenname"]; + var skill = v["repeating_nahkampfwaffen_" + currentID +"_waffenskill"]; var attr1 = v["repeating_nahkampfwaffen_" + currentID +"_waffenattr1"]; var attr2 = v["repeating_nahkampfwaffen_" + currentID +"_waffenattr2"]; var update = {}; - - - - - let index = nhkMastery[skill].names.findIndex(word => ~name.split(" ").indexOf(word)); - - temp4 = (index>=0) ? nhkMastery[skill].values[index] : 0; - - + var index = 0; + + + try { + index = nhkMastery[skill].names.findIndex(word => ~name.split(" ").indexOf(word)); + temp4 = (index>=0) ? nhkMastery[skill].values[index] : 0; + } catch (e) { + + } + - switch (skill) { case "hiebwaffen": temp1 = +nhkAttr.hiebwaffenpunkte + +nhkAttr.hiebwaffenbonus; @@ -7914,7 +7916,10 @@

21.10.2021

let attrmod = 0; getAttrs(["repeating_fernkampfwaffen_" + currentID +"_waffenskillfern", "repeating_fernkampfwaffen_" + currentID +"_waffenattr1fern", "repeating_fernkampfwaffen_" + currentID +"_waffenattr2fern"], async function(v) { - await Promise.all([baseAttr, fnkAttr]); + let promiseAwait = await Promise.all([baseAttr, fnkAttr]); + [baseAttr, fnkAttr] = promiseAwait; + + var skill = v["repeating_fernkampfwaffen_" + currentID +"_waffenskillfern"]; var attr1 = v["repeating_fernkampfwaffen_" + currentID +"_waffenattr1fern"]; From e718cbab9fdc30ca67f0fbde19fe7d45f5f4c74b Mon Sep 17 00:00:00 2001 From: 0dr Date: Wed, 31 Jul 2024 16:57:08 +0200 Subject: [PATCH 2/2] inc version Number --- Splittermond/Sheet.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Splittermond/Sheet.html b/Splittermond/Sheet.html index 853a84d2a21..9de50f45f0a 100644 --- a/Splittermond/Sheet.html +++ b/Splittermond/Sheet.html @@ -6,7 +6,7 @@ src="https://imgsrv.roll20.net?src=https%3A//raw.githubusercontent.com/Roll20/roll20-character-sheets/master/Splittermond/Splittermond_w.png" style="display: inline;">-->
- Splittermond Charakterbogen für Roll20 (v. 2.2.0) + Splittermond Charakterbogen für Roll20 (v. 2.2.1) Original Idee und Umsetzung von Loki, Design von Andernath Weiterentwickelt von 0dr