fix 觉醒计算战力NaN

This commit is contained in:
luying
2020-12-16 10:03:09 +08:00
parent 7f256c996e
commit 776b5b8cfd
2 changed files with 3 additions and 3 deletions

View File

@@ -233,7 +233,7 @@ export class HeroHandler {
return resResult(STATUS.ROLE_QUALITY_NOT_ENOUGH);
}
// 根据dic_zyz_hero_wake 计算需要花的碎片并检查碎片数量
const curDicHeroStar = getHeroWakeByQuality(quality, oldColorStar)
const curDicHeroStar = getHeroWakeByQuality(dicHero.quality, oldColorStar)
if(!curDicHeroStar) return resResult(STATUS.ROLE_INFO_NOT_FOUND);
let {fragmentNum, consume} = curDicHeroStar;

View File

@@ -95,8 +95,8 @@ export function calHeroStarIncAttr (hero: HeroType, args: Array<number>, addSeid
for(let stage of args) {
let targetAttrId = getFieldByStage(stage, hero.job); // 转换为17维的属性id
let heroAttr = dicHero.baseAbilityArr[targetAttrId]; // 武将表hp等
let heroUpAttr = dicHero.baseAbilityUpArr[targetAttrId]; // 武将表hp_up等
let heroAttr = dicHero.baseAbilityArr.get(targetAttrId); // 武将表hp等
let heroUpAttr = dicHero.baseAbilityUpArr.get(targetAttrId); // 武将表hp_up等
let starUp = dicStar.ceAttr.get(stage);
let newBase = heroAttr + hero.lv * (heroUpAttr + starUp);