fix(HerosListComp): 修改英雄等级显示逻辑

将updateLvDisplay方法参数从传入uuid获取英雄外显等级替换原有的hero对象直接取card_lv
This commit is contained in:
panFD
2026-08-23 23:55:24 +08:00
parent 41842f2b67
commit 08c5a4e5a8

View File

@@ -263,7 +263,7 @@ export class HerosListComp extends CCComp {
}
this.updatePoolLvBg(hero.card_lv ?? 1)
this.updateLvDisplay(hero)
this.updateLvDisplay(uuid)
this.updateTypeDisplay(hero)
this.updateHeroAnimation(uuid)
this.updateGrowthPanel(uuid)
@@ -288,9 +288,10 @@ export class HerosListComp extends CCComp {
}
}
private updateLvDisplay(hero: typeof HeroInfo[number]) {
private updateLvDisplay(uuid: number) {
if (!this.lv_label) return
this.lv_label.string = `lv.${hero.card_lv ?? 1}`
const outerLv = smc.getHeroOuterLv(uuid)
this.lv_label.string = `lv.${outerLv}`
}
private updateTypeDisplay(hero: typeof HeroInfo[number]) {