24 lines
728 B
TypeScript
24 lines
728 B
TypeScript
// 演武台&诸侯混战
|
|
import { readFileAndParse } from '../util'
|
|
import { FILENAME } from '../../consts'
|
|
|
|
export interface DicBossHpRatio {
|
|
// 类型 1-演武台按开服天数 2-诸侯混战按开服天数 3-最低玩家人数
|
|
readonly type: number;
|
|
// 开服时间
|
|
readonly serverOpen: number;
|
|
// 倍率
|
|
readonly ratio: number;
|
|
}
|
|
|
|
export const dicBossHpRatio = new Map<number, DicBossHpRatio[]>();
|
|
export function loadBossHpRatio() {
|
|
dicBossHpRatio.clear();
|
|
let arr = readFileAndParse(FILENAME.DIC_GUILD_HP_RATIO);
|
|
|
|
arr.forEach(o => {
|
|
if(!dicBossHpRatio.has(o.type)) dicBossHpRatio.set(o.type, []);
|
|
dicBossHpRatio.get(o.type)?.push(o);
|
|
});
|
|
arr = undefined;
|
|
} |