fix: 修复天赋属性加成不生效及全局数据同步问题
修复 TalComp 中永久属性加成类型转换错误,导致天赋属性未正确应用 在 HeroAttrsComp 中添加属性变化后的全局数据同步调用 在 SingletonModuleComp 中确保英雄数据更新后触发 VM 响应 添加 GlobalAttrChange 事件枚举用于后续属性变更监听
This commit is contained in:
@@ -104,6 +104,7 @@ export class HeroAttrsComp extends ecs.Comp {
|
||||
chance: 1, // 必中
|
||||
};
|
||||
this.addBuff(buffConf);
|
||||
smc.updateHeroInfo(this); // 确保同步到全局数据
|
||||
oops.gui.toast(attrCard.desc);
|
||||
}
|
||||
}
|
||||
@@ -306,6 +307,7 @@ export class HeroAttrsComp extends ecs.Comp {
|
||||
|
||||
// 重新计算受影响的属性
|
||||
this.recalculateSingleAttr(attrIndex);
|
||||
smc.updateHeroInfo(this); // 确保同步到全局数据
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user