diff --git a/assets/script/game/skill/SDataCom.ts b/assets/script/game/skill/SDataCom.ts index 7ac61a54..8249a632 100644 --- a/assets/script/game/skill/SDataCom.ts +++ b/assets/script/game/skill/SDataCom.ts @@ -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 diff --git a/assets/script/game/skill/Skill.ts b/assets/script/game/skill/Skill.ts index 85b97768..103c2af4 100644 --- a/assets/script/game/skill/Skill.ts +++ b/assets/script/game/skill/Skill.ts @@ -190,7 +190,6 @@ export class Skill extends ecs.Entity { } sDataCom.reset(); sDataCom.group=caster.box_group - sDataCom.caster=caster sDataCom.casterEid=caster.ent.eid sDataCom.Attrs = {}; const addCrt = config.crt ?? 0; diff --git a/assets/script/game/skill/SkillView.ts b/assets/script/game/skill/SkillView.ts index 02e23c76..eb02a365 100644 --- a/assets/script/game/skill/SkillView.ts +++ b/assets/script/game/skill/SkillView.ts @@ -67,11 +67,10 @@ export class SkillView extends CCComp { if (!this.node || !this.node.activeInHierarchy) return; const targetView = oCol.getComponent(HeroViewComp); if (this.debugMode) { - const casterName = this.sData.caster?.ent?.get(HeroAttrsComp)?.hero_name ?? '未知施法者'; const casterEid = this.sData.casterEid; const targetName = targetView?.ent?.get(HeroAttrsComp)?.hero_name ?? '非英雄对象'; const targetEid = targetView?.ent?.eid ?? '未知EID'; - mLogger.log(this.debugMode, 'SkillView', `[skillView] 碰撞1 [${this.sData.caster.box_group}][${casterName}][${casterEid}]的[${seCol.group}]:[${this.SConf.name}][${this.ent.eid}]碰撞了 [${oCol.group}]:[ ${targetName}][${targetEid}]`); + mLogger.log(this.debugMode, 'SkillView', `[skillView] 碰撞1 [${this.sData.group}][eid:${casterEid}]的[${seCol.group}]:[${this.SConf.name}][${this.ent.eid}]碰撞了 [${oCol.group}]:[${targetName}][${targetEid}]`); } if (oCol.group === seCol.group) return; if (this.pendingDisableCollider) return; @@ -130,9 +129,8 @@ export class SkillView extends CCComp { if (!this.sData) return; if (!this.SConf) return; if (this.debugMode) { - const casterName = this.sData.caster?.ent?.get(HeroAttrsComp)?.hero_name ?? "未知施法者"; const targetName = target.ent.get(HeroAttrsComp)?.hero_name ?? "未知目标"; - mLogger.log(this.debugMode, 'SkillView', `[skillView] 伤害 [${this.group}][${casterName}][${this.sData.casterEid}]的 [${this.SConf.name}]对 [${target.box_group}][ ${targetName}][${target.ent.eid}]`); + mLogger.log(this.debugMode, 'SkillView', `[skillView] 伤害 [${this.group}][eid:${this.sData.casterEid}]的 [${this.SConf.name}]对 [${target.box_group}][${targetName}][${target.ent.eid}]`); } // 使用伤害队列系统处理伤害 DamageQueueHelper.addDamageToEntity(