✨ feat(军团): 练兵场添加扫荡
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { readFileAndParse, parseGoodStr } from '../util'
|
||||
import { readFileAndParse, parseGoodStr, parseNumberList } from '../util'
|
||||
import { FILENAME } from '../../consts'
|
||||
type KeysEnum<T> = { [P in keyof Required<T>]: true };
|
||||
import { RewardInter } from '../interface';
|
||||
@@ -12,7 +12,7 @@ export interface DicGuildTrainInfo {
|
||||
readonly trainLv: number; // 试炼场等级
|
||||
readonly heroId: number;
|
||||
readonly heroRewards: RewardInter[]; // 翻牌子的奖励,随机其中一个
|
||||
|
||||
readonly difficulty: number[]; // 难度
|
||||
}
|
||||
|
||||
const DicGuildTrainInfoKeys: KeysEnum<DicGuildTrainInfo> = {
|
||||
@@ -20,7 +20,8 @@ const DicGuildTrainInfoKeys: KeysEnum<DicGuildTrainInfo> = {
|
||||
trainId: true,
|
||||
trainLv: true,
|
||||
heroId: true,
|
||||
heroRewards: true
|
||||
heroRewards: true,
|
||||
difficulty: true,
|
||||
};
|
||||
|
||||
export const dicGuildTrainInfo = new Map<string, DicGuildTrainInfo>();
|
||||
@@ -31,7 +32,8 @@ export function loadGuildTrainInfo() {
|
||||
|
||||
arr.forEach(o => {
|
||||
o.heroId = o.heroid;
|
||||
o.heroRewards = parseGoodStr(o.shilianReward); // TODO 这个改到
|
||||
o.heroRewards = parseGoodStr(o.shilianReward);
|
||||
o.difficulty = parseNumberList(o.war_id);
|
||||
|
||||
dicGuildTrainInfo.set(`${o.trainId}_${o.heroId}`,_.pick(o, Object.keys(DicGuildTrainInfoKeys)));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user