少年修仙传客户端代码仓库
client_linchunjie
2019-07-16 030058dadffe903292d9aa72f00c6cce09f12da9
4494 【BUG】【主干】符印tips显示错误
2个文件已修改
29 ■■■■■ 已修改文件
System/ItemTip/TipItemDescriptionWidget.cs 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Rune/RuneModel.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/ItemTip/TipItemDescriptionWidget.cs
@@ -5,7 +5,9 @@
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
using System.Text;
using System.Collections.Generic;
namespace Snxxz.UI
{
@@ -16,6 +18,7 @@
        [SerializeField] Text m_UseState;
        ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
        RuneModel runeModel { get { return ModelCenter.Instance.GetModel<RuneModel>(); } }
        public void Display(int itemId)
        {
@@ -36,6 +39,28 @@
                var shareNumDes = tipsModel.GetShareNumItemDes(itemId);
                description = description.Replace("{ShareNum}", shareNumDes);
            }
            if (description.Contains("{Rune}"))
            {
                var unlockRunes = runeModel.GetUnlockRunes();
                List<int> runeTypes = new List<int>();
                var sb = new StringBuilder();
                for (int i = 0; i < unlockRunes.Count; i++)
                {
                    var itemConfig = ItemConfig.Get(unlockRunes[i]);
                    var runeConfig = RuneConfig.Get(unlockRunes[i]);
                    if (runeTypes.Contains(runeConfig.AttrType[0]))
                    {
                        continue;
                    }
                    runeTypes.Add(runeConfig.AttrType[0]);
                    if (itemConfig != null)
                    {
                        sb.Append(itemConfig.ItemName);
                        sb.Append("\n");
                    }
                }
                description = description.Replace("{Rune}", sb.ToString());
            }
            m_Description.text = description;
        }
System/Rune/RuneModel.cs
@@ -424,7 +424,7 @@
            {
                if (passRuneTowerFloor >= config.TowerID
                    && config.AttrType.Length == 1
                    && ids.Contains(config.ID))
                    && !ids.Contains(config.ID))
                {
                    ids.Add(config.ID);
                }