武将:升阶

This commit is contained in:
luying
2021-07-07 16:45:52 +08:00
parent ed534aa715
commit 70cb181222
4 changed files with 16 additions and 15 deletions
+3 -3
View File
@@ -444,16 +444,16 @@ export function calHeroTrainIncAttr(originHero: HeroType, update: HeroUpdate) {
let dicJob = gameData.job.get(job);
if (dicJob.grade > 1) {
if (dicJob.grade >= 1) {
let jobGradeAndClass = getJobByGradeAndClass(dicJob.job_class, dicJob.grade - 1);
let lastJob = gameData.job.get(jobGradeAndClass.jobid);
let targetAttrId = dicJob.ceAttr.get(jobStage).id;
let inc = (dicJob.ceAttr.get(jobStage).attr - lastJob.ceAttr.get(jobStage).attr) * HERO_CE_RATIO;
updateHeroAttr(heroAttrs, targetAttrId, { inc: { fixUp: inc } })
updateHeroAttr(heroAttrs, targetAttrId, { inc: { fixUp: inc } });
} else {
let targetAttrId = dicJob.ceAttr.get(jobStage).id;
let inc = dicJob.ceAttr.get(jobStage).attr * HERO_CE_RATIO;
updateHeroAttr(heroAttrs, targetAttrId, { inc: { fixUp: inc } })
updateHeroAttr(heroAttrs, targetAttrId, { inc: { fixUp: inc } });
}
return heroAttrs;
}