28 lines
833 B
TypeScript
28 lines
833 B
TypeScript
/**
|
||
* 挑战类型配置表
|
||
*/
|
||
|
||
import { parseNumberList, readFileAndParse } from '../util'
|
||
import { FILENAME } from '../../consts'
|
||
|
||
export interface DicRougeChallenge {
|
||
readonly id: number;
|
||
readonly challengeId: number; // 挑战
|
||
readonly type: number; // 挑战的类型,具体是啥需要一个文档
|
||
readonly effectId: number[]; // 挑战达成的参数
|
||
readonly condition: number; // 客户端显示的 x/n,里面的n
|
||
}
|
||
|
||
|
||
export const dicRougeChallenge = new Map<number, DicRougeChallenge>();
|
||
export function loadRougeChallenge() {
|
||
dicRougeChallenge.clear();
|
||
|
||
let arr = readFileAndParse(FILENAME.DIC_ROUGE_CHALLANGE);
|
||
|
||
arr.forEach(o => {
|
||
o.effectId = parseNumberList(o.effectId);
|
||
dicRougeChallenge.set(o.challengeId, o);
|
||
});
|
||
arr = undefined;
|
||
} |