From c5f1fb99939ead220ee8b38839a578bee848c01a Mon Sep 17 00:00:00 2001 From: panw Date: Thu, 21 May 2026 16:10:57 +0800 Subject: [PATCH] =?UTF-8?q?refactor(MissionHeroComp):=20=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=97=A0=E7=94=A8=E7=9A=84getFieldSkillTotalValue=E6=96=B9?= =?UTF-8?q?=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/script/game/map/MissionHeroComp.ts | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/assets/script/game/map/MissionHeroComp.ts b/assets/script/game/map/MissionHeroComp.ts index 91a08e84..97ebc19c 100644 --- a/assets/script/game/map/MissionHeroComp.ts +++ b/assets/script/game/map/MissionHeroComp.ts @@ -292,25 +292,7 @@ export class MissionHeroComp extends CCComp { return heroes; } - /** 获取指定驻场技能类型的总加成值(只计算存活的英雄) */ - public getFieldSkillTotalValue(type: FieldSkillType): number { - let total = 0; - const heroes = this.getAllHeroes(); - for (const hero of heroes) { - const model = hero.get(HeroAttrsComp); - if (!model || model.is_dead) continue; - const heroConfig = HeroInfo[model.hero_uuid]; - if (heroConfig && heroConfig.field) { - for (const skillUuid of heroConfig.field) { - const skillConfig = FieldSkillSet[skillUuid]; - if (skillConfig && skillConfig.type === type) { - total += skillConfig.value; - } - } - } - } - return total; - } + /** * 从存活英雄中挑选可参与本次合成的英雄组。