Files
ZYZ/shared/pubUtils/dictionary/DicRougeChallenge.ts
2023-08-30 11:02:52 +08:00

28 lines
833 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* 挑战类型配置表
*/
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;
}