少年修仙传客户端代码仓库
client_linchunjie
2018-08-31 04a45b20dace4d4b3a127d9b2d00edb9cba61154
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
9个文件已修改
238 ■■■■■ 已修改文件
System/Compose/New/ComposeTicketWin.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Compose/New/ComposeToolsWin.cs 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Compose/New/ComposeWinModel.cs 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Compose/New/ComposeWingsWin.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/TargetBriefInfoWin.cs 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/GeneralConfig/GeneralConfig.cs 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/ItemDrop/DropItem.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/ItemTipsModel.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI/Common/UI3DShowHero.cs 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Compose/New/ComposeTicketWin.cs
@@ -219,8 +219,7 @@
            if (secondTypeDict != null)
            {
                if (secondTypeDict.Count >= 1 && curSecondType != 0
                    && curThirdType == 0)
                if (secondTypeDict.Count >= 1 && curSecondType != 0)
                {
                    cellCtrl.JumpIndex(curSecondType - 1);
                }
@@ -253,6 +252,7 @@
                        name.text = compoundModel.secondTypeName;
                        if (curSecondType == cell.index)
                        {
                            preSecondType = curSecondType;
                            arrowIcon.transform.localRotation = Quaternion.Euler(0, 0, -90);
                            icon.SetSprite("ComposeFirstClassChoosebtn");
                            secondTypeDict = composeWinModel.GetSecondTypeModel((int)ComposeFuncType.Ticket, curSecondType);
@@ -334,8 +334,7 @@
        private void OnClickThirdType(int thirdType)
        {
            curThirdType = thirdType;
            CreateCell();
            //RefreshUI(thirdTypelist[0]);
            cellCtrl.m_Scorller.RefreshActiveCellViews();
        }
        private void RefreshUI(ItemCompoundConfig compoundModel)
System/Compose/New/ComposeToolsWin.cs
@@ -1,5 +1,6 @@
using Snxxz.UI;
using System;
using System.Collections;
using System.Collections.Generic;
using TableConfig;
using UnityEngine;
@@ -185,6 +186,7 @@
        protected override void OnAfterOpen()
        {
            this.transform.SetAsLastSibling();
            StartCoroutine(SetOffestPos());
        }
        protected override void OnPreClose()
@@ -242,14 +244,21 @@
            if (secondTypeDict != null)
            {
                if (secondTypeDict.Count >= 1 && curSecondType != 0
                    && curThirdType == 0)
                if (secondTypeDict.Count >= 1 && curSecondType != 0)
                {
                    cellCtrl.JumpIndex(curSecondType - 1);
                }
            }
        }
        private IEnumerator SetOffestPos()
        {
            yield return null;
            if (curThirdType != 0)
            {
                cellCtrl.JumpIndex(curThirdType*50, 0, EnhancedUI.EnhancedScroller.EnhancedScroller.TweenType.immediate);
            }
        }
        private void RefreshCell(ScrollerDataType type, CellView cell)
        {
            Image icon = cell.transform.Find("BtnIcon").GetComponent<Image>();
@@ -277,6 +286,7 @@
                        name.text = compoundModel.secondTypeName;
                        if (curSecondType == cell.index)
                        {
                            preSecondType = curSecondType;
                            arrowIcon.transform.localRotation = Quaternion.Euler(0, 0, -90);
                            icon.SetSprite("ComposeFirstClassChoosebtn");
                            secondTypeDict = composeWinModel.GetSecondTypeModel((int)ComposeFuncType.Item, curSecondType);
@@ -326,7 +336,6 @@
            {
                if (thirdType != 0)
                {
                    if (preSecondType == curSecondType)
                    {
                        curSecondType = 0;
@@ -369,8 +378,7 @@
        private void OnClickThirdType(int thirdType)
        {
            curThirdType = thirdType;
            CreateCell();
            //RefreshUI(thirdTypelist[0]);
            cellCtrl.m_Scorller.RefreshActiveCellViews();
        }
        private void RefreshUI(ItemCompoundConfig compoundModel)
System/Compose/New/ComposeWinModel.cs
@@ -11,7 +11,6 @@
    private Dictionary<int, Dictionary<int, List<ItemCompoundConfig>>> firstTypeDict = null;
    private Dictionary<int, List<ItemCompoundConfig>> secondTypeDict = null;
    private Dictionary<int, List<int>> composeJobLimitDict = new Dictionary<int, List<int>>();
    public ComposeFuncType funcType = ComposeFuncType.Wings;
    private FuncConfigConfig addonsFormulaModel;
    public event Action ResetModelEvent;
    SelectEquipModel _selectModel;
@@ -796,57 +795,50 @@
    #region 处理跳转界面数据
    public bool CheckComposeItemById(int itemId)
    public bool CheckComposeItemById(int itemId,out int jumpId)
    {
        jumpId = 0;
        ItemConfig itemConfig = Config.Instance.Get<ItemConfig>(itemId);
        if (itemConfig == null) return false;
        switch(itemConfig.Type)
        ItemCompoundConfig itemCompound = Config.Instance.Get<ItemCompoundConfig>(itemConfig.ComposeID);
        if(itemCompound.levelNeed <= PlayerDatas.Instance.baseData.LV)
        {
            case 25:
            case 35:
                funcType = ComposeFuncType.Item;
                break;
            case 39:
                funcType = ComposeFuncType.Wings;
                break;
            case 44:
                funcType = ComposeFuncType.Ticket;
                break;
        }
        firstTypeDict = ItemCompoundConfig.GetAllFirstComposeTypeDict((int)funcType);
        if (firstTypeDict != null)
        {
            foreach (var secondType in firstTypeDict.Keys)
            switch (itemCompound.firstType)
            {
                Dictionary<int, List<ItemCompoundConfig>> secondTypeDict = firstTypeDict[secondType];
                foreach(var thirdType in secondTypeDict.Keys)
                {
                    for(int i = 0; i < secondTypeDict[thirdType].Count; i++)
                    {
                        ItemCompoundConfig compoundConfig = secondTypeDict[thirdType][i];
                        int[] fixedIds = ConfigParse.GetMultipleStr<int>(compoundConfig.itemID);
                        if(fixedIds.Contains(itemId))
                        {
                            if(compoundConfig.levelNeed <= PlayerDatas.Instance.baseData.LV)
                            {
                                this.secondType = secondType;
                                this.thirdType = thirdType;
                                return true;
                            }
                            else
                            {
                                SysNotifyMgr.Instance.ShowTip("TicketComposeUnlock",compoundConfig.levelNeed,compoundConfig.secondTypeName);
                                return false;
                            }
                        }
                    }
                }
                case 1:
                    jumpId = (int)JumpUIType.ComposeFunc1;
                    break;
                case 2:
                    jumpId = (int)JumpUIType.ComposeFunc2;
                    break;
                case 3:
                    jumpId = (int)JumpUIType.ComposeFunc3;
                    break;
                case 4:
                    jumpId = (int)JumpUIType.ComposeFunc4;
                    break;
                case 5:
                    jumpId = (int)JumpUIType.ComposeFunc5;
                    break;
            }
        }
            this.secondType = itemCompound.secondType;
        return false;
            if(itemConfig.ComposeID == 223)
            {
                this.thirdType = PlayerDatas.Instance.baseData.Job;
            }
            else
            {
                this.thirdType = itemCompound.thirdType;
            }
            return true;
        }
        else
        {
            SysNotifyMgr.Instance.ShowTip("TicketComposeUnlock", itemCompound.levelNeed, itemCompound.secondTypeName);
            return false;
        }
    }
    public int secondType { get; private set; }
@@ -855,7 +847,6 @@
    {
        this.secondType = secondType;
        this.thirdType = thirdType;
        funcType = type;
        GetFirstTypeModel((int)type);
        Dictionary<int, List<ItemCompoundConfig>> dict = GetSecondTypeModel((int)type,secondType);
        if(dict == null)
System/Compose/New/ComposeWingsWin.cs
@@ -224,8 +224,7 @@
            if(secondTypeDict != null)
            {
                if (secondTypeDict.Count >= 1 && curSecondType != 0
                    && curThirdType == 0)
                if (secondTypeDict.Count >= 1 && curSecondType != 0)
                {
                    cellCtrl.JumpIndex(curSecondType - 1);
                }
@@ -257,6 +256,7 @@
                        name.text = compoundModel.secondTypeName;
                        if (curSecondType == cell.index)
                        {
                            preSecondType = curSecondType;
                            icon.SetSprite("ComposeFirstClassChoosebtn");
                            arrowIcon.transform.localRotation = Quaternion.Euler(0,0,-90);
                            secondTypeDict = composeWinModel.GetSecondTypeModel((int)ComposeFuncType.Wings, curSecondType);
@@ -345,8 +345,7 @@
        private void OnClickThirdType(int thirdType)
        {
            curThirdType = thirdType;
            CreateCell();
            //RefreshUI(thirdTypelist[0]);
            cellCtrl.m_Scorller.RefreshActiveCellViews();
            selectModel.ClearSelectModel();
        }
System/Dungeon/TargetBriefInfoWin.cs
@@ -27,8 +27,9 @@
    static void OnShowBossLifeBar(uint _instanceId, int _npcId, bool _show)
    {
        int mapId = PlayerDatas.Instance.baseData.MapID;
        if (ModelCenter.Instance.GetModel<DungeonModel>().GetDungeonDataIdByMapId(mapId) == DemonJarModel.DEMONJAR_MAPID)
        var mapId = PlayerDatas.Instance.baseData.MapID;
        var dataMapId = ModelCenter.Instance.GetModel<DungeonModel>().GetDungeonDataIdByMapId(mapId);
        if (dataMapId == DemonJarModel.DEMONJAR_MAPID)
        {
            if (_show)
            {
@@ -64,8 +65,9 @@
    static void OnRefreshBossLifeBar(uint _instanceId, int _npcId, ulong _hp, ulong _maxHp)
    {
        int mapId = PlayerDatas.Instance.baseData.MapID;
        if (ModelCenter.Instance.GetModel<DungeonModel>().GetDungeonDataIdByMapId(mapId) == DemonJarModel.DEMONJAR_MAPID)
        var mapId = PlayerDatas.Instance.baseData.MapID;
        var dataMapId = ModelCenter.Instance.GetModel<DungeonModel>().GetDungeonDataIdByMapId(mapId);
        if (dataMapId == DemonJarModel.DEMONJAR_MAPID)
        {
            DemonJarBossLifeBarWin win;
            if (!WindowCenter.Instance.CheckOpen<DemonJarBossLifeBarWin>())
@@ -81,29 +83,24 @@
        }
        else
        {
            if (PlayerDatas.Instance.hero != null && PlayerDatas.Instance.hero.SelectTarget != null
            && PlayerDatas.Instance.hero.SelectTarget.ServerInstID == TargetBriefInfoWin.currentBossInstanceId)
            {
                TargetBriefInfoWin win;
                if (!WindowCenter.Instance.CheckOpen<TargetBriefInfoWin>())
                {
                    win = WindowCenter.Instance.Open<TargetBriefInfoWin>(true);
                }
                else
                {
                    win = WindowCenter.Instance.Get<TargetBriefInfoWin>();
                }
            TargetBriefInfoWin win;
            if (!WindowCenter.Instance.CheckOpen<TargetBriefInfoWin>())
            {
                win = WindowCenter.Instance.Open<TargetBriefInfoWin>(true);
            }
            else
            {
                win = WindowCenter.Instance.Get<TargetBriefInfoWin>();
                win.RefreshBossLifeBar(_instanceId, _npcId, _hp, _maxHp);
            }
            win.RefreshBossLifeBar(_instanceId, _npcId, _hp, _maxHp);
        }
    }
    static void OnHideBossLifeBar(uint _instanceId, int _npcId)
    {
        var win = WindowCenter.Instance.Get<TargetBriefInfoWin>();
        if (win != null)
        {
            win.HideBossLifeBar(_instanceId, _npcId);
        }
    }
    static void OnShowPlayerLifeBar(uint _instanceId, bool _show)
@@ -142,8 +139,8 @@
        [SerializeField] Transform m_ContainerPlayer;
        [SerializeField] PlayerLifeBar m_PlayerLifeBar;
        uint currentBossInstanceId = 0;
        uint currentPlayerInstanceId = 0;
        public static uint currentBossInstanceId = 0;
        public static uint currentPlayerInstanceId = 0;
        #region Built-in
        protected override void BindController()
@@ -216,17 +213,6 @@
            }
            m_BossLifeBar.Show(_hp, _maxHp);
        }
        public void HideBossLifeBar(uint _instanceId, int _npcId)
        {
            if (_instanceId != currentBossInstanceId)
            {
                return;
            }
            currentBossInstanceId = 0;
            m_ContainerBoss.gameObject.SetActive(false);
        }
        public void ShowPlayerLifeBar(uint _instanceId, bool _show)
System/GeneralConfig/GeneralConfig.cs
@@ -128,8 +128,10 @@
    public List<int> dungeonCanUseMoneyIds { get; private set; }
    public Dictionary<int, int> dungeonRebornClientTimes { get; private set; }
    public int[] CompareEquipPlaces { get; private set;}
    public Dictionary<int,int> fairyGrabBossMapLines { get; private set; }
    public int[] CompareEquipPlaces { get; private set; }
    public Dictionary<int, int> fairyGrabBossMapLines { get; private set; }
    public Dictionary<int, List<int>> DropItemEffectMapID { get; private set; }
    public void Init()
    {
@@ -443,6 +445,36 @@
            {
                fairyGrabBossMapLines[_key] = fairyGrabBossMapLines[_key] - 1;
            }
            if (DropItemEffectMapID == null)
            {
                DropItemEffectMapID = new Dictionary<int, List<int>>();
            }
            DropItemEffectMapID.Clear();
            func = Config.Instance.Get<FuncConfigConfig>("DropItemEffectMapID");
            _data = LitJson.JsonMapper.ToObject(func.Numerical1);
            int _itemID;
            _keys.Clear();
            _keys.AddRange(_data.Keys);
            for (int j = 0; j < _keys.Count; ++j)
            {
                if (int.TryParse(_keys[j].ToString(), out _itemID))
                {
                    if (!DropItemEffectMapID.ContainsKey(_itemID))
                    {
                        DropItemEffectMapID.Add(_itemID, new List<int>());
                    }
                    var _jsonMapIDs = _data[_keys[j]];
                    foreach (var _jsonMapID in _jsonMapIDs)
                    {
                        var _mapID = ((LitJson.IJsonWrapper)_jsonMapID).GetInt();
                        if (!DropItemEffectMapID[_itemID].Contains(_mapID))
                        {
                            DropItemEffectMapID[_itemID].Add(_mapID);
                        }
                    }
                }
            }
        }
        catch (Exception ex)
        {
System/ItemDrop/DropItem.cs
@@ -155,6 +155,14 @@
    SFXController _itemDropEffect = null;
    private void CheckPlayEffect(int id)
    {
        if (GeneralConfig.Instance.DropItemEffectMapID.ContainsKey(id))
        {
            if (!GeneralConfig.Instance.DropItemEffectMapID[id].Contains(PlayerDatas.Instance.baseData.MapID))
            {
                return;
            }
        }
        if (hasAppearCount < GeneralConfig.Instance.maxItemDropEffectCount)
        {
            var _itemConfig = Config.Instance.Get<ItemConfig>(id);
System/KnapSack/Logic/ItemTipsModel.cs
@@ -14,11 +14,8 @@
        FuncConfigConfig exhaustedFunc;
        public Dictionary<int, List<int>> equipLegendAttrTypeDict { get; private set; }
        public Dictionary<int, Dictionary<int, string>> wingsLegendAttrColorDict { get; private set; }
        private Dictionary<int, int> itemComposeTypeDict;
        public int[] NotComposeIds { get; private set;}
        public Dictionary<string, Dictionary<LegendAttrType, int>> legendAttrCntPreviewDict { get; private set; } // key 品质+星级  value 属性条目数
        public Dictionary<int, Dictionary<LegendAttrType, List<int>>> legendAttrIDPreviewDict { get; private set; } // key 装备位 value 属性类型,属性ID
        public Dictionary<int, Dictionary<int, int>> legendAttrColorValuePreviewDict { get; private set; } // key 属性ID value 装备品质,属性数值
@@ -115,10 +112,6 @@
                    }
                }
            }
            FuncConfigConfig itemComposeTypeFunc = Config.Instance.Get<FuncConfigConfig>("BagCompound");
            itemComposeTypeDict = ConfigParse.GetDic<int, int>(itemComposeTypeFunc.Numerical1);
            NotComposeIds = ConfigParse.GetMultipleStr<int>(itemComposeTypeFunc.Numerical2);
            FuncConfigConfig legendAttrCountPreview = Config.Instance.Get<FuncConfigConfig>("LegendAttrCountPreview");
            JsonData legendAttrCntData = JsonMapper.ToObject(legendAttrCountPreview.Numerical1);
@@ -621,13 +614,14 @@
            if (!isOverdue)
            {
                if (itemComposeTypeDict.ContainsKey(attrData.itemConfig.Type) && !NotComposeIds.Contains(attrData.itemId))
                if(attrData.itemConfig.ComposeID != 0)
                {
                    attrData.SetTipsFuncBtn(ItemWinBtnType.compose, (ItemWinBtnType, ItemAttrData) => {
                        bool isUnlock = ModelCenter.Instance.GetModel<ComposeWinModel>().CheckComposeItemById(attrData.itemId);
                        int jumpId = 0;
                        bool isUnlock = ModelCenter.Instance.GetModel<ComposeWinModel>().CheckComposeItemById(attrData.itemId,out jumpId);
                        if (isUnlock)
                        {
                            PackSendQuestMgr.Instance.ClickComposeBtn(ItemWinBtnType.compose, itemComposeTypeDict[attrData.itemConfig.Type]);
                            PackSendQuestMgr.Instance.ClickComposeBtn(ItemWinBtnType.compose,jumpId);
                        }
                    });
                }
UI/Common/UI3DShowHero.cs
@@ -62,6 +62,10 @@
                prefab = InstanceResourcesLoader.LoadModelRes(secondaryId);
                if (prefab)
                {
                    if (secondaryModel)
                    {
                        secondaryModel.SetActive(true);
                    }
                    pool = GameObjectPoolManager.Instance.RequestPool(prefab);
                    pool.Release(secondaryModel);
                }
@@ -305,8 +309,11 @@
                weaponModel = pool.Request();
                LayerUtility.SetLayer(weaponModel, LayerUtility.Player, false);
                var parent = clothesModel.transform.GetChildTransformDeeply(GAStaticDefine.WeaponBindBoneName);
                weaponModel.transform.SetParentEx(parent, Vector3.zero, Quaternion.identity, Vector3.one);
                if (clothesModel)
                {
                    var parent = clothesModel.transform.GetChildTransformDeeply(GAStaticDefine.WeaponBindBoneName);
                    weaponModel.transform.SetParentEx(parent, Vector3.zero, Quaternion.identity, Vector3.one);
                }
            }
            weaponId = newWeapon;