feat(诸子列传): 添加功能

This commit is contained in:
luying
2023-07-12 17:38:19 +08:00
parent b1af8ad204
commit 1eb6f76cce
25 changed files with 5475 additions and 71 deletions

View File

@@ -0,0 +1,28 @@
// 英灵对应的物品表
import { parseGoodStr, readFileAndParse } from '../util'
import { FILENAME } from '../../consts'
import { RewardInter } from '../interface';
export interface DicAuthorsBookGoodId {
// id
readonly id: number;
// 对应物品表id
readonly goodId: number;
// 分解可得
readonly decomposeItem: RewardInter[];
// 英灵替换
readonly composeItem: RewardInter[];
}
export const dicAuthorsBookGoodId = new Map<number, DicAuthorsBookGoodId>();
export function loadAuthorsBookGoodId() {
dicAuthorsBookGoodId.clear();
let arr = readFileAndParse(FILENAME.DIC_AUTHORS_GOODID);
arr.forEach(o => {
o.decomposeItem = parseGoodStr(o.decomposeItem);
o.composeItem = parseGoodStr(o.composeItem)
dicAuthorsBookGoodId.set(o.goodId, o);
});
arr = undefined;
}