clear:删除一些没有在使用的表
This commit is contained in:
@@ -1,43 +0,0 @@
|
||||
// 武将技能表
|
||||
import {decodeArrayListStr, readFileAndParse} from '../util'
|
||||
import { FILENAME } from '../../consts'
|
||||
|
||||
export interface DicHeroSkill {
|
||||
|
||||
// 技能id
|
||||
readonly skillid: number;
|
||||
// 技能名
|
||||
readonly name: string;
|
||||
// 星级解锁
|
||||
readonly starSeidArr: Array<{star: number, value: number, type: number}>;
|
||||
// 觉醒解锁
|
||||
readonly colorStarSeidArr: Array<{star: number, value: number, type: number}>;
|
||||
|
||||
}
|
||||
|
||||
export const dicHeroSkill = new Map<number, DicHeroSkill>();
|
||||
export function loadHeroSkill() {
|
||||
dicHeroSkill.clear();
|
||||
|
||||
let arr = readFileAndParse(FILENAME.DIC_HERO_SKILL);
|
||||
arr.forEach(o => {
|
||||
o.starSeidArr = parseSeid(o.starSeid);
|
||||
o.colorStarSeidArr = parseSeid(o.colorStarSeid);
|
||||
dicHeroSkill.set(o.skillid, o);
|
||||
});
|
||||
arr = undefined;
|
||||
}
|
||||
|
||||
function parseSeid(str: string) {
|
||||
let arr = new Array<{star: number, value: number, type: number}>();
|
||||
if(!str) return arr;
|
||||
let decodeArr = decodeArrayListStr(str);
|
||||
for(let [star, value, type] of decodeArr) {
|
||||
if(isNaN(parseInt(star)) || isNaN(parseInt(value)) || isNaN(parseInt(type))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
arr.push({ star: parseInt(star), value: parseInt(value), type: parseInt(type)});
|
||||
}
|
||||
return arr;
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
// 寻宝表
|
||||
import { readFileAndParse } from '../util'
|
||||
import { FILENAME } from '../../consts'
|
||||
|
||||
export interface DicXunbao {
|
||||
|
||||
// 品质
|
||||
readonly quality: number;
|
||||
// 品质名
|
||||
readonly name: number;
|
||||
// 协助次数
|
||||
readonly assistanceTime: number;
|
||||
// ! 已删除。最低协助等级
|
||||
// readonly assistanceLevel: number;
|
||||
}
|
||||
|
||||
export const dicXunbao = new Map<number, DicXunbao>();
|
||||
export function loadXunbao() {
|
||||
dicXunbao.clear();
|
||||
let arr = readFileAndParse(FILENAME.DIC_XUNBAO);
|
||||
|
||||
arr.forEach(o => {
|
||||
dicXunbao.set(o.quality, o);
|
||||
});
|
||||
arr = undefined;
|
||||
}
|
||||
Reference in New Issue
Block a user