diff --git a/shared/consts/constModules/abilityConst.ts b/shared/consts/constModules/abilityConst.ts index f3bb61476..716563570 100644 --- a/shared/consts/constModules/abilityConst.ts +++ b/shared/consts/constModules/abilityConst.ts @@ -95,7 +95,7 @@ export enum ABI_STAGE { } export enum ABI_JOB_STAGE { - START = 0, + START = 1, END = 6 } export const ATTR = {} diff --git a/shared/pubUtils/playerCe.ts b/shared/pubUtils/playerCe.ts index 74f809cd9..c7f74b88e 100644 --- a/shared/pubUtils/playerCe.ts +++ b/shared/pubUtils/playerCe.ts @@ -240,16 +240,16 @@ export async function calculatetopLineup(role: RoleType, hid?: number, ce?: numb * @param {number[]} removeSeidList 用于更新被动 */ export function calHeroInitIncAttr(hero: HeroType, addSeidList: Array, removeSeidList: Array) { - try{ + // try{ delete hero._id; let heroAttrs = calHeroStarIncAttr(hero, hero, HERO_SYSTEM_TYPE.INIT, addSeidList, removeSeidList); - let curSkin = hero.skins.find(cur => cur.enable); - heroAttrs = calHeroWearSkinIncAttr(hero, curSkin ? curSkin.id : 0, 0, addSeidList, removeSeidList, true); + heroAttrs = calHeroWearSkinIncAttr(hero, gameData.hero.get(hero.hid)?.initialSkin||0, 0, addSeidList, removeSeidList, true); heroAttrs = calHeroJobAttr(hero, hero, addSeidList, removeSeidList); return heroAttrs; - }catch(e) { - console.error(e); - } + // }catch(e) { + // console.error(e); + // return []; + // } } /** @@ -505,7 +505,7 @@ export function calHeroJobAttr(originHero: HeroType, hero: HeroUpdate, addSeidLi lastJob = gameData.job.get(jobGradeAndClass.jobid); } - for (let stage = ABI_JOB_STAGE.START; stage < ABI_JOB_STAGE.END; stage++) { + for (let stage = ABI_JOB_STAGE.START; stage <= ABI_JOB_STAGE.END; stage++) { if(hero.jobStage >= stage) { let targetAttrId = currentJob.ceAttr.get(stage).id; let fixUp = currentJob.ceAttr.get(stage).attr * HERO_CE_RATIO;