refactor(MissionHeroComp): 删除无用的getFieldSkillTotalValue方法

This commit is contained in:
panw
2026-05-21 16:10:57 +08:00
parent f5c37d3634
commit c5f1fb9993

View File

@@ -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;
}
/**
* 从存活英雄中挑选可参与本次合成的英雄组。