少年修仙传客户端代码仓库
client_Zxw
2019-03-21 ecd6c01f1a9feafd6586d6ab706e345bcc94c684
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
3个文件已修改
30 ■■■■ 已修改文件
System/EquipGem/EquipGemModel.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/EquipGem/EquipGemWin.cs 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/ItemOperateUtility.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/EquipGem/EquipGemModel.cs
@@ -59,6 +59,8 @@
            }
        }
        public Int2 jumpEquipPosition { get; set; }
        public event Action selectLevelRefresh;
        public event Action selectEquipRefresh;
        public event Action<int, int> equipGemRefresh;
System/EquipGem/EquipGemWin.cs
@@ -39,11 +39,11 @@
        protected override void OnPreOpen()
        {
            var selectRedpoint = SetDefaultSelect(0);
            var selectEquip = SetDefaultSelect(0);
            Display();
            m_Controller.JumpIndex(GetJumpIndex(model.selectLevel, model.selectEquipPlace, selectRedpoint));
            m_Controller.JumpIndex(GetJumpIndex(model.selectLevel, model.selectEquipPlace, selectEquip));
            model.selectEquipRefresh += SelectEquipRefresh;
            model.selectLevelRefresh += SelectLevelRefresh;
@@ -75,6 +75,14 @@
        bool SetDefaultSelect(int level)
        {
            if (!model.jumpEquipPosition.Equals(Int2.zero))
            {
                model.selectLevel = model.jumpEquipPosition.x;
                model.selectEquipPlace = model.jumpEquipPosition.y;
                model.jumpEquipPosition = Int2.zero;
                return true;
            }
            if (level == 0)
            {
                var equipSets = equipModel.GetAllEquipSets();
@@ -131,7 +139,7 @@
            return false;
        }
        int GetJumpIndex(int selectLevel, int selectPlace, bool selectRedpoint)
        int GetJumpIndex(int selectLevel, int selectPlace, bool selectEquip)
        {
            var jumpIndex = 0;
            var equipSets = equipModel.GetAllEquipSets();
@@ -151,7 +159,7 @@
                    var slotCount = model.GetUnlockEquipSlotCount(level);
                    if (slotCount > 0)
                    {
                        if (selectLevel == level && !selectRedpoint)
                        if (selectLevel == level && !selectEquip)
                        {
                            return jumpIndex;
                        }
@@ -249,8 +257,8 @@
            DisplayEquips();
            if (model.selectLevel != -1)
            {
                var selectRedpoint = SetDefaultSelect(model.selectLevel);
                m_Controller.JumpIndex(GetJumpIndex(model.selectLevel, model.selectEquipPlace, selectRedpoint));
                var selectEquip = SetDefaultSelect(model.selectLevel);
                m_Controller.JumpIndex(GetJumpIndex(model.selectLevel, model.selectEquipPlace, selectEquip));
                DisplayGems();
            }
        }
System/KnapSack/Logic/ItemOperateUtility.cs
@@ -714,7 +714,13 @@
        #region 养成
        public void GotoInlayItem(string guid)
        {
            var model = packModel.GetItemByGuid(guid);
            var item = packModel.GetItemByGuid(guid);
            if (item == null)
            {
                return;
            }
            var equipGemModel = ModelCenter.Instance.GetModel<EquipGemModel>();
            equipGemModel.jumpEquipPosition = new Int2(item.config.LV, item.config.EquipPlace);
            WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.StrengthFunc3);
        }