抽卡:获取抽卡列表
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import { readJsonFile, parseNumberList } from '../util'
|
||||
import { FILENAME } from '../../consts'
|
||||
|
||||
export interface DicGachaContent {
|
||||
// 内容id
|
||||
readonly id: number;
|
||||
// 道具类型 见sysConst 中的 GACHA_CONTENT_TYPE
|
||||
readonly type: number;
|
||||
// 对应参数 品质,等级,物品id 等
|
||||
readonly param: number[];
|
||||
// 道具数量
|
||||
readonly count: number;
|
||||
}
|
||||
|
||||
const str = readJsonFile(FILENAME.DIC_GACHA_CONTENT);
|
||||
let arr = JSON.parse(str);
|
||||
|
||||
export const dicGachaContent = new Map<number, DicGachaContent>();
|
||||
arr.forEach(o => {
|
||||
o.param = parseNumberList(o.param);
|
||||
dicGachaContent.set(o.id, o);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user