数值:装备支持小数点

This commit is contained in:
luying
2022-04-13 16:51:39 +08:00
parent 8f377a5d91
commit 1b33d8a03e
2 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -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
}