✨ feat(诸子列传): 添加功能
This commit is contained in:
28
shared/pubUtils/dictionary/DicAuthorsBookGoodId.ts
Normal file
28
shared/pubUtils/dictionary/DicAuthorsBookGoodId.ts
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user