feat(技能系统): 添加施法者实体ID字段用于安全校验

在SDataCom组件中添加casterEid字段,并在Skill和SkillView中使用该字段替代原有的链式访问,提高代码安全性和可读性
This commit is contained in:
walkpan
2026-01-06 14:20:45 +08:00
parent a32aa5ad08
commit 31321a1a45
3 changed files with 4 additions and 1 deletions

View File

@@ -121,6 +121,7 @@ export class Skill extends ecs.Entity {
sDataCom.reset();
sDataCom.group=caster.box_group
sDataCom.caster=caster
sDataCom.casterEid=caster.ent.eid
sDataCom.Attrs={...cAttrsComp.Attrs}
sDataCom.s_uuid=s_uuid
sDataCom.fac=cAttrsComp.fac