添加百家学宫和名将谱,未计算战力
This commit is contained in:
26
shared/pubUtils/dictionary/DicSchool.ts
Normal file
26
shared/pubUtils/dictionary/DicSchool.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
// 百家学宫列表
|
||||
import { readJsonFile, parseNumberList } from '../util'
|
||||
import { FILENAME } from '../../consts'
|
||||
|
||||
export interface DicSchool {
|
||||
|
||||
// 学宫id
|
||||
readonly id: number;
|
||||
// 学宫名
|
||||
readonly name: string;
|
||||
// 提升属性
|
||||
readonly upAttribute: Array<number>;
|
||||
}
|
||||
|
||||
|
||||
const str = readJsonFile(FILENAME.DIC_SCHOOL);
|
||||
let arr = JSON.parse(str);
|
||||
|
||||
export const dicSchool = new Map<number, DicSchool>();
|
||||
|
||||
arr.forEach(o => {
|
||||
o.upAttribute = parseNumberList(o.upAttribute)
|
||||
dicSchool.set(o.id, o);
|
||||
});
|
||||
|
||||
arr = undefined;
|
||||
Reference in New Issue
Block a user