少年修仙传客户端代码仓库
client_linchunjie
2018-11-20 cd795a37d2d4b00d3474db3031d910221e009d39
4736 【1.3】【前端】神兵系统修改
2个文件已修改
45 ■■■■■ 已修改文件
System/Role/MagicianModel.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Role/MagicianWin.cs 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Role/MagicianModel.cs
@@ -432,6 +432,11 @@
            return godWeaponConditions.ContainsKey(type);
        }
        public bool TryGetConditions(int type, out List<GodWeaponCondition> list)
        {
            return godWeaponConditions.TryGetValue(type, out list);
        }
        public bool IsGodWeaponMaxLevelByItem(int _itemId)
        {
            foreach (var _key in godWeaponLevelUpCost.Keys)
System/Role/MagicianWin.cs
@@ -32,6 +32,8 @@
        [SerializeField] Text m_Progress;
        [SerializeField] Text m_UnlockCondition;
        [SerializeField] PropertyBehaviour[] m_PreviewPropertys;
        [SerializeField] RectTransform m_ContainerCondition;
        [SerializeField] Text m_GodWeaponCondition;
        [SerializeField] RectTransform m_ContainerSkill;
        [SerializeField] GodWeaponSkillBehaviour[] m_Skills;
@@ -361,10 +363,12 @@
                m_HammerLabel.text = Language.Get("L1130");
                DisplayPreviewProperty();
                DisplayProgress();
                DisplayCondition();
            }
            else
            {
                m_ContainerProgress.gameObject.SetActive(false);
                m_ContainerCondition.gameObject.SetActive(false);
                m_CostItemTitle.text = Language.Get("L1052");
                m_PropertyTitle.text = Language.Get("L1051");
                m_HammerLabel.text = Language.Get("L1131");
@@ -483,6 +487,42 @@
            }
        }
        private void DisplayCondition()
        {
            bool requireCondition = !model.IsGodWeaponUnlock(model.selectType)
                && model.ContainsCondition(model.selectType);
            m_ContainerCondition.gameObject.SetActive(requireCondition);
            if (requireCondition)
            {
                List<GodWeaponCondition> list;
                if (model.TryGetConditions(model.selectType, out list))
                {
                    var index = 0;
                    for (int i = 0; i < list.Count; i++)
                    {
                        var godWeaponInfo = model.GetGodWeaponInfo(list[i].type);
                        if (godWeaponInfo != null && godWeaponInfo.level >= list[i].level)
                        {
                            if (i + 1 < list.Count)
                            {
                                index = i + 1;
                            }
                        }
                        else
                        {
                            break;
                        }
                    }
                    if (index < list.Count)
                    {
                        var config = GodWeaponConfig.GetConfig(list[index].type, 1);
                        m_GodWeaponCondition.text = StringUtility.Contact(config.Name,
                            Language.Get("GodWeaponCondition", list[index].level));
                    }
                }
            }
        }
        private void DisplayExp(bool immediatly)
        {
            var godWeaponInfo = model.GetGodWeaponInfo(model.selectType);