perf: 增加技能对象池最大容量并优化伤害日志

将技能对象池最大容量从64提升至128,以支持更多并发技能实例。
将技能6008的结束类型从动画结束改为碰撞检测,提高准确性。
移除伤害计算中不必要的施法者属性获取和击杀计数更新,简化日志输出。
This commit is contained in:
panw
2026-03-18 10:37:25 +08:00
parent e059c97670
commit eff4154ba3
3 changed files with 4 additions and 10 deletions

View File

@@ -106,8 +106,6 @@ export class HeroAtkSystem extends ecs.ComblockSystem implements ecs.ISystemUpd
if (!TAttrsComp || TAttrsComp.is_dead || TAttrsComp.is_reviving) return reDate;
const casterEid = damageEvent.casterEid;
const caster = ecs.getEntityByEid(casterEid);
const CAttrsComp = caster?.get(HeroAttrsComp);
// 获取技能配置
const skillConf = SkillSet[damageEvent.s_uuid];
@@ -151,8 +149,7 @@ export class HeroAtkSystem extends ecs.ComblockSystem implements ecs.ISystemUpd
// targetView.back();
// }
const casterName = CAttrsComp?.hero_name || "未知";
mLogger.log(this.debugMode, 'HeroAtkSystem', ` 英雄${TAttrsComp.hero_name} (uuid: ${TAttrsComp.hero_uuid}) 受到 ${casterName}(eid: ${casterEid})的 伤害 ${damage},${isCrit?"暴击":"普通"}攻击,技能ID ${damageEvent.s_uuid}`);
mLogger.log(this.debugMode, 'HeroAtkSystem', ` 英雄${TAttrsComp.hero_name} (uuid: ${TAttrsComp.hero_uuid}) 受到 eid:${casterEid} 的 伤害 ${damage},${isCrit?"暴击":"普通"}攻击,技能ID ${damageEvent.s_uuid}`);
// 击退判定
// 使用施法者的击退概率属性damageEvent.Attrs 快照) - 被攻击者的控制抗性
@@ -180,9 +177,6 @@ export class HeroAtkSystem extends ecs.ComblockSystem implements ecs.ISystemUpd
return reDate;
}
// 增加被击杀计数
if (caster) CAttrsComp.killed_count++;
this.doDead(target);
// ✅ 触发死亡视图表现
if (targetView) {
@@ -444,4 +438,4 @@ export class HeroAtkSystem extends ecs.ComblockSystem implements ecs.ISystemUpd
}
}
}