diff --git a/shared/pubUtils/dictionary/DicEquipStar.ts b/shared/pubUtils/dictionary/DicEquipStar.ts index e7334af97..dcbf474a3 100644 --- a/shared/pubUtils/dictionary/DicEquipStar.ts +++ b/shared/pubUtils/dictionary/DicEquipStar.ts @@ -52,10 +52,10 @@ function parseAttrMap(str: string) { let decodeArr = decodeArrayListStr(str); for(let i = 0; i < decodeArr.length; i++) { let [id, num] = decodeArr[i]; - if(isNaN(parseInt(id)) || isNaN(parseInt(num))) { + if(isNaN(parseInt(id)) || isNaN(parseFloat(num))) { throw new Error('data table format wrong'); } - result.set(i + 1, [{id: parseInt(id), num: parseInt(num)}]); + result.set(i + 1, [{id: parseInt(id), num: parseFloat(num)}]); } return result } @@ -65,10 +65,10 @@ function parseAttr(str: string) { if(!str) return result; let decodeArr = decodeArrayListStr(str); for(let [id, num] of decodeArr) { - if(isNaN(parseInt(id)) || isNaN(parseInt(num))) { + if(isNaN(parseInt(id)) || isNaN(parseFloat(num))) { throw new Error('data table format wrong'); } - result.push({id: parseInt(id), num: parseInt(num)}); + result.push({id: parseInt(id), num: parseFloat(num)}); } return result } \ No newline at end of file diff --git a/shared/pubUtils/dictionary/DicEquipSuit.ts b/shared/pubUtils/dictionary/DicEquipSuit.ts index 65791c0d2..940972222 100644 --- a/shared/pubUtils/dictionary/DicEquipSuit.ts +++ b/shared/pubUtils/dictionary/DicEquipSuit.ts @@ -34,10 +34,10 @@ function parseEffect(str: string) { if(!str) return result; let decodeArr = decodeArrayListStr(str); for(let [star, id, val] of decodeArr) { - if(isNaN(parseInt(star)) || isNaN(parseInt(id)) || isNaN(parseInt(val))) { + if(isNaN(parseInt(star)) || isNaN(parseInt(id)) || isNaN(parseFloat(val))) { throw new Error('data table format wrong'); } - result.push({star: parseInt(star), id: parseInt(id), val: parseInt(val)}); + result.push({star: parseInt(star), id: parseInt(id), val: parseFloat(val)}); } return result } \ No newline at end of file