武将:升阶
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user