hch
2025-08-02 0b72d489d989007a827c1f8ca33248441a6e85f9
Main/System/Hero/HeroInfo.Fetter.cs
@@ -1,21 +1,44 @@
using System.Collections.Generic;
using System.Linq;
public partial class HeroInfo
{
   //  羁绊配置
    public HeroFetterConfig fetterConfig;
   public HeroFetterConfig fetterConfig;
   protected int GetIFByInheritFetterPercent(HeroAttrType attrType)
   public List<int> GetActiveFetter(HeroConfig config, TeamBase teamBase)
   {
      //   YYL TODO
      int total = 0;
      for (int i = 0; i < fetterInfoList.Count; i++)
      {
         HeroFetterInfo fetterInfo = fetterInfoList[i];
         total += fetterInfo.GetFetterAttr(attrType);
      }
      return total;
   }
      List<int> list = new List<int>();
      if (config.FetterIDList.Length == 0)
         return list;
      foreach (var fetterID in config.FetterIDList)
      {
         HeroFetterConfig fetterConfig = HeroFetterConfig.Get(fetterID);
         int count = 0;
         for (int i = 0; i < teamBase.tempHeroes.Length; i++)
         {
            TeamHero teamHero = teamBase.tempHeroes[i];
            if (null == teamHero)
               continue;
            if (fetterConfig.HeroIDList.Contains(teamHero.heroId))
            {
               count++;
            }
            if (count >= fetterConfig.HeroIDList.Length)
            {
               list.Add(fetterID);
               break;
            }
         }
      }
      return list;
   }
}