From ac6fc21fb6fad401c04bb70359324992c526ab53 Mon Sep 17 00:00:00 2001 From: pan Date: Tue, 25 Aug 2026 11:13:12 +0800 Subject: [PATCH] =?UTF-8?q?fix(herosListComp):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E8=8B=B1=E9=9B=84=E5=A4=A7=E6=8B=9B=E5=92=8C=E6=8A=80=E8=83=BD?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=E6=98=BE=E7=A4=BA=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 调整大招技能图标锁定状态判断,改为恒不锁定 2. 统一触发、复活技能的等级显示逻辑,固定等级为1 3. 补充技能等级计算的注释说明 --- assets/script/game/map/HerosListComp.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/assets/script/game/map/HerosListComp.ts b/assets/script/game/map/HerosListComp.ts index aae47611..59b780a6 100644 --- a/assets/script/game/map/HerosListComp.ts +++ b/assets/script/game/map/HerosListComp.ts @@ -515,15 +515,13 @@ export class HerosListComp extends CCComp { const lv = Math.max(1, smc.getHeroOuterLv(hero.uuid)) - // ---- 大招:skills[1] 及以后 ---- + // ---- 大招:skills[1] 及以后(英雄出场即激活,与能量条同语义,恒不锁定) ---- Object.values(hero.skills).slice(1).forEach(hSkill => { - // 与 Hero.load 同式:技能等级 = 配置 lv + 英雄等级 - 2,> 0 才视为已解锁 - const unlocked = hSkill.lv + lv - 2 > 0 - // 技能等级展示与 buildSkillDesc 同规则:lv_entries 取 ≤lv 最大档的 s_lv + // 技能等级展示与 buildSkillDesc 同规则:lv_entries 取 ≤lv 最大档的 s_lv,无生效档回退配置 lv const sLv = hSkill.lv_entries?.length ? (hSkill.lv_entries.filter(e => e.lv <= lv).pop()?.s_lv ?? hSkill.lv) : hSkill.lv - this.addSkillIcon(hSkill.uuid, sLv, !unlocked, false) + this.addSkillIcon(hSkill.uuid, sLv, false, false) }) // ---- 触发技能:按 PANEL_TRIGGER_TYPES 顺序追加 ---- @@ -578,7 +576,8 @@ export class HerosListComp extends CCComp { for (const e of sorted) { if (e.lv <= lv) active = e } const pick = active ?? sorted[0] for (const entry of pick.uuids) { - this.addSkillIcon(entry.uuid, pick.lv, !active, true) + // 词条档位无 s_lv 概念,技能等级恒为 1(等级标签展示技能等级而非解锁的英雄等级) + this.addSkillIcon(entry.uuid, 1, !active, true) } } @@ -589,7 +588,8 @@ export class HerosListComp extends CCComp { let active: LvReviveEntry | undefined for (const e of sorted) { if (e.lv <= lv) active = e } const pick = active ?? sorted[0] - this.addSkillIcon(pick.s_uuid, pick.lv, !active, false) + // 复活档位无 s_lv 概念,技能等级恒为 1(等级标签展示技能等级而非解锁的英雄等级) + this.addSkillIcon(pick.s_uuid, 1, !active, false) } // ======================== 英雄动画 ========================