32 lines
769 B
TypeScript
32 lines
769 B
TypeScript
// 百家学宫列表
|
|
import { readFileAndParse } from '../util'
|
|
import { FILENAME } from '../../consts'
|
|
|
|
export interface DicSchoolRate {
|
|
|
|
// id
|
|
readonly id: number;
|
|
// 品质
|
|
readonly quality: number;
|
|
// 星级
|
|
readonly stars: number;
|
|
// 觉醒星级
|
|
readonly colorstars: number;
|
|
// 主属性加百分比
|
|
readonly mainAttrAPerent: number;
|
|
// 次级属性加值
|
|
readonly assiAttrAddValue: number;
|
|
}
|
|
|
|
export const dicSchoolRate = new Map<string, DicSchoolRate>();
|
|
export function loadSchoolRate() {
|
|
dicSchoolRate.clear();
|
|
|
|
let arr = readFileAndParse(FILENAME.DIC_SCHOOL_RATE);
|
|
|
|
arr.forEach(o => {
|
|
dicSchoolRate.set(`${o.stars}_${o.colorstars}_${o.quality}`, o);
|
|
});
|
|
|
|
arr = undefined;
|
|
} |