少年修仙传客户端代码仓库
Client_PangDeRong
2018-10-11 61961728df4cd0bfb6eef005d5f44cf77e739bda
2120  神兽装备对比tips显示错误
1个文件已修改
71 ■■■■■ 已修改文件
System/KnapSack/Logic/ItemTipsModel.cs 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/ItemTipsModel.cs
@@ -1093,6 +1093,70 @@
            return s;
        }
        private string SetGodEquipBasicAttr(ItemAttrData attrData)
        {
            if (attrData == null)
                return "";
            Dictionary<int, int> itemEffectDict = SetItemEffectDict(attrData.itemConfig);
            attrSB.Length = 0;
            string atkStr = "";
            string otherStr = "";
            foreach (var key in itemEffectDict.Keys)
            {
                PlayerPropertyConfig playerProModel = Config.Instance.Get<PlayerPropertyConfig>(key);
                if (playerProModel != null)
                {
                    if (key == (int)AttrEnum.MinAtk)
                    {
                        playerProModel = Config.Instance.Get<PlayerPropertyConfig>((int)AttrEnum.ATK);
                        atkStr = StringUtility.Contact(playerProModel.Name, ":", GetProValueTypeStr(playerProModel, itemEffectDict[key]));
                    }
                    else if (key == (int)AttrEnum.MaxAtk)
                    {
                        playerProModel = Config.Instance.Get<PlayerPropertyConfig>((int)AttrEnum.ATK);
                        atkStr = StringUtility.Contact(atkStr, "-", GetProValueTypeStr(playerProModel, itemEffectDict[key]));
                        if (attrData.strengthDataDict != null)
                        {
                            if (attrData.strengthDataDict.ContainsKey((int)AttrEnum.ATK))
                            {
                                atkStr = StringUtility.Contact(atkStr, Language.Get("KnapS116", GetProValueTypeStr(playerProModel, attrData.strengthDataDict[(int)AttrEnum.ATK])));
                            }
                        }
                        if (attrSB.Length <= 0)
                        {
                            attrSB.Append(atkStr);
                        }
                        else
                        {
                            attrSB.Append("\n" + atkStr);
                        }
                    }
                    else
                    {
                        otherStr = StringUtility.Contact(playerProModel.Name, ":", GetProValueTypeStr(playerProModel, itemEffectDict[key]));
                        if (attrData.strengthDataDict != null)
                        {
                            if (attrData.strengthDataDict.ContainsKey(key))
                            {
                                otherStr = StringUtility.Contact(otherStr, Language.Get("KnapS116", GetProValueTypeStr(playerProModel, attrData.strengthDataDict[key])));
                            }
                        }
                        if (attrSB.Length <= 0)
                        {
                            attrSB.Append(otherStr);
                        }
                        else
                        {
                            attrSB.Append("\n" + otherStr);
                        }
                    }
                }
            }
            return attrSB.ToString();
        }
        #endregion
        #region 设置传奇属性
@@ -2023,11 +2087,16 @@
            if(type == PackType.rptDogzEquip || type == PackType.rptDogzItem)
            {
                strengthDataDict = new Dictionary<int, int>();
                if (GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus) != null)
                {
                    StrengthLV = GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus)[0];
                }
                strengthDataDict = beastModel.SiteEnhancementAttribute(type,index);
                Dictionary<int,int> getStregthDict = beastModel.SiteEnhancementAttribute(type,index);
                foreach(var key in getStregthDict.Keys)
                {
                    strengthDataDict.Add(key,getStregthDict[key]);
                }
            }
            SetWinType();