少年修仙传客户端代码仓库
Revert "4539 子 【优化】【1.1.0】灵宠新增仙玉自动培养 / 【前端】【1.1.0】灵宠新增仙玉自动培养"

This reverts commit 7fac13da114c3990383fa4b76a46fd82cdf0bf6f.
6个文件已修改
2个文件已删除
423 ■■■■■ 已修改文件
Core/GameEngine/Model/Config/PetClassCostConfig.cs 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/PetClassCostConfig.cs.meta 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ClientPack/ClientToMapServer/CA7_Pet/CA704_tagCMPetClassUP.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Pet/AutoTrainTipsPWin.cs 268 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Pet/AutoTrainTipsPWin.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Pet/PetAttributeMethods.cs 84 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Pet/PetAttributeWin.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Pet/PlayerPetDatas.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/PetClassCostConfig.cs
@@ -1,6 +1,6 @@
//--------------------------------------------------------
//    [Author]:            第二世界
//    [  Date ]:           Thursday, November 01, 2018
//    [  Date ]:           Saturday, January 06, 2018
//--------------------------------------------------------
using UnityEngine;
@@ -11,12 +11,11 @@
    
    public partial class PetClassCostConfig : ConfigBase {
        public int ID { get ; private set ; }
        public int PetID { get ; private set ; }
        public int Rank { get ; private set ; }
        public int UpNeedExp { get ; private set ; }
        public int AtkAdd { get ; private set ; }
        public int NeedExpTotal { get ; private set ; }
        public int ID { get ; private set ; }
        public int PetID { get ; private set ; }
        public int Rank { get ; private set ; }
        public int UpNeedExp { get ; private set ; }
        public int AtkAdd { get ; private set ; }
        public override string getKey()
        {
@@ -26,17 +25,15 @@
        public override void Parse() {
            try
            {
                ID=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0;
                PetID=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0;
                Rank=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0;
                UpNeedExp=IsNumeric(rawContents[3]) ? int.Parse(rawContents[3]):0;
                AtkAdd=IsNumeric(rawContents[4]) ? int.Parse(rawContents[4]):0;
                NeedExpTotal=IsNumeric(rawContents[5]) ? int.Parse(rawContents[5]):0;
                ID=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0;
                PetID=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0;
                Rank=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0;
                UpNeedExp=IsNumeric(rawContents[3]) ? int.Parse(rawContents[3]):0;
                AtkAdd=IsNumeric(rawContents[4]) ? int.Parse(rawContents[4]):0;
            }
            catch (Exception ex)
            {
Core/GameEngine/Model/Config/PetClassCostConfig.cs.meta
@@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: a58409c48a307e24eb39a8c2e933c8e8
timeCreated: 1541079969
licenseType: Free
timeCreated: 1515213576
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
Core/NetworkPackage/ClientPack/ClientToMapServer/CA7_Pet/CA704_tagCMPetClassUP.cs
@@ -6,7 +6,6 @@
public class CA704_tagCMPetClassUP : GameNetPackBasic {
    public byte PetItemIndex;    //宠物数据背包索引
    public ushort UseItemCnt;    //消耗材料个数
    public byte IsAutoBuy;    //是否自动购买
    public CA704_tagCMPetClassUP () {
        combineCmd = (ushort)0x03FE;
@@ -16,7 +15,6 @@
    public override void WriteToBytes () {
        WriteBytes (PetItemIndex, NetDataType.BYTE);
        WriteBytes (UseItemCnt, NetDataType.WORD);
        WriteBytes (IsAutoBuy, NetDataType.BYTE);
    }
}
System/Pet/AutoTrainTipsPWin.cs
File was deleted
System/Pet/AutoTrainTipsPWin.cs.meta
File was deleted
System/Pet/PetAttributeMethods.cs
@@ -85,10 +85,8 @@
        PetInfoConfig petInfoConfig;
        bool isAutoTrain = false;
        List<GameObject> Skillimage = new List<GameObject>();
        private bool IsZidong = false;
        private void OnEnable()
        {
            IsZidong = false;
            timePlay = 0;
            Skillimage.Clear();
            Skillimage.Add(Skillimage1);
@@ -496,13 +494,16 @@
            {
                if (petmodel._DicPetBack.ContainsKey(petInfoConfig.ID))
                {
                    petmodel.SendPetTrainQuest(petmodel._DicPetBack[petInfoConfig.ID].ItemPlace, 1,0);
                    petmodel.SendPetTrainQuest(petmodel._DicPetBack[petInfoConfig.ID].ItemPlace, 1);
                }
            }
            else
            {
                ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(petmodel.petUpgradeToolId);
            }
            // petTrainBtn.RemoveAllListeners();
        }
        private void ClickPetAutoTrainBtn()
@@ -510,20 +511,7 @@
            int haveCnt = playerPack.GetItemCountByID(PackType.rptItem, petmodel.petUpgradeToolId);
            if (haveCnt < costNum)
            {
                if (!isAutoTrain)
                {
                    WindowCenter.Instance.Open<AutoTrainTipsPWin>();
                }
                else
                {
                    AutoTrainTipsPWin.IsFairy = false;
                    isAutoTrain = false;
                    IsZidong = false;
                    petAutoTrainText.text = Language.Get("PetWin_EvolveTrainBtn_6");
                    StopCoroutine("FairyJadeD");
                }
                ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(petmodel.petUpgradeToolId);
                return;
            }
            isAutoTrain = !isAutoTrain;
@@ -560,7 +548,7 @@
                        if (petmodel.Wait)
                        {
                            petmodel.Wait = false;
                            petmodel.SendPetTrainQuest(petmodel._DicPetBack[petInfoConfig.ID].ItemPlace, NeedNum,0);
                            petmodel.SendPetTrainQuest(petmodel._DicPetBack[petInfoConfig.ID].ItemPlace, NeedNum);
                        }
                    }
                    else
@@ -568,7 +556,7 @@
                        if (petmodel.Wait)
                        {
                            petmodel.Wait = false;
                            petmodel.SendPetTrainQuest(petmodel._DicPetBack[petInfoConfig.ID].ItemPlace, haveCnt,0);
                            petmodel.SendPetTrainQuest(petmodel._DicPetBack[petInfoConfig.ID].ItemPlace, haveCnt);
                        }
                    }
@@ -577,12 +565,9 @@
            }
            else
            {
                if (!IsZidong)
                {
                    petAutoTrainText.text = Language.Get("PetWin_EvolveTrainBtn_6");
                    isAutoTrain = false;
                }
                petAutoTrainText.text = Language.Get("PetWin_EvolveTrainBtn_6");
                isAutoTrain = false;
            }
        }
        #endregion
@@ -659,6 +644,8 @@
                    ridingModel.property = PropertyTip.Pet;
                    ridingModel.RidingId = PetID;
                    WindowCenter.Instance.Open<TargetPetAttrWin>();
                    //  WindowCenter.Instance.Get<TargetPetAttrWin>().PropertyMountAndPet(PropertyTip.Pet, PetID);
                });
                if (petmodel._DicPetBack[PetID].PetClass >= PetModel.MaxRank)//满阶
                {
@@ -709,53 +696,6 @@
            PetClassCostConfig _tagPetClass = PetClassCostConfig.GetPetIdAndRank(PetID, PetModel.MaxRank);
            FragmentUnlockTip.SetActive(false);
            FullAttTip.SetActive(true);
        }
        public void FairyJadeDomesticate()//仙玉驯养
        {
            int NumberLv = AutoTrainTipsPWin._Lvnumber;//等级所需的等级
            if (NumberLv > petmodel._DicPetBack[typePetID].PetClass && !WindowCenter.Instance.IsOpen<RidingAndPetActivationWin>() && AutoTrainTipsPWin.IsFairy)
            {
                isAutoTrain = true;
                petAutoTrainText.text = Language.Get("PetWin_EvolveTrainBtn_7");
                IsZidong = true;
                StartCoroutine("FairyJadeD");
            }
        }
        IEnumerator FairyJadeD()//仙玉驯养
        {
            int number = AutoTrainTipsPWin.DomesticateNumber;//所需的颗数
            int NumberLv = AutoTrainTipsPWin._Lvnumber;//等级所需的等级
            while (NumberLv > petmodel._DicPetBack[typePetID].PetClass)
            {
                if (WindowCenter.Instance.IsOpen<RidingAndPetActivationWin>())
                {
                    isAutoTrain = false;
                    IsZidong =false;
                    petAutoTrainText.text = Language.Get("PetWin_EvolveTrainBtn_6");
                    StopCoroutine("FairyJadeD");
                    yield break;
                }
                if (petmodel.Wait)
                {
                    petAutoTrainText.text = Language.Get("PetWin_EvolveTrainBtn_7");
                    int exp = PetClassCostConfig.GetPetIdAndRank(typePetID, petmodel._DicPetBack[typePetID].PetClass).NeedExpTotal;
                    int NeedNum = ridingModel.PetAndHorseNeedDanNum(exp);
                    petmodel.SendPetTrainQuest(petmodel._DicPetBack[typePetID].ItemPlace, NeedNum, 1);//向服务端发包坐骑经验单
                    petmodel.Wait = false;
                }
                yield return null;
            }
            if (isAutoTrain)
            {
                AutoTrainTipsPWin.IsFairy = false;
                isAutoTrain = false;
                IsZidong = false;
                petAutoTrainText.text = Language.Get("PetWin_EvolveTrainBtn_6");
                StopCoroutine("FairyJadeD");
                yield break;
            }
            yield break;
        }
    }
}
System/Pet/PetAttributeWin.cs
@@ -224,9 +224,7 @@
                    return;
                }
            }
            petmodel.SigPetId = petId;
            TypePetID = petId;
            _PetAttributeMethods.ModelShow(petId);
        }
@@ -318,7 +316,6 @@
                    if (Pet != 0)
                    {
                        TypePetID = Pet;
                        petmodel.SigPetId = Pet;
                        return;
                    }
                }
@@ -334,7 +331,6 @@
                    if (Value.UnLockNeedItemID == ItemId)
                    {
                        TypePetID = Value.ID;
                        petmodel.SigPetId = TypePetID;
                        return;
                    }
                }
@@ -345,7 +341,6 @@
                if (petmodel.DeblockingRedPoint[key].state == RedPointState.Simple)
                {
                    TypePetID = key;
                    petmodel.SigPetId = TypePetID;
                    return;
                }
            }
@@ -355,19 +350,16 @@
                if (petmodel.CultivateRedPoint[key].state == RedPointState.Simple)
                {
                    TypePetID = key;
                    petmodel.SigPetId = TypePetID;
                    return;
                }
            }
            if (petmodel.PetNow != 0)
            {
                TypePetID = petmodel.PetNow;
                petmodel.SigPetId = TypePetID;
            }
            else
            {
                TypePetID = sortlist[0].ID;
                petmodel.SigPetId = TypePetID;
            }
        }
        private int JunpIndex()
@@ -397,7 +389,6 @@
                    if (value.ID == petID[0])
                    {
                        TypePetID = petID[0];
                        petmodel.SigPetId = TypePetID;
                    }
                }
                //m_ScrollerController.m_Scorller.RefreshActiveCellViews();//刷新可见
@@ -432,13 +423,6 @@
                return 0;
            }
            return Index;
        }
        public void FairyJadeDomesticate()
        {
            _PetAttributeMethods.FairyJadeDomesticate();
        }
    }
}
System/Pet/PlayerPetDatas.cs
@@ -48,7 +48,6 @@
    public bool IsOk = false;
    private int PetDanExp = 0;//灵宠丹经验
    public int SigPetId = 0;//用来标记当前选中的坐骑ID
    public List<int> ListEffectSkill = new List<int>();
    PlayerPackModel _playerPack;
    PlayerPackModel playerPack
@@ -175,12 +174,11 @@
        }
    }
    public void SendPetTrainQuest(int petIndex, int number,int _IsAutoBuy)
    public void SendPetTrainQuest(int petIndex, int number)
    {
        CA704_tagCMPetClassUP _tagCA704 = new CA704_tagCMPetClassUP();
        _tagCA704.PetItemIndex = (byte)petIndex;
        _tagCA704.UseItemCnt = (ushort)number;
        _tagCA704.IsAutoBuy = (byte)_IsAutoBuy;
        GameNetSystem.Instance.SendInfo(_tagCA704);
    }
    #endregion