From ffaf91d2d4a309b43b908e105f67ff81f48b878c Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期三, 22 八月 2018 16:16:52 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts

---
 System/HappyXB/HappyXBModel.cs               |   48 +++++++++++++++++++++--
 System/HappyXB/RuneXBWin.cs                  |    8 ++-
 System/Strengthening/GodBeastSlidingList.cs  |    2 
 System/MainInterfacePanel/LowSettingTip.cs   |    2 +
 System/Treasure/TreasureModel.cs             |   18 +++++++--
 System/HappyXB/BestXBWin.cs                  |    8 ++-
 System/MainInterfacePanel/FlyingShoesTask.cs |    7 +++
 7 files changed, 76 insertions(+), 17 deletions(-)

diff --git a/System/HappyXB/BestXBWin.cs b/System/HappyXB/BestXBWin.cs
index 24ea42f..567c351 100644
--- a/System/HappyXB/BestXBWin.cs
+++ b/System/HappyXB/BestXBWin.cs
@@ -234,7 +234,8 @@
         public void RefreshXBTools()
         {
             int xbToolCnt = 0;
-            if (XBModel.IsHaveManyXBTool(1,out xbToolCnt))
+            int needToolCnt = 0;
+            if (XBModel.IsHaveManyXBTool(1,out xbToolCnt,out needToolCnt))
             {
                 toolXBShowObj.SetActive(true);
                 toolNumText.text = StringUtility.Contact("x", xbToolCnt);
@@ -259,9 +260,10 @@
             if (XBModel.CheckIsEmptyGrid(PackType.rptTreasure))
             {
                 int toolCnt = 0;
-                if(XBModel.IsHaveManyXBTool(1,out toolCnt))
+                int needToolCnt = 0;
+                if (XBModel.IsHaveManyXBTool(1,out toolCnt,out needToolCnt))
                 {
-                    int needToolCnt = funcSet.costToolNums[1] - toolCnt;
+                    needToolCnt= needToolCnt - toolCnt;
                     int needMoney = needToolCnt * xbOneMoney;
                     if(needToolCnt > 0)
                     {
diff --git a/System/HappyXB/HappyXBModel.cs b/System/HappyXB/HappyXBModel.cs
index f194f83..194da3b 100644
--- a/System/HappyXB/HappyXBModel.cs
+++ b/System/HappyXB/HappyXBModel.cs
@@ -584,13 +584,15 @@
             return false;
         }
 
-        public bool IsHaveManyXBTool(int type, out int toolCnt)
+        public bool IsHaveManyXBTool(int type, out int toolCnt,out int needToolCnt)
         {
             toolCnt = 0;
+            needToolCnt = 0;
             XBFuncSet funcSet = GetXBFuncSet(type);
             if (funcSet == null) return false;
 
             toolCnt = playerPack.GetItemCountByID(PackType.rptItem, funcSet.costToolIds[1]);
+            needToolCnt = funcSet.costToolNums[1];
             if (toolCnt > 0)
             {
                 return true;
@@ -685,6 +687,10 @@
         public const int RuneXB_RedKey = 20302;
         public const int XBStore_RedKey = 20303;
         public const int XBWarehouse_RedKey = 20304;
+        public const int BestXB_OneRedKey = 20301001;
+        public const int BestXB_ManyRedKey = 20301002;
+        public const int RuneXB_OneRedKey = 20302001;
+        public const int RuneXB_ManyRedKey = 20302002;
 
         public Redpoint mainTopRed = new Redpoint(MainTop_RedKey);
         public Redpoint happyXBRed = new Redpoint(MainTop_RedKey, HappyXB_RedKey);
@@ -692,6 +698,10 @@
         public Redpoint runeXBRed = new Redpoint(HappyXB_RedKey, RuneXB_RedKey);
         public Redpoint xbStoreRed = new Redpoint(HappyXB_RedKey,XBStore_RedKey);
         public Redpoint xbWarehouseRed = new Redpoint(HappyXB_RedKey,XBWarehouse_RedKey);
+        public Redpoint bestXBOneRed = new Redpoint(BestXB_RedKey,BestXB_OneRedKey);
+        public Redpoint bestXBManyRed = new Redpoint(BestXB_RedKey,BestXB_ManyRedKey);
+        public Redpoint runeXBOneRed = new Redpoint(RuneXB_RedKey, RuneXB_OneRedKey);
+        public Redpoint runeXBManyRed = new Redpoint(RuneXB_RedKey, RuneXB_ManyRedKey);
 
         public void RefreshXBWarehouse()
         {
@@ -728,22 +738,50 @@
         {
             if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.HappyFindTreasure)) return;
 
-            if (IsHaveFreeXB(1) || IsHaveOneXBTool(1))
+            int xbtoolCnt = 0;
+            int needtoolCnt = 0;
+            if (IsHaveFreeXB(1))
             {
                 bestXBRed.state = RedPointState.Simple;
             }
+            else if(IsHaveManyXBTool(1,out xbtoolCnt,out needtoolCnt))
+            {
+                if(xbtoolCnt >= needtoolCnt)
+                {
+                    bestXBManyRed.state = RedPointState.Simple;
+                }
+                else
+                {
+                    bestXBManyRed.state = RedPointState.None;
+                }
+                bestXBOneRed.state = RedPointState.Simple;
+            }
             else
             {
-                bestXBRed.state = RedPointState.None;
+                bestXBOneRed.state = RedPointState.None;
+                bestXBManyRed.state = RedPointState.None;
             }
 
-            if (IsHaveFreeXB(2) || IsHaveOneXBTool(2))
+            if (IsHaveFreeXB(2))
             {
                 runeXBRed.state = RedPointState.Simple;
             }
+            else if(IsHaveManyXBTool(2,out xbtoolCnt,out needtoolCnt))
+            {
+                if (xbtoolCnt >= needtoolCnt)
+                {
+                    runeXBManyRed.state = RedPointState.Simple;
+                }
+                else
+                {
+                    runeXBManyRed.state = RedPointState.None;
+                }
+                runeXBOneRed.state = RedPointState.Simple;
+            }
             else
             {
-                runeXBRed.state = RedPointState.None;
+                runeXBOneRed.state = RedPointState.None;
+                runeXBManyRed.state = RedPointState.None;
             }
         }
 
diff --git a/System/HappyXB/RuneXBWin.cs b/System/HappyXB/RuneXBWin.cs
index 80a8273..5dea506 100644
--- a/System/HappyXB/RuneXBWin.cs
+++ b/System/HappyXB/RuneXBWin.cs
@@ -241,7 +241,8 @@
         public void RefreshXBTools()
         {
             int xbToolCnt = 0;
-            if (XBModel.IsHaveManyXBTool(2, out xbToolCnt))
+            int needToolCnt = 0;
+            if (XBModel.IsHaveManyXBTool(2, out xbToolCnt,out needToolCnt))
             {
                 toolXBShowObj.SetActive(true);
                 toolNumText.text = StringUtility.Contact("x", xbToolCnt);
@@ -265,9 +266,10 @@
             if (XBModel.CheckIsEmptyGrid(PackType.rptRunePack))
             {
                 int toolCnt = 0;
-                if (XBModel.IsHaveManyXBTool(2, out toolCnt))
+                int needToolCnt = 0;
+                if (XBModel.IsHaveManyXBTool(2, out toolCnt,out needToolCnt))
                 {
-                    int needToolCnt = funcSet.costToolNums[1] - toolCnt;
+                    needToolCnt = funcSet.costToolNums[1] - toolCnt;
                     int needMoney = needToolCnt * xbOneMoney;
                     if (needToolCnt > 0)
                     {
diff --git a/System/MainInterfacePanel/FlyingShoesTask.cs b/System/MainInterfacePanel/FlyingShoesTask.cs
index 66291d4..0821dc5 100644
--- a/System/MainInterfacePanel/FlyingShoesTask.cs
+++ b/System/MainInterfacePanel/FlyingShoesTask.cs
@@ -132,7 +132,10 @@
                 else
                 {
                     StateDetermination();
-                    ContentText.ExcuteHref();
+                    var mapModel = ModelCenter.Instance.GetModel<MapModel>();
+                    var point = mapModel.GetRecommendHangPoint();
+                    var config = Config.Instance.Get<MapEventPointConfig>(point);
+                    MapTransferUtility.Instance.MoveToNPC(config.NPCID);
                 }
                 return;
             }
@@ -203,6 +206,8 @@
             }
         }
 
+        
+
         private void StateDetermination()//鐘舵�佸垽瀹�
         {
             DropItemManager.StopMissionPickup = true;//涓诲姩鍋滄鎷惧彇鐗╁搧
diff --git a/System/MainInterfacePanel/LowSettingTip.cs b/System/MainInterfacePanel/LowSettingTip.cs
index 4fc230a..fdf218b 100644
--- a/System/MainInterfacePanel/LowSettingTip.cs
+++ b/System/MainInterfacePanel/LowSettingTip.cs
@@ -88,6 +88,8 @@
         }
         private void GodBeastBtn()
         {
+            SysNotifyMgr.Instance.ShowTip("FuncNextVersion");//淇℃伅鎻愮ず
+            return;
             WindowCenter.Instance.Close<MainInterfaceWin>();
             WindowCenter.Instance.Open<DogzWin>();
         }
diff --git a/System/Strengthening/GodBeastSlidingList.cs b/System/Strengthening/GodBeastSlidingList.cs
index fbefb21..c2a2ebc 100644
--- a/System/Strengthening/GodBeastSlidingList.cs
+++ b/System/Strengthening/GodBeastSlidingList.cs
@@ -251,7 +251,7 @@
                 }
                 else
                 {
-                    if (Quality < 10 && GodBeastBagList[i].IsEquipment != 1 && GodBeastBagList[i].Color > Quality)//杩囨护鎺夊彧鍓╂墍閫夊搧璐ㄨ澶�
+                    if (Quality < 10 && (GodBeastBagList[i].IsEquipment != 1 || GodBeastBagList[i].Color > Quality))//杩囨护鎺夊彧鍓╂墍閫夊搧璐ㄨ澶�
                     {
                         int type = i;
                         DeleteIndexList.Add(type);
diff --git a/System/Treasure/TreasureModel.cs b/System/Treasure/TreasureModel.cs
index 75b6be2..b832be8 100644
--- a/System/Treasure/TreasureModel.cs
+++ b/System/Treasure/TreasureModel.cs
@@ -1194,10 +1194,10 @@
                         treasureAchievementDict.Add(config.ID, config.Achievements[i]);
                         break;
                     }
-                    else if (config.Category == (int)TreasureCategory.Fairy && config.ID == 301)
-                    {
-                        eightFurnacesAchievements.Add(config.Achievements[i]);
-                    }
+                    //else if (config.Category == (int)TreasureCategory.Fairy && config.ID == 301)
+                    //{
+                    //    eightFurnacesAchievements.Add(config.Achievements[i]);
+                    //}
                 }
 
                 if (treasure.state == TreasureState.Locked && config.PreTreasure == 0)
@@ -1218,6 +1218,16 @@
                 {
                     treasureMapDict.Add(config.ID, config.MapId);
                 }
+
+                if (config.ID == 301)
+                {
+                    List<int> list = null;
+                    SuccessConfig.TryGetTreasureExpAchievements(config.ID, out list);
+                    if (list != null)
+                    {
+                        eightFurnacesAchievements.AddRange(list);
+                    }
+                }
             }
 
             var treasureUpConfigs = Config.Instance.GetAllValues<TreasureUpConfig>();

--
Gitblit v1.8.0