少年修仙传客户端代码仓库
client_linchunjie
2018-11-09 908bbeb23b9bd0fce872b0450c93f5ce091bb2a6
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
2个文件已删除
7个文件已修改
435 ■■■■■ 已修改文件
Core/GameEngine/Model/TelPartialConfig/tagItemCompoundConfig.cs 175 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/TelPartialConfig/tagItemCompoundConfig.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Compose/New/ComposeWinModel.cs 205 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Compose/New/SelectEquipModel.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/DungeonSuppliesLackWin.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/MultipleDifficultyDungeonWin.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/PackModelInterface.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Team/TeamDungeonTicketLackWin.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/WindowJump/WindowJumpMgr.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/TelPartialConfig/tagItemCompoundConfig.cs
File was deleted
Core/GameEngine/Model/TelPartialConfig/tagItemCompoundConfig.cs.meta
File was deleted
System/Compose/New/ComposeWinModel.cs
@@ -8,9 +8,7 @@
public class ComposeWinModel : Model, IBeforePlayerDataInitialize,IPlayerLoginOk
{
    private Dictionary<int, Dictionary<int, List<ItemCompoundConfig>>> firstTypeDict = null;
    private Dictionary<int, List<ItemCompoundConfig>> secondTypeDict = null;
    public event Action ResetModelEvent;
    SelectEquipModel _selectModel;
    SelectEquipModel selectModel
@@ -37,6 +35,7 @@
    {
        ParseFuncConfig();
        ParseItemComoundConfig();
        SetComposeTypeRed();
    }
    public override void UnInit()
@@ -46,15 +45,12 @@
    public void OnBeforePlayerDataInitialize()
    {
        firstTypeDict = null;
        secondTypeDict = null;
        secondType = 0;
        thirdType = 0;
    }
    public void OnPlayerLoginOk()
    {
        SetComposeTypeRed();
        RefreshComposeRed();
        playerPack.RefreshItemCountAct -= OnItemCntRefresh;
        playerPack.RefreshItemCountAct += OnItemCntRefresh;
@@ -76,7 +72,6 @@
        if (type != PlayerDataRefresh.LV) return;
        UpdateComposeDataByLevel();
        SetComposeTypeRed();
        RefreshComposeRed();
    }
@@ -377,6 +372,34 @@
        }
        return false;
    }
    public bool TryGetItemCompoundByMakeId(int _ticketId, out ItemCompoundConfig itemCompound)
    {
        itemCompound = null;
        foreach (var first in composeOpenDataDict.Keys)
        {
            var secondTypeDic = composeOpenDataDict[first].secondTypeDict;
            foreach(var second in secondTypeDic.Keys)
            {
                var thirdTypeDic = secondTypeDic[second].thirdTypeDict;
                foreach(var third in thirdTypeDic.Keys)
                {
                    var thirdTypeDatas = thirdTypeDic[third];
                    for(int i = 0; i < thirdTypeDatas.Count; i++)
                    {
                        var compound = thirdTypeDatas[i].itemCompound;
                        if (compound.makeID.Contains(_ticketId))
                        {
                            itemCompound = compound;
                            return true;
                        }
                    }
                }
            }
        }
        return false;
    }
    #endregion
    public bool IsComposeJobLimit(int composeId)
@@ -390,35 +413,6 @@
            }
        }
        return false;
    }
    public Dictionary<int, Dictionary<int, List<ItemCompoundConfig>>> GetFirstTypeModel(int firstType)
    {
        firstTypeDict = null;
        firstTypeDict = ItemCompoundConfig.GetFirstComposeTypeDict((int)firstType);
        return firstTypeDict;
    }
    public Dictionary<int, List<ItemCompoundConfig>> GetSecondTypeModel(int firstType,int secondType)
    {
        GetFirstTypeModel(firstType);
        secondTypeDict = null;
        if (firstTypeDict != null)
        {
            firstTypeDict.TryGetValue(secondType, out secondTypeDict);
        }
        return secondTypeDict;
    }
    public List<ItemCompoundConfig> GetThirdTypeModellist(int firstType,int secondType,int thirdType)
    {
        List<ItemCompoundConfig> modellist = null;
        GetSecondTypeModel(firstType, secondType);
        if(secondTypeDict != null)
        {
            secondTypeDict.TryGetValue(thirdType, out modellist);
        }
        return modellist;
    }
    public bool IsTrailerByLevel(ItemCompoundConfig itemCompound)
@@ -435,20 +429,14 @@
    public int GetTicketId(int firstType, int secondType, int thirdType)
    {
        var itemId = 0;
        var dict = ItemCompoundConfig.GetFirstComposeTypeDict(firstType);
        Dictionary<int, List<ItemCompoundConfig>> _secondTypeDict = null;
        dict.TryGetValue(secondType, out _secondTypeDict);
        if (_secondTypeDict != null)
        ComposeThirdTypeData thirdTypeData = null;
        TryGetThirdTypeData(firstType,secondType,thirdType,out thirdTypeData);
        if(thirdTypeData != null)
        {
            List<ItemCompoundConfig> modellist = null;
            _secondTypeDict.TryGetValue(thirdType, out modellist);
            if (modellist != null && modellist.Count > 0)
            {
                itemId = modellist[0].makeID[0];
            }
            var itemCompound = thirdTypeData.itemCompound;
            return itemCompound.makeID[0];
        }
        return itemId;
        return 0;
    }
    public bool IsEnoughUnfixedMat(ItemCompoundConfig compoundModel)
@@ -463,8 +451,8 @@
    public bool IsEnoughFixedMat(ItemCompoundConfig config)
    {
        if (config == null) return false;
        int[] fixedIds = ItemCompoundConfig.GetDisplayArrayByType(config.id,DisplayItemArray.FixedIds);
        int[] fixedCounts = ItemCompoundConfig.GetDisplayArrayByType(config.id, DisplayItemArray.FixedCounts);
        int[] fixedIds = config.itemID;
        int[] fixedCounts = config.itemCount;
        for ( int i = 0; i < fixedCounts.Length; i++)
        {
            int haveCount = playerPack.GetItemCountByID(PackType.rptItem,fixedIds[i]);
@@ -512,8 +500,8 @@
            return;
        }
        int[] fixedIds = ItemCompoundConfig.GetDisplayArrayByType(compoundModel.id, DisplayItemArray.FixedIds);
        int[] fixedCounts = ItemCompoundConfig.GetDisplayArrayByType(compoundModel.id, DisplayItemArray.FixedCounts);
        int[] fixedIds = compoundModel.itemID;
        int[] fixedCounts = compoundModel.itemCount;
        for (i = 0; i < fixedCounts.Length; i++)
        {
            int haveCount = playerPack.GetItemCountByID(PackType.rptItem,fixedIds[i]);
@@ -925,7 +913,7 @@
    private string GetComposeInfoStr(int bindCnt,int noBindCnt)
    {
        if (CurComposeModel == null) return string.Empty;
        int[] makeIds = ItemCompoundConfig.GetDisplayArrayByType(CurComposeModel.id,DisplayItemArray.MakeIds);
        int[] makeIds = CurComposeModel.makeID;
        ItemConfig config = Config.Instance.Get<ItemConfig>(makeIds[0]);
        StringBuilder stringBuilder = new StringBuilder();
        if (bindCnt > 0)
@@ -999,7 +987,7 @@
        Dictionary<int, int> bindCntDic = new Dictionary<int, int>();
        Dictionary<int, int> noBindCntDic = new Dictionary<int, int>();
        int[] fixedIds = ItemCompoundConfig.GetDisplayArrayByType(CurComposeModel.id,DisplayItemArray.FixedIds);
        int[] fixedIds = CurComposeModel.itemID;
        for (int i = 0; i < fixedIds.Length;i++)
        {
            List<ItemModel> list = null;
@@ -1079,31 +1067,24 @@
    /// 判断是否可以合成门票
    /// </summary>
    /// <param name="composeItemID"></param>
    /// <returns></returns>
    /// <returns></returns
    public bool IsComposeTicketByType(int secondType)
    {
        bool isEnough = true;
        Dictionary<int, Dictionary<int, List<ItemCompoundConfig>>> getFirstModel = ItemCompoundConfig.GetFirstComposeTypeDict((int)ComposeFuncType.Ticket);
        if (getFirstModel.ContainsKey(secondType))
        ComposeThirdTypeData thirdTypeData = null;
        TryGetThirdTypeData((int)ComposeFuncType.Ticket,secondType,0,out thirdTypeData);
        if(thirdTypeData != null)
        {
            if (getFirstModel[secondType].ContainsKey(0))
            var itemCompound = thirdTypeData.itemCompound;
            int[] fixedIDs = itemCompound.itemID;
            int[] fixedCnt = itemCompound.itemCount;
            for (int i = 0; i < fixedIDs.Length; i++)
            {
                ItemCompoundConfig compoundConfig = getFirstModel[secondType][0][0];
                int[] fixedIDs = compoundConfig.itemID;
                int[] fixedCnt = compoundConfig.itemCount;
                for (int i = 0; i < fixedIDs.Length; i++)
                int haveCnt = playerPack.GetItemCountByID(PackType.rptItem, fixedIDs[i]);
                if (fixedCnt[i] > haveCnt)
                {
                    int haveCnt = playerPack.GetItemCountByID(PackType.rptItem, fixedIDs[i]);
                    if (fixedCnt[i] > haveCnt)
                    {
                        isEnough = false;
                        break;
                    }
                    isEnough = false;
                }
            }
            else
            {
                isEnough = false;
            }
        }
        else
@@ -1123,9 +1104,15 @@
        int[] composeCondi = itemConfig.JumpComposeCondi;
        if (composeCondi.Length < 3) return false;
        ItemCompoundConfig itemCompound = ItemCompoundConfig.GetItemCompoundByType(composeCondi[0], composeCondi[1], composeCondi[2]);
        if(itemCompound != null)
        int first = composeCondi[0];
        int second = composeCondi[1];
        int third = composeCondi[2];
        ComposeThirdTypeData thirdTypeData = null;
        TryGetThirdTypeData(first,second,third,out thirdTypeData);
        if(thirdTypeData != null)
        {
            var itemCompound = thirdTypeData.itemCompound;
            if (itemCompound.levelNeed <= PlayerDatas.Instance.baseData.LV)
            {
                switch (itemCompound.firstType)
@@ -1147,7 +1134,6 @@
                        break;
                }
                this.secondType = itemCompound.secondType;
                if (itemCompound.firstType == 5 && itemCompound.secondType == 3)
                {
                    this.thirdType = PlayerDatas.Instance.baseData.Job;
@@ -1164,15 +1150,16 @@
                return false;
            }
        }
        return false;
    }
    public bool CheckIsComposeByType(int firstType,int secondType,int thirdType)
    {
        ItemCompoundConfig itemCompound = ItemCompoundConfig.GetItemCompoundByType(firstType, secondType, thirdType);
        if (itemCompound == null) return false;
        ComposeThirdTypeData thirdTypeData = null;
        TryGetThirdTypeData(firstType,secondType,thirdType,out thirdTypeData);
        if (thirdTypeData == null) return false;
        var itemCompound = thirdTypeData.itemCompound;
        if (itemCompound.levelNeed <= PlayerDatas.Instance.baseData.LV)
        {
            return true;
@@ -1190,9 +1177,9 @@
    {
        this.secondType = secondType;
        this.thirdType = thirdType;
        GetFirstTypeModel((int)type);
        Dictionary<int, List<ItemCompoundConfig>> dict = GetSecondTypeModel((int)type,secondType);
        if(dict == null)
        ComposeThirdTypeData thirdTypeData = null;
        TryGetThirdTypeData((int)type,secondType,thirdType,out thirdTypeData);
        if(thirdTypeData == null)
        {
            SysNotifyMgr.Instance.ShowTip("FuncLimit_Level");
            ResetJumpToModel();
@@ -1220,20 +1207,23 @@
    {
        secondTypeRedDict.Clear();
        thirdTypeRedDict.Clear();
        Dictionary<int, Dictionary<int, List<ItemCompoundConfig>>> firstDict = ItemCompoundConfig.GetFirstComposeTypeDict((int)ComposeFuncType.Item);
        if (firstDict == null) return;
        foreach(var secondType in firstDict.Keys)
        if (composeDataDict.ContainsKey((int)ComposeFuncType.Item))
        {
            int secondRedKey = COMPOSETOOL_REDKEY * 100 + secondType;
            Redpoint secondRed = new Redpoint(COMPOSETOOL_REDKEY, secondRedKey);
            secondTypeRedDict.Add(secondType, secondRed);
            foreach(var thirdType in firstDict[secondType].Keys)
            var firstTypeData = composeDataDict[(int)ComposeFuncType.Item];
            var secondTypeDict = firstTypeData.secondTypeDict;
            foreach (var second in secondTypeDict.Keys)
            {
                int thirdRedKey = secondRedKey*100 + thirdType;
                Redpoint thirdRed = new Redpoint(secondRedKey,thirdRedKey);
                string key = StringUtility.Contact(secondType,10,thirdType);
                thirdTypeRedDict.Add(key,thirdRed);
                var thirdTypeDict = secondTypeDict[second].thirdTypeDict;
                int secondRedKey = COMPOSETOOL_REDKEY * 100 + second;
                Redpoint secondRed = new Redpoint(COMPOSETOOL_REDKEY, secondRedKey);
                secondTypeRedDict.Add(second, secondRed);
                foreach (var third in thirdTypeDict.Keys)
                {
                    int thirdRedKey = secondRedKey * 100 + third;
                    Redpoint thirdRed = new Redpoint(secondRedKey, thirdRedKey);
                    string key = StringUtility.Contact(second, 10, third);
                    thirdTypeRedDict.Add(key, thirdRed);
                }
            }
        }
    }
@@ -1251,24 +1241,30 @@
    public void RefreshComposeRed()
    {
        Dictionary<int, Dictionary<int, List<ItemCompoundConfig>>> firstDict = ItemCompoundConfig.GetFirstComposeTypeDict((int)ComposeFuncType.Item);
        if (firstDict == null || !FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Compose)) return;
        ComposeFirstTypeData firstTypeData = null;
        TryGetFirstTypeData((int)ComposeFuncType.Item, out firstTypeData);
        if (firstTypeData == null
           || !FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Compose)) return;
        if (firstDict.ContainsKey(3))
        ComposeSecondTypeData secondTypeData = null;
        TryGetSecondTypeData((int)ComposeFuncType.Item, 3, out secondTypeData);
        if(secondTypeData != null)
        {
           foreach(var thirdType in firstDict[3].Keys)
            var thirdTypeDict = secondTypeData.thirdTypeDict;
            foreach(var third in thirdTypeDict.Keys)
            {
                List<ItemCompoundConfig> compoundlist = firstDict[3][thirdType];
                for(int i = 0; i < compoundlist.Count; i++)
                List<ComposeThirdTypeData> thirdTypeDatas = thirdTypeDict[third];
                for (int i = 0; i < thirdTypeDatas.Count; i++)
                {
                    int makeID = compoundlist[i].makeID[i];
                    string key = StringUtility.Contact(3, 10, thirdType);
                    if (IsComposeJobLimit(makeID) && IsEnoughFixedMat(compoundlist[i]))
                    var itemCompound = thirdTypeDatas[i].itemCompound;
                    int makeID = itemCompound.makeID[0];
                    string key = StringUtility.Contact(3, 10, third);
                    if (IsComposeJobLimit(makeID) && IsEnoughFixedMat(itemCompound))
                    {
                        if (thirdTypeRedDict[key].state != RedPointState.Simple)
                        {
                            thirdTypeRedDict[key].state = RedPointState.Simple;
                        }
                        }
                    }
                    else
                    {
@@ -1278,7 +1274,6 @@
                        }
                    }
                }
            }
        }
    }
System/Compose/New/SelectEquipModel.cs
@@ -59,7 +59,7 @@
        if (singlePack == null || composeWinModel.CurComposeModel == null)
            return null;
        int[] unfixedIds = ItemCompoundConfig.GetDisplayArrayByType(composeWinModel.CurComposeModel.id,DisplayItemArray.UnfixedIds);
        int[] unfixedIds = composeWinModel.CurComposeModel.unfixedItemID;
        allBagItemInfo = singlePack.GetPackModelIndexDict();
        _unfixedItemDict.Clear();
        foreach (int key in allBagItemInfo.Keys)
System/Dungeon/DungeonSuppliesLackWin.cs
@@ -297,10 +297,11 @@
        private bool CanComposeTicket(LackType _lackType)
        {
            var lackItem = GetLackItem(lackType);
            List<ItemCompoundConfig> list;
            if (ItemCompoundConfig.TryGetTicketCompose(lackItem.id, out list))
            ItemCompoundConfig itemCompound = null;
            composeModel.TryGetItemCompoundByMakeId(lackItem.id, out itemCompound);
            if (itemCompound != null)
            {
                return composeModel.IsComposeTicketByType(list[0].secondType);
                return composeModel.IsComposeTicketByType(itemCompound.secondType);
            }
            return false;
        }
System/Dungeon/MultipleDifficultyDungeonWin.cs
@@ -49,8 +49,10 @@
                var playerLevel = PlayerDatas.Instance.baseData.LV;
                for (int i = dungeons.Count - 1; i >= 0; i--)
                {
                    var config = Config.Instance.Get<DungeonConfig>(model.GetDungeonId(dungeons[i]));
                    if (playerLevel >= config.LVLimitMin)
                    var dungeonId = model.GetDungeonId(dungeons[i]);
                    var config = Config.Instance.Get<DungeonConfig>(dungeonId);
                    var grade = model.GetGrade(dungeons[i]);
                    if (playerLevel >= config.LVLimitMin && grade > 0)
                    {
                        model.selectedKylinDungeon = dungeons[i];
                        break;
System/KnapSack/Logic/PackModelInterface.cs
@@ -673,7 +673,6 @@
        {
            if (itemModel == null) return false;
            bool isBetter = true;
            ItemModel putModel = playerPack.GetItemModelByIndex(PackType.rptEquip,(int)RoleEquipType.retWing);
            SinglePackModel singlePack = playerPack.GetSinglePackModel(PackType.rptItem);
            List<ItemModel> itemModels = null;
@@ -685,9 +684,14 @@
            bool isOpenCompose = false;
            if(composeTypes != null && composeTypes.Length >= 3)
            {
                ItemCompoundConfig itemCompound = ItemCompoundConfig.GetItemCompoundByType(composeTypes[0], composeTypes[1], composeTypes[2]);
                if (itemCompound != null)
                int first = composeTypes[0];
                int second = composeTypes[1];
                int third = composeTypes[2];
                ComposeWinModel.ComposeThirdTypeData thirdTypeData = null;
                composeModel.TryGetThirdTypeData(first,second,third,out thirdTypeData);
                if(thirdTypeData != null)
                {
                    var itemCompound = thirdTypeData.itemCompound;
                    if (itemCompound.levelNeed <= PlayerDatas.Instance.baseData.LV)
                    {
                        isOpenCompose = true;
System/Team/TeamDungeonTicketLackWin.cs
@@ -104,10 +104,11 @@
        private bool SatisfyComposeTicket(Item lackItem)
        {
            List<ItemCompoundConfig> list;
            if (ItemCompoundConfig.TryGetTicketCompose(lackItem.id, out list))
            ItemCompoundConfig itemCompound = null;
            composeModel.TryGetItemCompoundByMakeId(lackItem.id,out itemCompound);
            if(itemCompound != null)
            {
                return composeModel.IsComposeTicketByType(list[0].secondType);
                return composeModel.IsComposeTicketByType(itemCompound.secondType);
            }
            return false;
        }
System/WindowJump/WindowJumpMgr.cs
@@ -497,6 +497,7 @@
            case JumpUIType.VipRechargeFunc5:
            case JumpUIType.FlashRushToBuy:
            case JumpUIType.BindGoldWheel:
            case JumpUIType.OpenServer_AccumulateRecharge:
                SetJumpLogic<OpenServerActivityWin>(_tagWinSearchModel.TABID);
                break;
            case JumpUIType.OpenServerMountRank:
@@ -814,6 +815,15 @@
                    if (!OpenServerActivityCenter.Instance.IsActivityOpen(_tagWinSearchModel.TABID))
                    {
                        OperationTimeHepler.Instance.ProcessConditionError(Operation.ConsumeRebate);
                        return false;
                    }
                }
                break;
            case JumpUIType.OpenServer_AccumulateRecharge:
                {
                    if (!OpenServerActivityCenter.Instance.IsActivityOpen(_tagWinSearchModel.TABID))
                    {
                        OperationTimeHepler.Instance.ProcessConditionError(Operation.AccumulateRecharge);
                        return false;
                    }
                }
@@ -1432,6 +1442,7 @@
    EquipHighSuit = 254, //强化套装界面
    Team_TrialDungeon = 255, //组队列表-宗门试炼标签
    Team_EmperorRelic = 256, //组队列表-娲皇遗迹标签
    OpenServer_AccumulateRecharge = 257, //精彩活动—累计充值界面
    DhszTs = 1001,//定海神针功法提升界面
    HyqTs = 1002,//皓月枪功法提升界面
    GyzTs = 1003,//鬼牙刃功法提升界面