refactor(mission card): 暂时禁用英雄信息盒同步逻辑
注释所有refreshHeroBoxSlots调用点并禁用方法实现,保留代码备查以便后续恢复
This commit is contained in:
@@ -3644,7 +3644,7 @@
|
|||||||
"__id__": 183
|
"__id__": 183
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"_active": true,
|
"_active": false,
|
||||||
"_components": [
|
"_components": [
|
||||||
{
|
{
|
||||||
"__id__": 266
|
"__id__": 266
|
||||||
|
|||||||
@@ -359,7 +359,8 @@ export class MissionCardComp extends CCComp {
|
|||||||
this.updatePanelButtonsInteractable();
|
this.updatePanelButtonsInteractable();
|
||||||
|
|
||||||
// 初始化英雄信息盒(3 个空槽位)
|
// 初始化英雄信息盒(3 个空槽位)
|
||||||
this.refreshHeroBoxSlots();
|
// 暂不启用 herobox 同步显示英雄信息(后续可能恢复),保留代码备查
|
||||||
|
// this.refreshHeroBoxSlots();
|
||||||
|
|
||||||
mLogger.log(this.debugMode, "MissionCardComp", "mission start");
|
mLogger.log(this.debugMode, "MissionCardComp", "mission start");
|
||||||
}
|
}
|
||||||
@@ -753,19 +754,22 @@ export class MissionCardComp extends CCComp {
|
|||||||
|
|
||||||
|
|
||||||
// 英雄登场后同步英雄信息盒
|
// 英雄登场后同步英雄信息盒
|
||||||
this.refreshHeroBoxSlots();
|
// 暂不启用 herobox 同步(后续可能恢复)
|
||||||
|
// this.refreshHeroBoxSlots();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 英雄死亡事件回调:刷新面板列表并更新英雄数量 UI */
|
/** 英雄死亡事件回调:刷新面板列表并更新英雄数量 UI */
|
||||||
private onHeroDead() {
|
private onHeroDead() {
|
||||||
this.updateHeroNumUI(true, false);
|
this.updateHeroNumUI(true, false);
|
||||||
this.refreshHeroBoxSlots();
|
// 暂不启用 herobox 同步(后续可能恢复)
|
||||||
|
// this.refreshHeroBoxSlots();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 英雄被出售事件回调:更新英雄数量 UI 并清空对应英雄信息盒 */
|
/** 英雄被出售事件回调:更新英雄数量 UI 并清空对应英雄信息盒 */
|
||||||
private onHeroSell() {
|
private onHeroSell() {
|
||||||
this.updateHeroNumUI(true, false);
|
this.updateHeroNumUI(true, false);
|
||||||
this.refreshHeroBoxSlots();
|
// 暂不启用 herobox 同步(后续可能恢复)
|
||||||
|
// this.refreshHeroBoxSlots();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -789,7 +793,8 @@ export class MissionCardComp extends CCComp {
|
|||||||
|
|
||||||
/** 英雄升级事件回调:刷新英雄信息盒显示 */
|
/** 英雄升级事件回调:刷新英雄信息盒显示 */
|
||||||
private onHeroLvUp() {
|
private onHeroLvUp() {
|
||||||
this.refreshHeroBoxSlots();
|
// 暂不启用 herobox 同步(后续可能恢复)
|
||||||
|
// this.refreshHeroBoxSlots();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 英雄面板空槽位点击回调:展示英雄卡池选择界面 */
|
/** 英雄面板空槽位点击回调:展示英雄卡池选择界面 */
|
||||||
@@ -1266,8 +1271,12 @@ export class MissionCardComp extends CCComp {
|
|||||||
* 3. 多余槽位清空数据并隐藏(默认全部隐藏,召唤一个激活一个)。
|
* 3. 多余槽位清空数据并隐藏(默认全部隐藏,召唤一个激活一个)。
|
||||||
*
|
*
|
||||||
* Why: 英雄召唤 / 死亡 / 卖出 / 升级后调用,保证面板与场上一一对应。
|
* Why: 英雄召唤 / 死亡 / 卖出 / 升级后调用,保证面板与场上一一对应。
|
||||||
|
*
|
||||||
|
* 备注:当前版本暂不启用 herobox 同步显示英雄信息(后续可能恢复),
|
||||||
|
* 方法体已整体注释,所有调用点也已注释。恢复时取消方法体与调用点注释。
|
||||||
*/
|
*/
|
||||||
private refreshHeroBoxSlots() {
|
private refreshHeroBoxSlots() {
|
||||||
|
/* 暂不启用 herobox 同步,保留实现备查
|
||||||
if (!this.herosBoxNode || !this.herosBoxNode.isValid) return;
|
if (!this.herosBoxNode || !this.herosBoxNode.isValid) return;
|
||||||
|
|
||||||
this.ensureHeroBoxSlots();
|
this.ensureHeroBoxSlots();
|
||||||
@@ -1298,6 +1307,7 @@ export class MissionCardComp extends CCComp {
|
|||||||
|
|
||||||
// 列表高度只按可见槽位(存活英雄数)计算,空槽位已隐藏不再占位
|
// 列表高度只按可见槽位(存活英雄数)计算,空槽位已隐藏不再占位
|
||||||
this.resizeListBox(this.herosBoxNode, actors.length);
|
this.resizeListBox(this.herosBoxNode, actors.length);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user