战力,出生皮肤

This commit is contained in:
mamengke01
2020-12-22 14:07:43 +08:00
parent ba4f58509d
commit eec53b688f
17 changed files with 1173 additions and 314 deletions
+3 -5
View File
@@ -1,6 +1,6 @@
// 物品表
import {decodeArrayListStr, readJsonFile, parseReward, parseNumberList, decodeArrayStr, deepCopy} from '../util'
import { FILENAME, IT_TYPE, ABI_TYPE } from '../../consts'
import {decodeArrayListStr, readJsonFile, parseReward, parseNumberList, decodeArrayStr} from '../util'
import { FILENAME, IT_TYPE, ABI_TYPE , GOOD_TYPE} from '../../consts'
import { RewardInter } from '../interface';
const _ = require('lodash');
const underscore = require('underscore');
@@ -87,7 +87,6 @@ const DicGoodsKeys: KeysEnum<DicGoods> = {
export const dicJewel = new Map<number, DicGoods>();
export const dicGoods = new Map<number, DicGoods>();
export const blueprt = new Map<number, Array<number>>();
let jewelsMap = {};
arr.forEach(o => {
o.goodsAbility = parseAbility(o);
o.goodsAbilityUp = parseAbilityUp(o);
@@ -102,7 +101,7 @@ arr.forEach(o => {
let arr = blueprt.get(o.quality)||new Array<number>();
arr.push(o.good_id);
blueprt.set(o.quality, arr);
} else if (o.itid == IT_TYPE.JEWEL) {
} else if (o.itid == GOOD_TYPE.JEWEL) {
let material = o.composeMaterial[0];
if (!!material && !!material.id) {
let lastJewel = underscore.findWhere(arr,{good_id:material.id});
@@ -115,7 +114,6 @@ arr.forEach(o => {
}
});
jewelsMap = undefined;
arr = undefined;
function parseSpecialAttr(str: string) {
+2 -1
View File
@@ -26,13 +26,14 @@ export interface DicHero {
// 主属性
readonly baseAbilityArr:Map<number, number>;
readonly baseAbilityUpArr:Map<number, number>;
readonly initialSkin: number;
}
const str = readJsonFile(FILENAME.DIC_HERO);
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};
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 dicHero = new Map<number, DicHero>();
arr.forEach(o => {
o.baseAbilityArr = parseBaseAbilityArr(o);