后台:设置军团练兵场关卡
This commit is contained in:
@@ -295,6 +295,7 @@ export class GuildFormParam {
|
||||
wishPool: number;
|
||||
store: number;
|
||||
donate: number;
|
||||
trainLv: string;
|
||||
|
||||
constructor(obj?: any) {
|
||||
if(obj) {
|
||||
@@ -316,6 +317,8 @@ export class GuildFormParam {
|
||||
if(this.wishPool && !isNumber(this.wishPool)) return false;
|
||||
if(this.store && !isNumber(this.store)) return false;
|
||||
if(this.donate && !isNumber(this.donate)) return false;
|
||||
if(this.trainLv && !isString(this.trainLv)) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user