feat(技能): 支持英雄技能的多重触发
修改 Hero、Monster 和 HeroAtkSystem 中的技能触发逻辑,将 call、dead 等技能字段从单个 uuid 改为 uuid 数组,支持同时触发多个技能。同时更新 heroSet.ts 中的类型定义和英雄配置以匹配此变更。
This commit is contained in:
@@ -255,14 +255,16 @@ export class HeroAtkSystem extends ecs.ComblockSystem implements ecs.ISystemUpd
|
||||
|
||||
// 触发死亡技能
|
||||
const heroInfo = HeroInfo[TAttrsComp.hero_uuid];
|
||||
if (heroInfo && heroInfo.dead) {
|
||||
if (heroInfo && heroInfo.dead && heroInfo.dead.length > 0) {
|
||||
const view = entity.get(HeroViewComp);
|
||||
if (view) {
|
||||
oops.message.dispatchEvent(GameEvent.TriggerSkill, {
|
||||
s_uuid: heroInfo.dead,
|
||||
heroAttrs: TAttrsComp,
|
||||
heroView: view,
|
||||
triggerType: 'dead'
|
||||
heroInfo.dead.forEach((uuid: number) => {
|
||||
oops.message.dispatchEvent(GameEvent.TriggerSkill, {
|
||||
s_uuid: uuid,
|
||||
heroAttrs: TAttrsComp,
|
||||
heroView: view,
|
||||
triggerType: 'dead'
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user