addItem goodType修改
This commit is contained in:
@@ -42,21 +42,21 @@ const moment = require('moment');
|
||||
let result: any;
|
||||
switch (type) {
|
||||
case 'fixReward': {
|
||||
let [gid, count] = arr;
|
||||
if(isNaN(gid) || isNaN(count)) throw new Error('data table format wrong');
|
||||
result = { gid: parseInt(gid), count: parseInt(count)};
|
||||
let [id, count] = arr;
|
||||
if(isNaN(id) || isNaN(count)) throw new Error('data table format wrong');
|
||||
result = { id: parseInt(id), count: parseInt(count)};
|
||||
break;
|
||||
}
|
||||
case 'conditionReward': {
|
||||
let [gid, count, condition] = arr;
|
||||
if(isNaN(gid) || isNaN(count)) throw new Error('data table format wrong');
|
||||
result = { gid: parseInt(gid), count: parseInt(count), condition: parseInt(condition) };
|
||||
let [id, count, condition] = arr;
|
||||
if(isNaN(id) || isNaN(count)) throw new Error('data table format wrong');
|
||||
result = { id: parseInt(id), count: parseInt(count), condition: parseInt(condition) };
|
||||
break;
|
||||
}
|
||||
case 'randomReward': {
|
||||
let [gid, count, frequency] = arr;
|
||||
if(isNaN(gid) || isNaN(count)) throw new Error('data table format wrong');
|
||||
result = { gid: parseInt(gid), count: parseInt(count), frequency: parseInt(frequency) };
|
||||
let [id, count, frequency] = arr;
|
||||
if(isNaN(id) || isNaN(count)) throw new Error('data table format wrong');
|
||||
result = { id: parseInt(id), count: parseInt(count), frequency: parseInt(frequency) };
|
||||
break;
|
||||
}
|
||||
case 'suitLevel': {
|
||||
@@ -91,9 +91,9 @@ const moment = require('moment');
|
||||
break;
|
||||
}
|
||||
case 'decimalReward': {
|
||||
let [gid, count] = arr;
|
||||
if(isNaN(gid) || isNaN(count)) throw new Error('data table format wrong');
|
||||
result = { gid: parseInt(gid), count: parseFloat(count) };
|
||||
let [id, count] = arr;
|
||||
if(isNaN(id) || isNaN(count)) throw new Error('data table format wrong');
|
||||
result = { id: parseInt(id), count: parseFloat(count) };
|
||||
break;
|
||||
}
|
||||
case 'towerTaskCondition': {
|
||||
|
||||
Reference in New Issue
Block a user