From ab6a3b78248b9466709f07d39a71f7e87f0f284c Mon Sep 17 00:00:00 2001 From: pan Date: Wed, 12 Aug 2026 15:51:56 +0800 Subject: [PATCH] =?UTF-8?q?refactor(mission=20card):=20=E6=9A=82=E6=97=B6?= =?UTF-8?q?=E7=A6=81=E7=94=A8=E8=8B=B1=E9=9B=84=E4=BF=A1=E6=81=AF=E7=9B=92?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 注释所有refreshHeroBoxSlots调用点并禁用方法实现,保留代码备查以便后续恢复 --- assets/resources/gui/element/mission.prefab | 2 +- assets/script/game/map/MissionCardComp.ts | 20 +++++++++++++++----- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/assets/resources/gui/element/mission.prefab b/assets/resources/gui/element/mission.prefab index aada8e79..f651c16f 100644 --- a/assets/resources/gui/element/mission.prefab +++ b/assets/resources/gui/element/mission.prefab @@ -3644,7 +3644,7 @@ "__id__": 183 } ], - "_active": true, + "_active": false, "_components": [ { "__id__": 266 diff --git a/assets/script/game/map/MissionCardComp.ts b/assets/script/game/map/MissionCardComp.ts index e20f0e61..f781d45c 100644 --- a/assets/script/game/map/MissionCardComp.ts +++ b/assets/script/game/map/MissionCardComp.ts @@ -359,7 +359,8 @@ export class MissionCardComp extends CCComp { this.updatePanelButtonsInteractable(); // 初始化英雄信息盒(3 个空槽位) - this.refreshHeroBoxSlots(); + // 暂不启用 herobox 同步显示英雄信息(后续可能恢复),保留代码备查 + // this.refreshHeroBoxSlots(); mLogger.log(this.debugMode, "MissionCardComp", "mission start"); } @@ -753,19 +754,22 @@ export class MissionCardComp extends CCComp { // 英雄登场后同步英雄信息盒 - this.refreshHeroBoxSlots(); + // 暂不启用 herobox 同步(后续可能恢复) + // this.refreshHeroBoxSlots(); } /** 英雄死亡事件回调:刷新面板列表并更新英雄数量 UI */ private onHeroDead() { this.updateHeroNumUI(true, false); - this.refreshHeroBoxSlots(); + // 暂不启用 herobox 同步(后续可能恢复) + // this.refreshHeroBoxSlots(); } /** 英雄被出售事件回调:更新英雄数量 UI 并清空对应英雄信息盒 */ private onHeroSell() { this.updateHeroNumUI(true, false); - this.refreshHeroBoxSlots(); + // 暂不启用 herobox 同步(后续可能恢复) + // this.refreshHeroBoxSlots(); } /** @@ -789,7 +793,8 @@ export class MissionCardComp extends CCComp { /** 英雄升级事件回调:刷新英雄信息盒显示 */ private onHeroLvUp() { - this.refreshHeroBoxSlots(); + // 暂不启用 herobox 同步(后续可能恢复) + // this.refreshHeroBoxSlots(); } /** 英雄面板空槽位点击回调:展示英雄卡池选择界面 */ @@ -1266,8 +1271,12 @@ export class MissionCardComp extends CCComp { * 3. 多余槽位清空数据并隐藏(默认全部隐藏,召唤一个激活一个)。 * * Why: 英雄召唤 / 死亡 / 卖出 / 升级后调用,保证面板与场上一一对应。 + * + * 备注:当前版本暂不启用 herobox 同步显示英雄信息(后续可能恢复), + * 方法体已整体注释,所有调用点也已注释。恢复时取消方法体与调用点注释。 */ private refreshHeroBoxSlots() { + /* 暂不启用 herobox 同步,保留实现备查 if (!this.herosBoxNode || !this.herosBoxNode.isValid) return; this.ensureHeroBoxSlots(); @@ -1298,6 +1307,7 @@ export class MissionCardComp extends CCComp { // 列表高度只按可见槽位(存活英雄数)计算,空槽位已隐藏不再占位 this.resizeListBox(this.herosBoxNode, actors.length); + */ } /**