少年修仙传客户端代码仓库
client_Wu Xijin
2019-01-24 11570739f312a31a3c437e0f635eb7aec2f3249a
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
7个文件已修改
120 ■■■■ 已修改文件
Core/GameEngine/Model/Config/JadeDynastyBossConfig.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/JadeDynastyBossConfig.cs.meta 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Compose/New/ComposeMatCell.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Compose/New/ComposeWinModel.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Compose/New/SelectEquipModel.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/GeneralConfig/GeneralDefine.cs 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/JadeDynastyBoss/JadeDynastyBossModel.cs 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/JadeDynastyBossConfig.cs
@@ -1,6 +1,6 @@
//--------------------------------------------------------
//    [Author]:            第二世界
//    [  Date ]:           Friday, January 18, 2019
//    [  Date ]:           Thursday, January 24, 2019
//--------------------------------------------------------
using UnityEngine;
@@ -17,7 +17,8 @@
        public int RealmLV { get ; private set ; }
        public int ZhuXianScore { get ; private set ; }
        public string dropItems { get ; private set; } 
        public string PortraitID { get ; private set; }
        public string PortraitID { get ; private set; }
        public int[] conditionSorts;
        public override string getKey()
        {
@@ -39,7 +40,14 @@
            
                dropItems = rawContents[5].Trim();
            
                PortraitID = rawContents[6].Trim();
                PortraitID = rawContents[6].Trim();
                string[] conditionSortsStringArray = rawContents[7].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
                conditionSorts = new int[conditionSortsStringArray.Length];
                for (int i=0;i<conditionSortsStringArray.Length;i++)
                {
                     int.TryParse(conditionSortsStringArray[i],out conditionSorts[i]);
                }
            }
            catch (Exception ex)
            {
Core/GameEngine/Model/Config/JadeDynastyBossConfig.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: bc9f70989c6d3344aad5bd0dbda7bc2b
timeCreated: 1547804881
timeCreated: 1548302334
licenseType: Pro
MonoImporter:
  serializedVersion: 2
System/Compose/New/ComposeMatCell.cs
@@ -36,7 +36,8 @@
        public void SetDisplay(ItemCompoundConfig _itemCompound,NeedMatType _matType,bool isLock,string des = "", int _itemId = 0,int _itemIndex = -1)
        {
            this.itemCompound = _itemCompound;
            this.itemModel = playerPack.GetItemModelByIndex(PackType.rptItem, _itemIndex);
            var packType = composeModel.GetPackTypeByMakerId(itemCompound.makeID);
            this.itemModel = playerPack.GetItemModelByIndex(packType, _itemIndex);
            this.matType = _matType;
            this.itemId = _itemId;
            matDes = des;
@@ -98,7 +99,8 @@
                case NeedMatType.fixedItem:
                    int needCount = 0;
                    TryGetCountById(out needCount);
                    int haveCount = playerPack.GetItemCountByID(PackType.rptItem, itemId);
                    var packType = composeModel.GetPackTypeByMakerId(itemCompound.makeID);
                    int haveCount = playerPack.GetItemCountByID(packType, itemId);
                    itemCell.countText.gameObject.SetActive(true);
                    if (haveCount >= needCount)
                    {
System/Compose/New/ComposeWinModel.cs
@@ -417,6 +417,16 @@
    }
    #endregion
    public PackType GetPackTypeByMakerId(int[] makeIds)
    {
        if (makeIds == null || makeIds.Length < 1) return PackType.rptDeleted;
        int makeId = makeIds[0];
        var itemConfig = Config.Instance.Get<ItemConfig>(makeId);
        return GeneralDefine.GetPackTypeByItemType(itemConfig.Type);
    }
    public void SetUpdateSendComposeEvent()
    {
        if(UpdateSendComposeEvent != null)
System/Compose/New/SelectEquipModel.cs
@@ -56,9 +56,11 @@
    public Dictionary<int, ItemModel> GetUnfixedItemModel()
    {
        SinglePackModel singlePack = playerPack.GetSinglePackModel(PackType.rptItem);
        if (singlePack == null || composeWinModel.CurComposeModel == null)
            return null;
        if (composeWinModel.CurComposeModel == null) return null;
        var packType = composeWinModel.GetPackTypeByMakerId(composeWinModel.CurComposeModel.makeID);
        SinglePackModel singlePack = playerPack.GetSinglePackModel(packType);
        if (singlePack == null) return null;
        int[] unfixedIds = composeWinModel.CurComposeModel.unfixedItemID;
        allBagItemInfo = singlePack.GetPackModelIndexDict();
@@ -96,9 +98,10 @@
    public Dictionary<int, ItemModel> GetAddItemModel()
    {
        SinglePackModel singlePack = playerPack.GetSinglePackModel(PackType.rptItem);
        if (singlePack == null)
            return null;
        if (composeWinModel.CurComposeModel == null) return null;
        var packType = composeWinModel.GetPackTypeByMakerId(composeWinModel.CurComposeModel.makeID);
        SinglePackModel singlePack = playerPack.GetSinglePackModel(packType);
        if (singlePack == null) return null;
        allBagItemInfo = singlePack.GetPackModelIndexDict();
        List<ItemModel> modellist = allBagItemInfo.Values.ToList();
@@ -215,7 +218,10 @@
    public void AddHaveUnfixedSelectItem(int itemPlace)
    {
        ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.rptItem, itemPlace);
        if (composeWinModel.CurComposeModel == null) return;
        var packType = composeWinModel.GetPackTypeByMakerId(composeWinModel.CurComposeModel.makeID);
        ItemModel itemModel = playerPack.GetItemModelByIndex(packType, itemPlace);
        if (!haveUnfixedSelectItemDic.ContainsKey(itemPlace))
        {
            haveUnfixedSelectItemDic.Add(itemPlace, itemModel);
@@ -232,7 +238,9 @@
    public void AddHaveAddSelectItem(int itemPlace)
    {
        ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.rptItem, itemPlace);
        if (composeWinModel.CurComposeModel == null) return;
        var packType = composeWinModel.GetPackTypeByMakerId(composeWinModel.CurComposeModel.makeID);
        ItemModel itemModel = playerPack.GetItemModelByIndex(packType, itemPlace);
        if (!haveAddSelectItemDic.ContainsKey(itemPlace))
        {
            haveAddSelectItemDic.Add(itemPlace, itemModel);
System/GeneralConfig/GeneralDefine.cs
@@ -138,7 +138,7 @@
    public static Dictionary<int, int> fairyGrabBossMapLines { get; private set; }
    public static Dictionary<int, List<int>> DropItemEffectMapID { get; private set; }
    public static Dictionary<int, List<int>> itemPutInPackDict { get; private set; }
    public static List<int> RebornAutoFightMapID { get; private set; }
    public static string teamWorldCall;
@@ -278,6 +278,25 @@
                _pos[0] = (double)_data[_key][0];
                _pos[1] = (double)_data[_key][1];
                NpcPosOffset.Add(_npcID, new Vector3((float)_pos[0], 0, (float)_pos[1]));
            }
            var putInItemPack = Config.Instance.Get<FuncConfigConfig>("PutInItemPack");
            LitJson.JsonData itemPutInData = LitJson.JsonMapper.ToObject(putInItemPack.Numerical1);
            itemPutInPackDict = new Dictionary<int, List<int>>();
            foreach(var _key in itemPutInData.Keys)
            {
                var itemTypeData = itemPutInData[_key];
                int packType = int.Parse(_key);
                List<int> itemTypes = new List<int>();
                itemPutInPackDict.Add(packType,itemTypes);
                if(itemTypeData.IsArray)
                {
                    for (i = 0; i < itemTypeData.Count; i++)
                    {
                        int itemType = int.Parse(itemTypeData[i].ToString());
                        itemTypes.Add(itemType);
                    }
                }
            }
            FuncConfigConfig nxxdImg = Config.Instance.Get<FuncConfigConfig>("NXXDPicture");
@@ -689,6 +708,19 @@
        }
    }
    public static PackType GetPackTypeByItemType(int itemType)
    {
        foreach(var key in itemPutInPackDict.Keys)
        {
            var types = itemPutInPackDict[key];
            if(types.Contains(itemType))
            {
                return (PackType)key;
            }
        }
        return PackType.rptItem;
    }
    private static int GetInt(string _key, int _index = 1)
    {
        var result = 0;
System/JadeDynastyBoss/JadeDynastyBossModel.cs
@@ -126,6 +126,7 @@
                            realmLevel = config.RealmLV,
                            score = config.ZhuXianScore,
                        },
                        conditionSorts = new List<int>(config.conditionSorts),
                    });
                    var itemArray = LitJson.JsonMapper.ToObject<int[][]>(config.dropItems);
@@ -170,7 +171,35 @@
            });
            if (index != -1)
            {
                var boss = jadeDynastyBosses[index];
                var challengeCondition = jadeDynastyBosses[index].challengeCondition;
                foreach (var code in boss.conditionSorts)
                {
                    switch (code)
                    {
                        case 1:
                            if (PlayerDatas.Instance.baseData.LV < challengeCondition.level)
                            {
                                condition = 1;
                                return false;
                            }
                            break;
                        case 2:
                            if (PlayerDatas.Instance.baseData.realmLevel < challengeCondition.realmLevel)
                            {
                                condition = 2;
                                return false;
                            }
                            break;
                        case 3:
                            if (jadeDynastyScore < (ulong)challengeCondition.score)
                            {
                                condition = 3;
                                return false;
                            }
                            break;
                    }
                }
                if (PlayerDatas.Instance.baseData.LV < challengeCondition.level)
                {
                    condition = 1;
@@ -481,6 +510,7 @@
        public int bossNpcId;
        public int lineId;
        public JadeDynastyBossCondition challengeCondition;
        public List<int> conditionSorts;
    }
    public struct JadeDynastyBossCondition