fix: 修复技能属性引用问题并移除无用代码

- 在Skill.ts中修改Attrs为浅拷贝避免引用问题
- 移除HeroAtk.ts中未使用的casterModel变量
This commit is contained in:
2025-11-20 15:19:27 +08:00
parent 8113ec671f
commit ff4ce76482
2 changed files with 1 additions and 3 deletions

View File

@@ -105,8 +105,6 @@ export class HeroAtkSystem extends ecs.ComblockSystem implements ecs.ISystemUpd
// 获取攻击者数据
const caster = damageEvent.caster;
const casterModel = caster.ent.get(HeroAttrsComp);
if (!casterModel) return reDate;
// 获取技能配置
const skillConf = SkillSet[damageEvent.s_uuid];

View File

@@ -90,7 +90,7 @@ export class Skill extends ecs.Entity {
const sDataCom = this.get(SDataCom);
sDataCom.group=caster.box_group
sDataCom.caster=caster
sDataCom.Attrs=cAttrsComp.Attrs
sDataCom.Attrs={...cAttrsComp.Attrs}
sDataCom.s_uuid=s_uuid
sDataCom.fac=cAttrsComp.fac
}