✨ feat(稷下学宫): ff931afe4到7421822f6
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* 英灵随机奖励配置表
|
||||
*/
|
||||
|
||||
import { readFileAndParse } from '../util'
|
||||
import { FILENAME } from '../../consts'
|
||||
|
||||
export interface DicSpiritPlan {
|
||||
readonly id: number;
|
||||
readonly planId: number;
|
||||
readonly spiritId: number;
|
||||
readonly weight: number;
|
||||
}
|
||||
export const dicSpiritPlan = new Map<number, DicSpiritPlan[]>();
|
||||
|
||||
export function loadSpiritPlan() {
|
||||
dicSpiritPlan.clear();
|
||||
|
||||
let arr = readFileAndParse(FILENAME.DIC_SPIRIT_PLAN);
|
||||
|
||||
arr.forEach(o => {
|
||||
|
||||
if (!dicSpiritPlan.has(o.planId)) dicSpiritPlan.set(o.planId, []);
|
||||
dicSpiritPlan.get(o.planId).push(o);
|
||||
|
||||
});
|
||||
arr = undefined;
|
||||
}
|
||||
Reference in New Issue
Block a user