/** * 问好点随机配置表 */ import { readFileAndParse } from '../util' import { FILENAME } from '../../consts' export interface DicRougeQuestionMarkPlan { readonly id: number; readonly questionMarkPlanId: number; // 问号点随机方案编号 readonly questionMarkIndex: number; // 方案内node编号 readonly nodeType: number; // 关卡类型 普通关、精英关、boss关、挑战点问号点、休整点、商店 readonly param: number; // 普通关、精英关对应的warId readonly weight: number; //随机权重 } export const dicRougeQuestionMarkPlan = new Map(); export function loadRougeQuestionMarkPlan() { dicRougeQuestionMarkPlan.clear(); let arr = readFileAndParse(FILENAME.DIC_ROUGE_QUESTION_MARK_PLAN); arr.forEach(o => { if (!dicRougeQuestionMarkPlan.get(o.questionMarkPlanId)) dicRougeQuestionMarkPlan.set(o.questionMarkPlanId, []); dicRougeQuestionMarkPlan.get(o.questionMarkPlanId).push(o); }); arr = undefined; }