少年修仙传客户端代码仓库
client_linchunjie
2019-06-28 a56e96646de13dbc2d36c7532d54f988e8d259d7
7635 【前端】【2.0.100】仙盟心法显示
1个文件已修改
70 ■■■■■ 已修改文件
System/FairyAu/MethodToWin.cs 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FairyAu/MethodToWin.cs
@@ -8,7 +8,7 @@
using System;
namespace Snxxz.UI
{
    public class MethodToWin : Window ,SecondWindowInterface
    public class MethodToWin : Window, SecondWindowInterface
    {
        //心法
        [SerializeField] ScrollerController m_ScrollerController;
@@ -31,7 +31,7 @@
        Dictionary<int, string> _dicFamilyIcon;//心法Icon
        Dictionary<int, string> _dicFamilyName;//心法名
        private  AchievementGuideEffect AchievementGuideEffect1;
        private AchievementGuideEffect AchievementGuideEffect1;
        enum BasicAttribute
        {
            BasicsAttack = 1,//基础攻击
@@ -44,31 +44,42 @@
        }
        public void Basic_Attribute(int id)
        {
            var config = FamilyTechConfig.Get(id * 1000 + 1);
            if (config == null)
            {
                return;
            }
            var propertyConfig = PlayerPropertyConfig.Get(config.attrType);
            switch ((BasicAttribute)id)
            {
                case BasicAttribute.BasicsAttack:
                    m_PrimaryAttribute.text = string.Format(Language.Get("MethodTo_C"), PlayerDatas.Instance.baseData.BasicsMaxAttack);
                    m_PrimaryAttribute.text = Language.Get("MethodTo_C", propertyConfig.ISPercentage == 0 ? UIHelper.GetPropertyValue((PropertyType)config.attrType)
                        : PlayerDatas.Instance.baseData.BasicsMaxAttack);
                    break;
                case BasicAttribute.BasicsLife:
                    m_PrimaryAttribute.text = string.Format(Language.Get("MethodTo_D"), PlayerDatas.Instance.baseData.BasicsLife);
                    m_PrimaryAttribute.text = Language.Get("MethodTo_D", propertyConfig.ISPercentage == 0 ? UIHelper.GetPropertyValue((PropertyType)config.attrType) :
                        PlayerDatas.Instance.baseData.BasicsLife);
                    break;
                case BasicAttribute.BasicsDefense:
                    m_PrimaryAttribute.text = string.Format(Language.Get("MethodTo_E"), PlayerDatas.Instance.baseData.BasicsDefense);
                    m_PrimaryAttribute.text = Language.Get("MethodTo_E", propertyConfig.ISPercentage == 0 ? UIHelper.GetPropertyValue((PropertyType)config.attrType) :
                        PlayerDatas.Instance.baseData.BasicsDefense);
                    break;
                case BasicAttribute.BasicsScoreAHit:
                    m_PrimaryAttribute.text = string.Format(Language.Get("MethodTo_F"), PlayerDatas.Instance.baseData.BasicsScoreAHit);
                    m_PrimaryAttribute.text = Language.Get("MethodTo_F", propertyConfig.ISPercentage == 0 ? UIHelper.GetPropertyValue((PropertyType)config.attrType) :
                        PlayerDatas.Instance.baseData.BasicsScoreAHit);
                    break;
                case BasicAttribute.BasicsDodge:
                    m_PrimaryAttribute.text = string.Format(Language.Get("MethodTo_G"), PlayerDatas.Instance.baseData.BasicsDodge);
                    m_PrimaryAttribute.text = Language.Get("MethodTo_G", propertyConfig.ISPercentage == 0 ? UIHelper.GetPropertyValue((PropertyType)config.attrType) :
                        PlayerDatas.Instance.baseData.BasicsDodge);
                    break;
                case BasicAttribute.Hurt:
                    m_PrimaryAttribute.text = string.Format(Language.Get("MethodTo_H"), PlayerDatas.Instance.extersion.realATK);
                    m_PrimaryAttribute.text = Language.Get("MethodTo_H", propertyConfig.ISPercentage == 0 ? UIHelper.GetPropertyValue((PropertyType)config.attrType) :
                        PlayerDatas.Instance.extersion.realATK);
                    break;
                case BasicAttribute.Resistance:
                    m_PrimaryAttribute.text = string.Format(Language.Get("MethodTo_I"), PlayerDatas.Instance.extersion.realDEF);
                    m_PrimaryAttribute.text = Language.Get("MethodTo_I", propertyConfig.ISPercentage == 0 ? UIHelper.GetPropertyValue((PropertyType)config.attrType) :
                        PlayerDatas.Instance.extersion.realDEF);
                    break;
            }
        }
@@ -139,8 +150,11 @@
                    m_ScrollerController.m_Scorller.RefreshActiveCellViews();
                    break;
                default:
                    if (indexID != -1)
                    {
                        Basic_Attribute(indexID);
                    }
                    break;
            }
        }
@@ -149,7 +163,7 @@
            foreach (int key in method._DicSkill.Keys)
            {
                if (method.MethodRedPointBtnDic.ContainsKey(key))
                {
                {
                    if (method.MethodRedPointBtnDic[key].state == RedPointState.Simple)
                    {
                        indexID = key;
@@ -258,22 +272,28 @@
            {
                _SkillLevelText.text = _dicFamilyName[id] + method._DicSkill[id].SkillLV.ToString() + Language.Get("Z1041");
                var configFamilyNow = FamilyTechConfig.Get(method._DicSkill[id].SkillID);
                var propertyConfig = PlayerPropertyConfig.Get(configFamilyNow.attrType);
                if (configFamilyTech != null)
                {
                    _attrValue = configFamilyTech.attrType;
                    m_LowerCurrentAttribute.text = string.Format(Language.Get("MethodTo_A"), PlayerPropertyConfig.Get(_attrValue.ToString()).Name, UIHelper.ReplacePercentage(configFamilyNow.attrValue, 1));
                    m_LowerCurrentAttribute.text = string.Format(Language.Get("MethodTo_A"),
                        propertyConfig.Name, UIHelper.ReplacePercentage(configFamilyNow.attrValue, propertyConfig.ISPercentage) +
                        (propertyConfig.ISPercentage == 1 ? "%" : string.Empty));
                }
                else
                {
                    var configFamilyTechMax = FamilyTechConfig.Get(method._DicSkill[id].SkillID);
                    int _attrValueMax = configFamilyTechMax.attrType;
                    m_LowerCurrentAttribute.text = string.Format(Language.Get("MethodTo_A"), PlayerPropertyConfig.Get(_attrValueMax.ToString()).Name, UIHelper.ReplacePercentage(configFamilyNow.attrValue, 1));
                    m_LowerCurrentAttribute.text = string.Format(Language.Get("MethodTo_A"),
                        propertyConfig.Name, UIHelper.ReplacePercentage(configFamilyNow.attrValue, propertyConfig.ISPercentage) +
                        (propertyConfig.ISPercentage == 1 ? "%" : string.Empty));
                }
                if (configFamilyTech != null)
                {
                    m_Properties.text = string.Format(Language.Get("MethodTo_B"), PlayerPropertyConfig.Get(_attrValue.ToString()).Name, UIHelper.ReplacePercentage(configFamilyTech.attrValue, 1));
                    m_Properties.text = string.Format(Language.Get("MethodTo_B"),
                        propertyConfig.Name, UIHelper.ReplacePercentage(configFamilyTech.attrValue, propertyConfig.ISPercentage) +
                        (propertyConfig.ISPercentage == 1 ? "%" : string.Empty));
                }
                else
                {
@@ -302,10 +322,14 @@
            else
            {
                _SkillLevelText.text = _dicFamilyName[id] + (method._DicSkill[id].SkillLV + 1).ToString() + Language.Get("Z1041");
                int _attrValue1 = configFamilyTechOne.attrType;
                m_LowerCurrentAttribute.text = string.Format(Language.Get("MethodTo_A"), PlayerPropertyConfig.Get(_attrValue1.ToString()).Name, UIHelper.ReplacePercentage(0, 1));
                var propertyConfig = PlayerPropertyConfig.Get(configFamilyTechOne.attrType);
                m_LowerCurrentAttribute.text = string.Format(Language.Get("MethodTo_A"),
                    propertyConfig.Name, UIHelper.ReplacePercentage(0, propertyConfig.ISPercentage) +
                    (propertyConfig.ISPercentage == 1 ? "%" : string.Empty));
                m_Properties.gameObject.SetActive(true);
                m_Properties.text = string.Format(Language.Get("MethodTo_B"), PlayerPropertyConfig.Get(_attrValue1.ToString()).Name, UIHelper.ReplacePercentage(configFamilyTech.attrValue, 1));
                m_Properties.text = string.Format(Language.Get("MethodTo_B"),
                    propertyConfig.Name, UIHelper.ReplacePercentage(configFamilyTech.attrValue, propertyConfig.ISPercentage) +
                    (propertyConfig.ISPercentage == 1 ? "%" : string.Empty));
                m_gameObject.SetActive(true);
                if (method._ContributionNumber >= configFamilyTech.needPoint)
                {
@@ -336,7 +360,7 @@
                    CA607_tagCMFamilyTechLVUP tag_CA607 = new CA607_tagCMFamilyTechLVUP();
                    tag_CA607.TechID = (uint)indexID;
                    GameNetSystem.Instance.SendInfo(tag_CA607);
                   // DebugEx.LogError("输出心法科技需要提升的技能IndexID"+ indexID);
                    // DebugEx.LogError("输出心法科技需要提升的技能IndexID"+ indexID);
                }
                else
                {
@@ -389,7 +413,7 @@
                indexID = MethodId[0];
                m_ScrollerController.JumpIndex(indexID - 1);
                m_ScrollerController.m_Scorller.RefreshActiveCellViews();//刷新可见
                if (AchievementGoto.guideAchievementId == 216)
                {
                    if (Conditional())
@@ -411,7 +435,7 @@
                {
                    if (Conditional())
                    {
                        AchievementGuideEffect1= AchievementGuideEffectPool.Require(1);
                        AchievementGuideEffect1 = AchievementGuideEffectPool.Require(1);
                        if (AchievementGuideEffect1.effect != null)
                        {
                            AchievementGuideEffect1.effect.ResetOrder(3500);