fix: 修复技能属性引用问题并移除无用代码
- 在Skill.ts中修改Attrs为浅拷贝避免引用问题 - 移除HeroAtk.ts中未使用的casterModel变量
This commit is contained in:
@@ -105,8 +105,6 @@ export class HeroAtkSystem extends ecs.ComblockSystem implements ecs.ISystemUpd
|
|||||||
|
|
||||||
// 获取攻击者数据
|
// 获取攻击者数据
|
||||||
const caster = damageEvent.caster;
|
const caster = damageEvent.caster;
|
||||||
const casterModel = caster.ent.get(HeroAttrsComp);
|
|
||||||
if (!casterModel) return reDate;
|
|
||||||
|
|
||||||
// 获取技能配置
|
// 获取技能配置
|
||||||
const skillConf = SkillSet[damageEvent.s_uuid];
|
const skillConf = SkillSet[damageEvent.s_uuid];
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ export class Skill extends ecs.Entity {
|
|||||||
const sDataCom = this.get(SDataCom);
|
const sDataCom = this.get(SDataCom);
|
||||||
sDataCom.group=caster.box_group
|
sDataCom.group=caster.box_group
|
||||||
sDataCom.caster=caster
|
sDataCom.caster=caster
|
||||||
sDataCom.Attrs=cAttrsComp.Attrs
|
sDataCom.Attrs={...cAttrsComp.Attrs}
|
||||||
sDataCom.s_uuid=s_uuid
|
sDataCom.s_uuid=s_uuid
|
||||||
sDataCom.fac=cAttrsComp.fac
|
sDataCom.fac=cAttrsComp.fac
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user