少年修仙传客户端代码仓库
client_Hale
2019-10-21 f3b2449efb879a7495c857b044f0ff0cedb6d21e
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
7个文件已修改
2个文件已添加
183 ■■■■■ 已修改文件
System/ItemTip/EquipTipWin.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/ItemTip/ItemTipUtility.cs 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/ItemTip/TipShenPropertyWidget.cs 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/ItemTip/TipShenPropertyWidget.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/ItemLogicUtility.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/LegendPropertyUtility.cs 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/ShenPropertyUtility.cs 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Message/HrefAnalysis.cs 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Vip/DayPackageItemBehaviour.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/ItemTip/EquipTipWin.cs
@@ -123,6 +123,7 @@
            public LayoutElementSizeClamp sizeClamp;
            public TipEquipBaseInfoWidget baseInfoWidget;
            public TipBasePropertyWidget basePropertyWidget;
            public TipShenPropertyWidget shenPropertyWidget;
            public TipLegendPropertyWidget legendPropertyWidget;
            public TipSkillInfoWidget skillInfoWidget;
            public TipSuitBriefWidget suitBriefWidget;
@@ -172,6 +173,14 @@
                    basePropertyWidget.Display(data.baseProperty);
                }
                //神装属性
                var hasShenProperty = !data.shenProperty.properties.IsNullOrEmpty();
                shenPropertyWidget.gameObject.SetActive(hasShenProperty);
                if (hasShenProperty)
                {
                    shenPropertyWidget.Display(data.shenProperty);
                }
                var hasLegendProperty = !data.legendProperty.properties.IsNullOrEmpty();
                legendPropertyWidget.gameObject.SetActive(hasLegendProperty);
                if (hasLegendProperty)
System/ItemTip/ItemTipUtility.cs
@@ -36,6 +36,7 @@
            public BaseProperty baseProperty;
            public BaseProperty petMountBaseProperty;
            public SpiritWeaponProperty spiritWeaponProperty;
            public ShenProperty shenProperty;
            public LegendProperty legendProperty;
            public SkillInfo skillInfo;
            public SuitInfo suitInfo;
@@ -511,6 +512,7 @@
                gemInfo = GetGemInfo(guid),
                trainProperty = GetTrainProperty(guid),
                operates = operatable ? GetOperates(guid) : null,
                shenProperty = GetShenProperty(item.itemId)
            };
        }
@@ -529,7 +531,8 @@
                suitInfo = GetSuitInfo(itemId),
                gemInfo = GetGemInfo(itemId),
                starInfo = GetStarInfo(itemId),
                getWay = GetGetWay(itemId)
                getWay = GetGetWay(itemId),
                shenProperty = GetShenProperty(itemId)
            };
        }
@@ -714,6 +717,7 @@
                strengthenProperty = strengthenProperty,
                gemInfo = gemInfo,
                trainProperty = trainProperty,
                shenProperty = GetShenProperty(info.itemId)
            };
        }
@@ -733,7 +737,8 @@
                suitInfo = GetSuitInfo(itemId),
                gemInfo = GetGemInfo(itemId),
                starInfo = GetStarInfo(itemId),
                operates = GetGoodOperates(goodId)
                operates = GetGoodOperates(goodId),
                shenProperty = GetShenProperty(itemId)
            };
        }
@@ -786,6 +791,7 @@
                petMountBaseProperty = GetPetMountBaseProperty(item.itemId),
                operates = operatable ? GetOperates(guid) : null,
                refineMaterials = GetWingRefineMaterials(guid),
                shenProperty = GetShenProperty(item.itemId)
            };
        }
@@ -801,6 +807,7 @@
                legendProperty = GetLegendProperty(itemId),
                petMountBaseProperty = GetPetMountBaseProperty(itemId),
                getWay = GetGetWay(itemId),
                shenProperty = GetShenProperty(itemId)
            };
        }
@@ -816,6 +823,7 @@
                spiritWeaponProperty = GetSpiritWeaponProperty(itemId),
                petMountBaseProperty = GetPetMountBaseProperty(itemId),
                operates = GetGoodOperates(goodId),
                shenProperty = GetShenProperty(itemId)
            };
        }
@@ -1145,7 +1153,7 @@
            var config = ItemConfig.Get(itemId);
            data.properties = ShenPropertyUtility.GetEquipProperties(itemId);
            data.properties = ShenPropertyUtility.GetEquipShenProperties(itemId);
            return data;
@@ -1175,6 +1183,15 @@
            {
                data.trueCount = LegendPropertyUtility.GetEquipPropertyCount(itemId);
                data.properties = LegendPropertyUtility.GetEquipProperties(itemId);
                if (data.properties == null)
                {
                    data.properties = LegendPropertyUtility.GetLegendProFromEquipShen(itemId);
                    if (data.properties != null)
                    {
                        data.trueCount = 0;
                        data.isPreview = false;
                    }
                }
            }
            return data;
System/ItemTip/TipShenPropertyWidget.cs
New file
@@ -0,0 +1,37 @@
//--------------------------------------------------------
//    [Author]:           第二世界
//    [  Date ]:           Tuesday, March 12, 2019
//--------------------------------------------------------
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;
namespace Snxxz.UI
{
    public class TipShenPropertyWidget : MonoBehaviour
    {
        [SerializeField] Text m_PropertyBehaviours;
        public void Display(ItemTipUtility.ShenProperty data)
        {
            var count = data.properties.Count;
            var lines = new List<string>();
            for (int i = 0; i < count; i++)
            {
                var property = data.properties[i];
                string shenText = Language.Get("ShenEquipText" + property.z);
                lines.Add(UIHelper.AppendColor(5, shenText + PlayerPropertyConfig.GetFullDescription(property.x, property.y)));
            }
            m_PropertyBehaviours.text = string.Join("\r\n", lines.ToArray());
        }
    }
}
System/ItemTip/TipShenPropertyWidget.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 0536b99051bae5946afd08a7676d66e8
timeCreated: 1571500535
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/KnapSack/Logic/ItemLogicUtility.cs
@@ -270,11 +270,28 @@
        private Dictionary<int, int> GetEquipLegendProperties(int itemId)
        {
            var legendProperties = LegendPropertyUtility.GetEquipProperties(itemId);
            var legendProperties = LegendPropertyUtility.GetLegendProFromEquipShen(itemId);
            if (legendProperties == null)
                legendProperties = LegendPropertyUtility.GetEquipProperties(itemId);
            var properties = new Dictionary<int, int>();
            if (legendProperties != null)
            {
                foreach (var item in legendProperties)
                {
                    properties[item.x] = item.y;
                }
            }
            return properties;
        }
        private Dictionary<int, int> GetEquipShenProperties(int itemId)
        {
            var shenProperties = ShenPropertyUtility.GetEquipShenProperties(itemId);
            var properties = new Dictionary<int, int>();
            if (shenProperties != null)
            {
                foreach (var item in shenProperties)
                {
                    properties[item.x] = item.y;
                }
@@ -307,6 +324,8 @@
                return 0;
            }
            properties.AddRange(GetEquipShenProperties(itemId));
            var minAttack = properties.ContainsKey((int)PropertyType.MinAtk) ? properties[(int)PropertyType.MinAtk] : 0;
            var maxAttack = properties.ContainsKey((int)PropertyType.MaxAtk) ? properties[(int)PropertyType.MaxAtk] : 0;
            var attack = properties.ContainsKey((int)PropertyType.ATK) ? properties[(int)PropertyType.ATK] : 0;
System/KnapSack/Logic/LegendPropertyUtility.cs
@@ -21,13 +21,13 @@
        var legendPropertyConfig = LegendPropertyValueConfig.Get(config.Type, config.LV, config.ItemColor, config.SuiteiD != 0, config.StarLevel);
        if (legendPropertyConfig == null)
        {
            return GetLegendProFromEquipShen(itemId);
            return null;
        }
        return new List<Int2>(legendPropertyConfig.previewValue);
    }
    private static List<Int2> GetLegendProFromEquipShen(int itemId)
    public static List<Int2> GetLegendProFromEquipShen(int itemId)
    {
        var shenConfig = EquipShenAttrConfig.Get(itemId);
        if (shenConfig == null)
System/KnapSack/Logic/ShenPropertyUtility.cs
@@ -10,42 +10,50 @@
    {
    }
    public static List<Int3> GetEquipProperties(int itemId)
    public static List<Int3> GetEquipShenProperties(int itemId)
    {
        var config = ItemConfig.Get(itemId);
        if (config == null)
        var shenConfig = EquipShenAttrConfig.Get(itemId);
        if (shenConfig == null)
        {
            return null;
        }
        var legendPropertyConfig = LegendPropertyValueConfig.Get(config.Type, config.LV, config.ItemColor, config.SuiteiD != 0, config.StarLevel);
        if (legendPropertyConfig == null)
        var pro = new Int3[shenConfig.ShenAttrID.Length + shenConfig.XianAttrID.Length + shenConfig.JiAttrID.Length];
        int count = 0;
        for (int i = 0; i < shenConfig.ShenAttrID.Length; i++)
        {
            return null;
            pro[i].x = shenConfig.ShenAttrID[i];
            pro[i].y = shenConfig.ShenAttrValue[i];
            pro[i].z = 1;
            count++;
        }
        //return new List<Int2>(legendPropertyConfig.previewValue);
        return null;
        for (int i = 0; i < shenConfig.XianAttrID.Length; i++)
        {
            pro[count].x = shenConfig.XianAttrID[i];
            pro[count].y = shenConfig.XianAttrValue[i];
            pro[count].z = 2;
            count++;
        }
        for (int i = 0; i < shenConfig.JiAttrID.Length; i++)
        {
            pro[count].x = shenConfig.JiAttrID[i];
            pro[count].y = shenConfig.JiAttrValue[i];
            pro[count].z = 3;
            count++;
        }
        return new List<Int3>(pro);
    }
    public static int GetEquipPropertyCount(int itemId)
    {
        var config = ItemConfig.Get(itemId);
        if (config == null)
        {
            return 0;
        }
        var legendPropertyConfig = LegendPropertyValueConfig.Get(config.Type, config.LV, config.ItemColor, config.SuiteiD != 0, config.StarLevel);
        if (legendPropertyConfig == null)
        {
            return 0;
        }
        return legendPropertyConfig.propertyCount;
    }
}
System/Message/HrefAnalysis.cs
@@ -307,8 +307,8 @@
        }
    }
    public static Regex EquipRegex = new Regex(@"\[([\u4e00-\u9fa5a-zA-Z0-9\|'_\(\)()\. ::]+?)\]", RegexOptions.Singleline);
    public static Regex EquipDetailRegex = new Regex("#item#([\u4e00-\u9fa5a-zA-Z0-9\\|'_\\(\\)()\\. ::\\,\\[\\]a-zA-Z\"\\{\\}-]+?)#item#", RegexOptions.Singleline);
    public static Regex EquipRegex = new Regex(@"\[([\u4e00-\u9fa5a-zA-Z0-9\|'_\(\)()\*. ::]+?)\]", RegexOptions.Singleline);
    public static Regex EquipDetailRegex = new Regex("#item#([\u4e00-\u9fa5a-zA-Z0-9\\|'_\\(\\)()\\*\\. ::\\,\\[\\]a-zA-Z\"\\{\\}-]+?)#item#", RegexOptions.Singleline);
    public bool ExcuteHrefEvent(string msg, int index = 0, bool fromAutoTask = false)
    {
System/Vip/DayPackageItemBehaviour.cs
@@ -15,6 +15,8 @@
        [SerializeField] Image m_OpenRedpoint;
        [SerializeField] Image m_CloseRedpoint;
        [SerializeField] Button m_Select;
        [SerializeField] Image m_OpenFree;
        [SerializeField] Image m_CloseFree;
        DayPackageItemClassModel model
        {
@@ -53,8 +55,23 @@
            if (index < model.recordIDs.Length)
            {
                if (model.GetDayGift(index).money != 0)
                {
                    m_OpenFree.SetActive(false);
                    m_CloseFree.SetActive(false);
                    m_MoneyClose.gameObject.SetActive(true);
                    m_MoneyOpen.gameObject.SetActive(true);
                }
                else
                {
                    m_MoneyClose.gameObject.SetActive(false);
                    m_MoneyOpen.gameObject.SetActive(false);
                    m_OpenFree.SetActive(true);
                    m_CloseFree.SetActive(true);
                }
                m_MoneyClose.text = model.GetDayGift(index).money.ToString();
                m_MoneyOpen.text = model.GetDayGift(index).money.ToString();
                DisplayRedpoint(index);
                DisplaySelect();
            }