排行榜: 获取排行榜

This commit is contained in:
luying
2021-04-12 09:47:15 +08:00
parent 34e02dea89
commit 5dca7b304d
32 changed files with 1077 additions and 290 deletions
+4
View File
@@ -34,8 +34,12 @@ let arr = JSON.parse(str);
type KeysEnum<T> = { [P in keyof Required<T>]: true };
const DicHeroKeys: KeysEnum<DicHero> = {heroId: true, name: true, quality: true, camp: true, jobid: true, skill: true, pieceId: true, initialStars: true, pieceCount: true, baseAbilityArr: true, baseAbilityUpArr: true, initialSkin: true};
export const dicMyHeroes = new Array<number>();
export const dicHero = new Map<number, DicHero>();
arr.forEach(o => {
if(o.heroId > 0 && o.heroId <= 300) {
dicMyHeroes.push(o.heroId);
}
o.baseAbilityArr = parseBaseAbilityArr(o);
o.baseAbilityUpArr = parseBaseAbilityUpArr(o);