数值:装备支持小数点
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user