后台:设置军团练兵场关卡

This commit is contained in:
luying
2022-08-26 11:34:07 +08:00
parent faa05c72d6
commit 4989ff6846
4 changed files with 34 additions and 2 deletions
+6 -2
View File
@@ -1,5 +1,5 @@
// 军团建筑物
import {readFileAndParse, parseGoodStr, decodeArrayListStr} from '../util'
import {readFileAndParse, parseGoodStr, decodeArrayListStr, parseNumberList} from '../util'
import { FILENAME } from '../../consts'
import { RewardInter } from '../interface';
const _ = require('lodash');
@@ -104,6 +104,8 @@ export interface DicTrainBase {
readonly difficultyRatio: number;
// 据点奖励增长系数
readonly judianRewardRatio: number;
// 试炼id
readonly trainIds: number[];
}
const DicTrainKeys: KeysEnum<DicTrainBase> = {
@@ -111,7 +113,8 @@ const DicTrainKeys: KeysEnum<DicTrainBase> = {
level: true,
trainLevel: true,
difficultyRatio: true,
judianRewardRatio: true
judianRewardRatio: true,
trainIds: true
};
// 捐献所
@@ -192,6 +195,7 @@ export function loadStructure() {
let arrTrain = readFileAndParse(FILENAME.DIC_GUILD_TRAIN_BASE);
arrTrain.forEach(o => {
setStructureConsume(o);
o.trainIds = parseNumberList(o.shilianId);
dicTrainBase.set(o.level, _.pick(o, Object.keys(DicTrainKeys)));
});
arrTrain = undefined;