抽卡:修改抽卡奖池逻辑
This commit is contained in:
25
shared/pubUtils/dictionary/DicGachaFloor.ts
Normal file
25
shared/pubUtils/dictionary/DicGachaFloor.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { readFileAndParse } from '../util';
|
||||
import { GACHA_FLOOR_TYPE, FILENAME } from '../../consts';
|
||||
|
||||
export interface DicGachaFloor {
|
||||
// 保底id
|
||||
readonly id: number;
|
||||
// 类型
|
||||
readonly floorType: GACHA_FLOOR_TYPE;
|
||||
// 目标武将品质
|
||||
readonly heroQuality: number;
|
||||
// 参数
|
||||
readonly param: number;
|
||||
}
|
||||
|
||||
export const dicGachaFloor = new Map<number, DicGachaFloor>(); // floorId => plans
|
||||
export function loadGachaFloor() {
|
||||
dicGachaFloor.clear();
|
||||
let arr = readFileAndParse(FILENAME.DIC_GACHA_FLOOR);
|
||||
|
||||
arr.forEach(o => {
|
||||
dicGachaFloor.set(o.id, o);
|
||||
});
|
||||
|
||||
arr = undefined;
|
||||
}
|
||||
Reference in New Issue
Block a user