hch
2025-11-25 f9f2711f44e45021b4d69ca701bd25704578eef4
Main/System/Hero/HeroInfo.cs
@@ -1,6 +1,7 @@
using System.Collections.Generic;
using UnityEngine;
using LitJson;
using System;
//  武将信息:实际获得的武将,不包含图鉴数据
public partial class HeroInfo
@@ -159,7 +160,7 @@
        }
        return fightPower;
    }
    public void ChangeLockState()
    {
@@ -169,4 +170,29 @@
        GameNetSystem.Instance.SendInfo(pack);
    }
   public int GetHeroLVValue(int attrType)
   {
      var lvConfig = HeroQualityLVConfig.GetQualityLVConfig(Quality, heroLevel);
      var index = Array.IndexOf(lvConfig.AttrIDList, attrType);
      if (index == -1)
         return 0;
      return lvConfig.AttrValueList[index];
   }
   public int GetHeroLVPer(int attrType)
   {
      var _type = 0;
      if (PlayerPropertyConfig.baseAttr2perDict.ContainsKey(attrType))
      {
         _type = PlayerPropertyConfig.baseAttr2perDict[attrType];
      }
      var lvConfig = HeroQualityLVConfig.GetQualityLVConfig(Quality, heroLevel);
      var index = Array.IndexOf(lvConfig.AttrIDList, _type);
      if (index == -1)
         return 0;
      return lvConfig.AttrValueList[index];
    }
}