✨ feat(稷下学宫): 修改每周学分进度奖励
This commit is contained in:
32
shared/pubUtils/dictionary/DicRougeCharaCardPlan.ts
Normal file
32
shared/pubUtils/dictionary/DicRougeCharaCardPlan.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* 角色卡奖励卡池方案
|
||||
*/
|
||||
|
||||
import { FILENAME } from "../../consts";
|
||||
import { readFileAndParse } from "../util";
|
||||
|
||||
export interface DicRougeCharaCardPlan {
|
||||
readonly id: number;
|
||||
readonly planId: number; // 方案编号
|
||||
readonly cardId: number; // 角色卡id
|
||||
readonly weight: number; // 权重
|
||||
}
|
||||
|
||||
|
||||
export const dicRougeCharaCardPlan = new Map<number, DicRougeCharaCardPlan[]>();
|
||||
|
||||
export function loadRougeCharaCardPlan() {
|
||||
dicRougeCharaCardPlan.clear();
|
||||
|
||||
let arr = readFileAndParse(FILENAME.DIC_ROUGE_CHARA_CARD_PLAN);
|
||||
|
||||
|
||||
arr.forEach(o => {
|
||||
if (!dicRougeCharaCardPlan.has(o.planId)) {
|
||||
dicRougeCharaCardPlan.set(o.planId, []);
|
||||
}
|
||||
dicRougeCharaCardPlan.get(o.planId).push(o);
|
||||
});
|
||||
|
||||
arr = undefined;
|
||||
}
|
||||
Reference in New Issue
Block a user