少年修仙传客户端代码仓库
client_linchunjie
2019-03-29 8708ca3bc5e146170e7353a8f8d0658ea4e1010d
3335 修改强化bug
3个文件已修改
67 ■■■■■ 已修改文件
System/EquipGem/EquipStrengthModel.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/EquipGem/EquipStrengthWin.cs 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/ItemOperateUtility.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/EquipGem/EquipStrengthModel.cs
@@ -92,6 +92,9 @@
            }
        }
    }
    public Int2 jumpEquipPosition { get; set; }
    public override void Init()
    {
        var strengthenLevelLimit = FuncConfigConfig.Get("StrengthenLevelLimit").Numerical1;
System/EquipGem/EquipStrengthWin.cs
@@ -66,10 +66,12 @@
            strengthModel.SelectLevelRefresh += SelectLevelRefresh;
            strengthModel.EquipStrengthUpdate += EquipStrengthUpdate;
            strengthModel.EquipStrengthLvUpdate += EquipStrengthLvUpdate;
            PlayerDatas.Instance.playerDataRefreshEvent += PlayerDataRefreshEvent;
            PlayerDatas.Instance.playerDataRefreshEvent += PlayerDataRefreshEvent;
            m_Controller.JumpIndex(GetJumpIndex(strengthModel.SelectLevel, strengthModel.SelectEquipPlace));
        }
        protected override void OnAfterOpen()
        {
        }
@@ -111,6 +113,48 @@
            }
        }
        #endregion
        int GetJumpIndex(int selectLevel, int selectPlace)
        {
            var jumpIndex = 0;
            var equipSets = equipModel.GetAllEquipSets();
            foreach (var level in equipSets)
            {
                if (level > selectLevel)
                {
                    return jumpIndex;
                }
                var equipSet = equipModel.GetEquipSet(level);
                if (equipSet == null)
                {
                    continue;
                }
                if (equipSet.unLocked)
                {
                    var slotCount = model.GetUnlockEquipSlotCount(level);
                    if (slotCount > 0)
                    {
                        jumpIndex++;
                        if (model.selectLevel == level)
                        {
                            var places = model.GetMosaicEquipPlaces();
                            foreach (var place in places)
                            {
                                if (equipSet.IsSlotUnLocked(place))
                                {
                                    if (selectLevel == level && selectPlace == place)
                                    {
                                        return jumpIndex;
                                    }
                                    jumpIndex++;
                                }
                            }
                        }
                    }
                }
            }
            return 0;
        }
        private void OnClickStrengBtn()
        {
@@ -310,6 +354,15 @@
        {
            strengthModel.SelectLevel = -1;
            strengthModel.SelectEquipPlace = -1;
            if (!strengthModel.jumpEquipPosition.Equals(Int2.zero))
            {
                strengthModel.SelectLevel = strengthModel.jumpEquipPosition.x;
                strengthModel.SelectEquipPlace = strengthModel.jumpEquipPosition.y;
                strengthModel.jumpEquipPosition = Int2.zero;
                return;
            }
            var equipSets = equipModel.GetAllEquipSets();
            foreach (var level in equipSets)
            {
System/KnapSack/Logic/ItemOperateUtility.cs
@@ -740,6 +740,13 @@
        public void GotoStrengthen(string guid)
        {
            var item = packModel.GetItemByGuid(guid);
            if (item == null)
            {
                return;
            }
            var equipStrengthModel = ModelCenter.Instance.GetModel<EquipStrengthModel>();
            equipStrengthModel.jumpEquipPosition = new Int2(item.config.LV, item.config.EquipPlace);
            WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.StrengthFunc1);
        }