✨ feat(稷下学宫): ff931afe4到7421822f6
This commit is contained in:
39
shared/pubUtils/dictionary/DicRougeChara.ts
Normal file
39
shared/pubUtils/dictionary/DicRougeChara.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
* 角色卡配置表
|
||||
*/
|
||||
|
||||
import { readFileAndParse } from '../util'
|
||||
import { FILENAME } from '../../consts'
|
||||
|
||||
export interface DicRougeChara {
|
||||
readonly id: number;
|
||||
readonly heroId: number; // 角色id
|
||||
readonly charaType: number; // 1-普通卡 2-高级卡
|
||||
readonly initial: number; // 是否能被初始随机到
|
||||
readonly initCardCnt: number; // 初始获得多少特性卡装在身上
|
||||
readonly recruitConsume: number; // 试炼币购买
|
||||
|
||||
}
|
||||
|
||||
|
||||
export const dicRougeChara = new Map<number, DicRougeChara>();
|
||||
export const dicRougeCharaByInitial = new Map<number, DicRougeChara[]>();
|
||||
|
||||
export function loadRougeChara() {
|
||||
dicRougeChara.clear();
|
||||
dicRougeCharaByInitial.clear();
|
||||
|
||||
|
||||
let arr = readFileAndParse(FILENAME.DIC_ROUGE_CHARA);
|
||||
|
||||
arr.forEach(o => {
|
||||
dicRougeChara.set(o.id, o);
|
||||
|
||||
if (!dicRougeCharaByInitial.has(o.initial)) {
|
||||
dicRougeCharaByInitial.set(o.initial, []);
|
||||
}
|
||||
dicRougeCharaByInitial.get(o.initial).push(o);
|
||||
|
||||
});
|
||||
arr = undefined;
|
||||
}
|
||||
Reference in New Issue
Block a user