refactor(skill): 移除未使用的caster引用以简化技能数据

清理SDataCom中未使用的caster属性及相关代码,减少内存占用并提升代码清晰度。技能逻辑仅依赖casterEid进行实体识别,移除冗余引用可避免潜在循环引用问题。
This commit is contained in:
panw
2026-03-18 10:22:12 +08:00
parent d2fbac11cd
commit e059c97670
3 changed files with 2 additions and 8 deletions

View File

@@ -1,6 +1,5 @@
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { BoxSet } from "../common/config/GameSet";
import { HeroViewComp } from "../hero/HeroViewComp";
/** 业务层对象 */
//技能数据
@@ -8,7 +7,6 @@ import { HeroViewComp } from "../hero/HeroViewComp";
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
@@ -22,7 +20,6 @@ export class SDataCom extends ecs.Comp {
this.group=BoxSet.HERO
this.fac=0
this.s_uuid=0
this.caster=null
this.casterEid = -1;
this.hit_count=0
this.max_hit_count=0