资源:武将及装备
This commit is contained in:
@@ -49,10 +49,10 @@ function parseRate(str: string) {
|
||||
if(!str) return result;
|
||||
let decodeArr = decodeArrayListStr(str);
|
||||
for(let [min, max, weight] of decodeArr) {
|
||||
if(isNaN(parseInt(min)) || isNaN(parseInt(max)) || isNaN(parseInt(weight))) {
|
||||
if(isNaN(parseFloat(min)) || isNaN(parseFloat(max)) || isNaN(parseFloat(weight))) {
|
||||
throw new Error('data table format wrong');
|
||||
}
|
||||
result.push({min: parseInt(min), max: parseInt(max), weight: parseInt(weight) });
|
||||
result.push({min: parseFloat(min), max: parseFloat(max), weight: parseFloat(weight) });
|
||||
}
|
||||
return result
|
||||
}
|
||||
Reference in New Issue
Block a user