少年修仙传客户端代码仓库
client_linchunjie
2018-11-23 6dbf827fa655caec79b030e497191c85eda28a07
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
2个文件已修改
88 ■■■■■ 已修改文件
System/Mount/PlayerMountDatas.cs 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Pet/PlayerPetDatas.cs 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Mount/PlayerMountDatas.cs
@@ -141,7 +141,7 @@
        if (mountRedpoint.Count != 0)
            return;
       // var configs = Config.Instance.GetAllValues<HorseConfig>();
        // var configs = Config.Instance.GetAllValues<HorseConfig>();
        if (Hconfigs.Count <= 0)
        {
            Hconfigs = Config.Instance.GetAllValues<HorseConfig>();
@@ -183,7 +183,7 @@
        {
            Hconfigs = Config.Instance.GetAllValues<HorseConfig>();
        }
      //  var configs = Config.Instance.GetAllValues<HorseConfig>();
        //  var configs = Config.Instance.GetAllValues<HorseConfig>();
        foreach (var config in Hconfigs)
        {
            int unlockItemID = config.UnlockItemID;
@@ -202,7 +202,7 @@
            return;
        if (Uconfigs.Count <= 0)
        {
            Uconfigs= Config.Instance.GetAllValues<HorseUpConfig>();
            Uconfigs = Config.Instance.GetAllValues<HorseUpConfig>();
        }
        //var configs = Config.Instance.GetAllValues<HorseUpConfig>();
        foreach (var config in Uconfigs)
@@ -295,30 +295,26 @@
        {
            return;
        }
        int GetMountID = 0;
        int GetMountLv = 0;
        int NeedExp = 99999999;
        int NeedNumber = 0;//所需要的经验丹
        List<int> IntList = new List<int>();
        FuncConfigConfig _tagfun = Config.Instance.Get<FuncConfigConfig>("HorseUpItem");
        ItemConfig _tagchine = Config.Instance.Get<ItemConfig>(int.Parse(_tagfun.Numerical1));
        int number = playerPack.GetItemCountByID(PackType.rptItem, _tagchine.ID);
        for (int i = 0; i < SortMount.Count; i++)
        {
            int horseID = SortMount[i].HorseID;
            if (_DicHorse.ContainsKey(horseID) && _DicHorse[horseID].Lv < Config.Instance.Get<HorseConfig>(horseID).MaxLV)
            int MaxLv = Config.Instance.Get<HorseConfig>(horseID).MaxLV;
            if (_DicHorse.ContainsKey(horseID) && _DicHorse[horseID].Lv < MaxLv)
            {
                int _NeedExp = HorseUpConfig.GetHorseIDAndLV(horseID, (_DicHorse[horseID].Lv)).NeedExp;
                if (_NeedExp - _DicHorse[horseID].Exp < NeedExp)
                int NeedExp = _NeedExp - _DicHorse[horseID].Exp;
                int NeedNumber = Mathf.CeilToInt((float)NeedExp / HorseDanExp);
                if (number >= NeedNumber)
                {
                    NeedExp = _NeedExp - _DicHorse[horseID].Exp;
                    GetMountID = horseID;
                    GetMountLv = _DicHorse[horseID].Lv;
                    NeedNumber = Mathf.CeilToInt((float)NeedExp / HorseDanExp);
                    IntList.Add(horseID);
                }
            }
        }
        FuncConfigConfig _tagfun = Config.Instance.Get<FuncConfigConfig>("HorseUpItem");
        ItemConfig _tagchine = Config.Instance.Get<ItemConfig>(int.Parse(_tagfun.Numerical1));
        HorseConfig horsecon = Config.Instance.Get<HorseConfig>(GetMountID);
        int number = playerPack.GetItemCountByID(PackType.rptItem, _tagchine.ID);
        foreach (var key in _DicHorse.Keys)//因为有成就任务限制所有 第一只坐骑红点逻辑特殊写
        {
            if (DicDefaultMount.ContainsKey(key) && DicDefaultMount[key] > _DicHorse[key].Lv
@@ -328,7 +324,21 @@
                return;
            }
        }
        if (ASingleFeedRedPoint.ContainsKey(GetMountID) && number >= NeedNumber && GetMountLv < horsecon.MaxLV)
        int GetMinLV = 100;
        int GetMountID = 0;
        for (int j = 0; j < SortMount.Count; j++)
        {
            int Id = SortMount[j].HorseID;
            if (IntList.Contains(Id) && _DicHorse.ContainsKey(Id))
            {
                if (_DicHorse[Id].Lv < GetMinLV)
                {
                    GetMinLV = _DicHorse[Id].Lv;
                    GetMountID = Id;
                }
            }
        }
        if (ASingleFeedRedPoint.ContainsKey(GetMountID))
        {
            ASingleFeedRedPoint[GetMountID].state = RedPointState.Simple;
            return;
@@ -382,7 +392,7 @@
            {
                Hconfigs = Config.Instance.GetAllValues<HorseConfig>();
            }
           // var configs = Config.Instance.GetAllValues<HorseConfig>();
            // var configs = Config.Instance.GetAllValues<HorseConfig>();
            foreach (var config in Hconfigs)
            {
                if (config.ItemID == info.itemInfo.ItemID)
System/Pet/PlayerPetDatas.cs
@@ -244,7 +244,7 @@
        {
            allPetConfigs = Config.Instance.GetAllValues<PetInfoConfig>();
        }
      //  var allPetConfigs = Config.Instance.GetAllValues<PetInfoConfig>();
        //  var allPetConfigs = Config.Instance.GetAllValues<PetInfoConfig>();
        foreach (var config in allPetConfigs)
        {
            if (!DeblockingRedPoint.ContainsKey(config.ID))
@@ -275,7 +275,7 @@
        {
            return;
        }
       // var configs = Config.Instance.GetAllValues<PetInfoConfig>();
        // var configs = Config.Instance.GetAllValues<PetInfoConfig>();
        if (allPetConfigs.Count <= 0)
        {
            allPetConfigs = Config.Instance.GetAllValues<PetInfoConfig>();
@@ -328,25 +328,25 @@
            return;
        }
        int GetPetId = 0;
        int petLv = 0;
        int NeedExp = 99999999;
        int NeedNumber = 0;//所需要的经验丹
        int petLv = 100;
        int itemCount = playerPack.GetItemCountByID(PackType.rptItem, 4151);
        List<int> ListInt = new List<int>();
        for (int i = 0; i < Sortpet.Count; i++)
        {
            int petID = Sortpet[i].ID;
            if (_DicPetBack.ContainsKey(petID) && _DicPetBack[petID].PetClass < Config.Instance.Get<PetInfoConfig>(petID).MaxRank)
            int MaxLv = Config.Instance.Get<PetInfoConfig>(petID).MaxRank;
            if (_DicPetBack.ContainsKey(petID) && _DicPetBack[petID].PetClass < MaxLv)
            {
                int _NeedExp = PetClassCostConfig.GetPetIdAndRank(petID, _DicPetBack[petID].PetClass).UpNeedExp;
                if (_NeedExp - _DicPetBack[petID].petExp < NeedExp)
                int NeedExp = _NeedExp - _DicPetBack[petID].petExp;
                int NeedNumber = Mathf.CeilToInt((float)NeedExp / PetDanExp);
                if (itemCount>= NeedNumber)
                {
                    NeedExp = _NeedExp - _DicPetBack[petID].petExp;
                    petLv = _DicPetBack[petID].PetClass;
                    GetPetId = petID;
                    NeedNumber = Mathf.CeilToInt((float)NeedExp / PetDanExp);
                    ListInt.Add(petID);
                }
            }
        }
        int itemCount = playerPack.GetItemCountByID(PackType.rptItem, 4151);
        foreach (var key in _DicPetBack.Keys)//因为有成就任务限制所有 第一只坐骑红点逻辑特殊写
        {
            if (DicDefaultPet.ContainsKey(key) && DicDefaultPet[key] > _DicPetBack[key].PetClass
@@ -356,8 +356,18 @@
                return;
            }
        }
        PetInfoConfig petinfo = Config.Instance.Get<PetInfoConfig>(GetPetId);
        if (CultivateRedPoint.ContainsKey(GetPetId) && itemCount >= NeedNumber && petinfo.MaxRank > petLv)
        for (int i = 0; i < ListInt.Count; i++)
        {
            if (_DicPetBack.ContainsKey(ListInt[i]))
            {
                if (_DicPetBack[(ListInt[i])].PetClass < petLv)
                {
                    petLv = _DicPetBack[(ListInt[i])].PetClass;
                    GetPetId = (ListInt[i]);
                }
            }
        }
        if (CultivateRedPoint.ContainsKey(GetPetId))
        {
            CultivateRedPoint[GetPetId].state = RedPointState.Simple;
            return;