refactor(mission card): 暂时禁用英雄信息盒同步逻辑

注释所有refreshHeroBoxSlots调用点并禁用方法实现,保留代码备查以便后续恢复
This commit is contained in:
pan
2026-08-12 15:51:56 +08:00
parent a5dc1ef540
commit ab6a3b7824
2 changed files with 16 additions and 6 deletions

View File

@@ -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);
*/
}
/**