From 924685634f8008a7eee3e71051be055743fa64f6 Mon Sep 17 00:00:00 2001
From: client_Zxw <826696702@qq.com>
Date: 星期五, 02 十一月 2018 11:41:29 +0800
Subject: [PATCH] Revert "4539 子 【优化】【1.1.0】灵宠新增仙玉自动培养 / 【前端】【1.1.0】灵宠新增仙玉自动培养"

---
 System/Pet/PetAttributeMethods.cs |   84 ++++++------------------------------------
 1 files changed, 12 insertions(+), 72 deletions(-)

diff --git a/System/Pet/PetAttributeMethods.cs b/System/Pet/PetAttributeMethods.cs
index a6523e6..6484513 100644
--- a/System/Pet/PetAttributeMethods.cs
+++ b/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;
         }
     }
 }

--
Gitblit v1.8.0