hch
4 天以前 7475947c2ab18c21973e2d796094f96e27b2929d
0312 武将羁绊
5个文件已修改
2个文件已删除
125 ■■■■■ 已修改文件
Main/System/Hero/HeroInfo.Awake.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Hero/HeroInfo.Break.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Hero/HeroInfo.Fetter.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroLVBreakSuccessWin.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroTrainWin.cs 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroTrainWinEx.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroTrainWinEx.cs.meta 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Hero/HeroInfo.Awake.cs
@@ -36,6 +36,8 @@
            for(int j = 0; j < tmpAwakeConfig.AttrIDList.Length; j++)
            {
                int id = tmpAwakeConfig.AttrIDList[j];
                if (id == 0)
                    continue;
                if (!breakAttrs.ContainsKey(id))
                {
                    breakAttrs.Add(id, tmpAwakeConfig.AttrValueList[j]);
@@ -49,6 +51,11 @@
            if (tmpAwakeConfig.SkillID != 0)
            {
                var skillConfig = SkillConfig.Get(tmpAwakeConfig.SkillID);
                if (skillConfig == null)
                {
                    Debug.LogError("觉醒技能配置错误" + tmpAwakeConfig.SkillID);
                    continue;
                }
                if (allSkillTypeIDToID.ContainsKey(skillConfig.SkillTypeID))
                {
                    var tmpSkillConfig = SkillConfig.Get(allSkillTypeIDToID[skillConfig.SkillTypeID]);
Main/System/Hero/HeroInfo.Break.cs
@@ -35,6 +35,8 @@
            for(int j = 0; j < tmpBreakConfig.AttrIDList.Length; j++)
            {
                int id = tmpBreakConfig.AttrIDList[j];
                if (id == 0)
                    continue;
                if (!breakAttrs.ContainsKey(id))
                {
                    breakAttrs.Add(id, tmpBreakConfig.AttrValueList[j]);
Main/System/Hero/HeroInfo.Fetter.cs
@@ -41,16 +41,16 @@
    }
    public int GetFetterAttrPer(int attrType)
    {
        if (PlayerPropertyConfig.baseAttr2perDict.ContainsKey(attrType))
        {
            var pertype = PlayerPropertyConfig.baseAttr2perDict[attrType];
            return fetterAttrs.ContainsKey(pertype) ? fetterAttrs[pertype] : 0;
        }
        return 0;
    {
        if (PlayerPropertyConfig.baseAttr2perDict.ContainsKey(attrType))
        {
            var pertype = PlayerPropertyConfig.baseAttr2perDict[attrType];
            return fetterAttrs.ContainsKey(pertype) ? fetterAttrs[pertype] : 0;
        }
        return 0;
    }
    public List<int> GetActiveFetter(HeroConfig config, TeamBase teamBase)
    {
        List<int> list = new List<int>();
@@ -82,4 +82,6 @@
        return list;
    }
}
Main/System/HeroUI/HeroLVBreakSuccessWin.cs
@@ -74,7 +74,10 @@
        List<string> attrStrArr = new List<string>();
        for (int i = 0; i < nextQualityBreakConfig.AttrIDList.Length; i++)
        {
            attrStrArr.Add(PlayerPropertyConfig.GetFullDescription(nextQualityBreakConfig.AttrIDList[i], nextQualityBreakConfig.AttrValueList[i]));
            var id = nextQualityBreakConfig.AttrIDList[i];
            if (id == 0)
                continue;
            attrStrArr.Add(PlayerPropertyConfig.GetFullDescription(id, nextQualityBreakConfig.AttrValueList[i]));
        }
        if (nextQualityBreakConfig.SkillID != 0)
        {
Main/System/HeroUI/HeroTrainWin.cs
@@ -7,7 +7,7 @@
/// <summary>
/// 武将培养界面
/// </summary>
public partial class HeroTrainWin : UIBase
public class HeroTrainWin : UIBase
{
    [SerializeField] Button showFuncBtn;    //只显示立绘时点击,显示功能
    [SerializeField] Transform funcForm;
@@ -39,6 +39,7 @@
    [SerializeField] Image countryImg;
    [SerializeField] Text awakeLVText;
    //属性区
    [SerializeField] Button attrBtn;
    [SerializeField] Image unfoldImg; //展开时按钮的图标
    [SerializeField] Image foldImg; //收起时按钮的图标
@@ -59,6 +60,10 @@
    [SerializeField] LongPressButton lvupBtn;
    [SerializeField] Button allAttrBtn;
    [SerializeField] Text allPotentialText; //潜能
    [SerializeField] Text[] fetterText;   //羁绊
    [SerializeField] Text[] fetterNameText;   //羁绊
    string guid;
    HeroInfo hero;
@@ -84,7 +89,7 @@
            ChangeHero(-1);
        });
        lockBtn.AddListener(()=> { hero.ChangeLockState(); });
        lockBtn.AddListener(() => { hero.ChangeLockState(); });
        resetBtn.AddListener(ResetBtnClick);
        deleteBtn.AddListener(DeleteHero);
        awakeBtn.AddListener(() =>
@@ -178,6 +183,7 @@
        RefreshFoldState();
        RefreshAttr();
        RefreshAllPotential();
        RefreshFetter();
    }
    void RefreshItemLockEvent(PackType type, string guid, bool lockState)
@@ -259,7 +265,7 @@
        {
            if (HeroUIManager.Instance.awakeRebirthCnt >= HeroUIManager.Instance.rebornAwakeHeroMaxCount)
            {
            {
                SysNotifyMgr.Instance.ShowTip("HeroRebornAwakeMax");
                return;
            }
@@ -293,7 +299,7 @@
        GameNetSystem.Instance.SendInfo(pack);
        HeroUIManager.Instance.lastFightPower = new KeyValuePair<string, long>(hero.itemHero.guid, hero.CalculatePower(false));
    }
    void DeleteHero()
@@ -484,13 +490,26 @@
            List<string> attrStrArr = new List<string>();
            for (int j = 0; j < nextQualityBreakConfig.AttrIDList.Length; j++)
            {
                if (nextQualityBreakConfig.AttrIDList[j] == 0)
                    continue;
                string format = i < hero.breakLevel ? "{0}" + UIHelper.AppendColor(TextColType.Green, "+{1}") : "{0}+{1}";
                attrStrArr.Add(PlayerPropertyConfig.GetFullDescription(nextQualityBreakConfig.AttrIDList[j], nextQualityBreakConfig.AttrValueList[j], format));
            }
            if (nextQualityBreakConfig.SkillID != 0)
            {
                attrStrArr.Add(SkillConfig.Get(nextQualityBreakConfig.SkillID)?.Description);
                var skill = SkillConfig.Get(nextQualityBreakConfig.SkillID);
                if (skill != null)
                {
                    attrStrArr.Add(skill.Description);
                }
                else
                {
                    Debug.LogError("未配置技能" + nextQualityBreakConfig.SkillID);
                }
            }
            if (i < hero.breakLevel)
            {
                allAttrStr += Language.Get("herocard63", i + 1, string.Join(Language.Get("L1112"), attrStrArr)) + "\n";
@@ -506,5 +525,45 @@
    }
    //羁绊
    void RefreshFetter()
    {
        for (int i = 0; i < fetterText.Length; i++)
        {
            if (i < hero.heroConfig.FetterIDList.Length)
            {
                fetterText[i].SetActive(true);
                var fetterID = hero.heroConfig.FetterIDList[i];
                HeroFetterConfig fetterConfig = HeroFetterConfig.Get(fetterID);
                List<string> heroNames = new List<string>();
                bool isAllCollect = true; //是否全收集
                foreach (var tmpHeroID in fetterConfig.HeroIDList)
                {
                    heroNames.Add(HeroConfig.Get(tmpHeroID).Name);
                    if (HeroManager.Instance.GetHeroCountByID(tmpHeroID) == 0)
                    {
                        isAllCollect = false;
                    }
                }
                var attrStr = string.Join(Language.Get("SplitString1"), heroNames) + Language.Get("herocard38");
                for (int j = 0; j < fetterConfig.AttrIDList.Length; j++)
                {
                    string format = !isAllCollect ? "{0}+{1}" : "{0}+" + UIHelper.AppendColor(TextColType.Green, "{1}");
                    attrStr += Language.Get("L1112") + PlayerPropertyConfig.GetFullDescription(fetterConfig.AttrIDList[j], fetterConfig.AttrValueList[j], format);
                }
                fetterText[i].text = attrStr;
                fetterText[i].color = UIHelper.GetUIColor(isAllCollect ? TextColType.NavyBrown : TextColType.Gray);
                fetterNameText[i].text = fetterConfig.FetterName;
                fetterNameText[i].color = UIHelper.GetUIColor(isAllCollect ? TextColType.NavyBrown : TextColType.Gray);
            }
            else
            {
                fetterText[i].SetActive(false);
            }
        }
    }
}
Main/System/HeroUI/HeroTrainWinEx.cs
File was deleted
Main/System/HeroUI/HeroTrainWinEx.cs.meta
File was deleted