少年修仙传客户端代码仓库
client_Wu Xijin
2019-03-11 6e32566c29b54902b372a7fa9ed50df5edbcd1c9
3335 装备洗练功能开发。
6个文件已修改
76 ■■■■ 已修改文件
Core/GameEngine/Model/TelPartialConfig/PartialWashLevelMaxConfig.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Equip/EquipFrameWin.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/EquipStar/EquipStarWin.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/EquipTrain/EquipTrainModel.cs 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/EquipTrain/EquipTrainWin.cs 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/LowSettingTip.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/TelPartialConfig/PartialWashLevelMaxConfig.cs
@@ -18,4 +18,18 @@
        return washLevelMaxConfigs.ContainsKey(key) ? washLevelMaxConfigs[key] : null;
    }
    public static int GetMaxLevel( int type)
    {
        var max = 0;
        foreach ( var config in washLevelMaxConfigs.Values)
        {
            if ( config .equipType==type && config .levelMax >max)
            {
                max = config.levelMax;
            }
        }
        return max;
    }
}
System/Equip/EquipFrameWin.cs
@@ -87,6 +87,7 @@
        {
            CloseSubWindows();
            WindowCenter.Instance.Open<EquipStarWin>();
            functionOrder = m_Star.order;
        }
        private void OpenStrengthenWin()
System/EquipStar/EquipStarWin.cs
@@ -46,6 +46,8 @@
        protected override void OnPreOpen()
        {
            model.SelectLevel(equipModel.GetLastestUnLockEquipSet());
            DisplayBaseInfo();
            DisplayDynamicInfo(true);
        }
System/EquipTrain/EquipTrainModel.cs
@@ -147,7 +147,7 @@
            }
            equipTrainLevel.value = GetTrainLevel(level, place);
            equipTrainMaxLevel.value = GetMaxTrainLevel(level);
            equipTrainMaxLevel.value = GetMaxTrainLevel(level, place);
            material.value = GetTrainMaterial(level, place);
            InitTrainableProperties(level, place);
@@ -190,15 +190,25 @@
            return 5;
        }
        public int GetMaxTrainLevel(int level)
        public int GetMaxTrainLevel(int place)
        {
            return 5;
            var type = GetTrainType(place);
            return WashLevelMaxConfig.GetMaxLevel(type);
        }
        public int GetMaxTrainLevel(int level, int place)
        {
            return 5;
            var star = starModel.GetEquipStarLevel(level, place);
            var type = GetTrainType(place);
            var config = WashLevelMaxConfig.Get(type, star);
            if (config == null)
            {
                return 0;
            }
            else
            {
                return config.levelMax;
            }
        }
        public List<EquipTrainCandidate> GetCandidatePlaces()
@@ -219,7 +229,7 @@
                return false;
            }
            var maxStarLevel = GetMaxTrainLevel(equip.config.ItemColor, equip.config.LV);
            var maxStarLevel = GetMaxTrainLevel(equip.config.LV, equip.config.EquipPlace);
            var currentStarLevel = GetTrainLevel(equip.config.LV, equip.config.EquipPlace);
            return currentStarLevel < maxStarLevel;
        }
@@ -269,7 +279,7 @@
                var unSavedProperties = GetUnSavedProperties(level, place);
                var trainedProperties = GetTrainedProperties(level, place);
                var trainLevel = GetTrainLevel(level, place);
                var data = EquipWashConfig.Get(GetTrainType(place), trainLevel);
                var data = EquipWashConfig.Get(GetTrainType(place), trainLevel + 1);
                var propertyBar = new EquipTrainPropertyBar(data.config.attType1, data.config.attMax1);
                propertyBar.propertyValue.value = trainedProperties.x;
System/EquipTrain/EquipTrainWin.cs
@@ -55,8 +55,7 @@
        protected override void OnPreOpen()
        {
            DisplayBaseInfo();
            DisplayDynamicInfo(true);
        }
        protected override void OnAfterOpen()
@@ -71,6 +70,14 @@
        protected override void OnAfterClose()
        {
            model.ResetOperateParams();
        }
        protected override void OnActived()
        {
            base.OnActived();
            model.SelectLevel(equipModel.GetLastestUnLockEquipSet());
            DisplayBaseInfo();
            DisplayDynamicInfo(true);
        }
        protected override void LateUpdate()
@@ -173,12 +180,21 @@
        private void DisplayMaterial(int level, int place, int itemId)
        {
            m_Material.SetItem(itemId, 1);
            var need = model.GetMaterialNeed(level, place);
            var own = packModel.GetItemCountByID(PackType.Item, itemId);
            var enough = own >= need;
            m_MaterialCount.text = string.Format("{0}/{1}", UIHelper.AppendStringColor(enough ? TextColType.White : TextColType.Red, own.ToString(), true), need);
            if (itemId > 0)
            {
                m_Material.gameObject.SetActive(true);
                m_MaterialCount.gameObject.SetActive(true);
                m_Material.SetItem(itemId, 1);
                var need = model.GetMaterialNeed(level, place);
                var own = packModel.GetItemCountByID(PackType.Item, itemId);
                var enough = own >= need;
                m_MaterialCount.text = string.Format("{0}/{1}", UIHelper.AppendStringColor(enough ? TextColType.White : TextColType.Red, own.ToString(), true), need);
            }
            else
            {
                m_Material.gameObject.SetActive(false);
                m_MaterialCount.gameObject.SetActive(false);
            }
        }
        private void DisplayInevitableMaterial(int level, int place, int need)
System/MainInterfacePanel/LowSettingTip.cs
@@ -118,9 +118,6 @@
        void Strengthen1Button()
        {
            WindowCenter.Instance.Close<MainInterfaceWin>();
            var starModel = ModelCenter.Instance.GetModel<EquipStarModel>();
            var equipModel = ModelCenter.Instance.GetModel<EquipModel>();
            starModel.SelectLevel(equipModel.GetLastestUnLockEquipSet());
            WindowCenter.Instance.Open<EquipFrameWin>(false, 0);
        }