feat(技能系统): 添加施法者实体ID字段用于安全校验
在SDataCom组件中添加casterEid字段,并在Skill和SkillView中使用该字段替代原有的链式访问,提高代码安全性和可读性
This commit is contained in:
@@ -9,6 +9,7 @@ export class SDataCom extends ecs.Comp {
|
||||
/** 业务层组件移除时,重置所有数据为默认值 */
|
||||
Attrs:any=null
|
||||
caster:HeroViewComp=null
|
||||
casterEid: number = -1; // 施法者实体ID,用于安全校验
|
||||
group:BoxSet=BoxSet.HERO
|
||||
fac: number = 0; // 0:hero 1:monster
|
||||
s_uuid:number=0
|
||||
@@ -21,6 +22,7 @@ export class SDataCom extends ecs.Comp {
|
||||
this.fac=0
|
||||
this.s_uuid=0
|
||||
this.caster=null
|
||||
this.casterEid = -1;
|
||||
this.hit_count=0
|
||||
this.ext_dmg=0
|
||||
this.dmg_ratio=1
|
||||
|
||||
Reference in New Issue
Block a user