json:fix数组重复加载的bug
This commit is contained in:
@@ -38,6 +38,7 @@ const DicHeroKeys: KeysEnum<DicHero> = {heroId: true, name: true, quality: true,
|
||||
export const dicMyHeroes = new Array<number>();
|
||||
export const dicHero = new Map<number, DicHero>();
|
||||
export function loadHero() {
|
||||
dicMyHeroes.splice(0, dicMyHeroes.length);
|
||||
let arr = readFileAndParse(FILENAME.DIC_HERO);
|
||||
arr.forEach(o => {
|
||||
if(o.heroId > 0 && o.heroId <= 300) {
|
||||
|
||||
Reference in New Issue
Block a user