From a5ed3d3c8ca11ef0a724acb16f9db3b84b070c38 Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期三, 24 四月 2019 14:06:14 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts

---
 System/Treasure/TreasureCollectBriefInfoBehaviour.cs |    2 
 System/Treasure/TreasureChapterWin.cs                |   19 +++++++--
 System/KnapSack/Logic/SinglePack.cs                  |   27 ++++++++++---
 System/KnapSack/Logic/PackModel.cs                   |   17 +++++---
 System/Treasure/FunctionUnlockFlyObject.cs           |    2 
 5 files changed, 49 insertions(+), 18 deletions(-)

diff --git a/System/KnapSack/Logic/PackModel.cs b/System/KnapSack/Logic/PackModel.cs
index 864b4c1..f8c7d82 100644
--- a/System/KnapSack/Logic/PackModel.cs
+++ b/System/KnapSack/Logic/PackModel.cs
@@ -653,12 +653,12 @@
             return itemModel;
         }
 
-        public List<ItemModel> GetItemsById(PackType type, int id)
+        public List<ItemModel> GetItemsById(PackType type, int id, bool includeAuction = false)
         {
             if (playerPackDict.ContainsKey(type))
             {
                 var singlePack = playerPackDict[type];
-                return singlePack.GetItemsById(id);
+                return singlePack.GetItemsById(id, includeAuction);
             }
             else
             {
@@ -678,11 +678,16 @@
             }
         }
 
-        public string GetItemGUIDByID(int itemId)
+        public string GetItemGUIDByID(int itemId, bool includeAuction = false)
         {
             string guid = string.Empty;
             foreach (var key in itemGUIDDict.Keys)
-            {
+            {
+                if (!includeAuction && itemGUIDDict[key].isAuction)
+                {
+                    continue;
+                }
+
                 if (itemGUIDDict[key].itemId == itemId)
                 {
                     guid = key;
@@ -699,13 +704,13 @@
         /// <param name="type"></param>
         /// <param name="id"></param>
         /// <returns></returns>
-        public int GetItemCountByID(PackType type, int id)
+        public int GetItemCountByID(PackType type, int id, bool includeAuction = false)
         {
             int count = 0;
             var singlePack = GetSinglePack(type);
             if (singlePack != null)
             {
-                count = singlePack.GetCountById(id);
+                count = singlePack.GetCountById(id, includeAuction);
             }
 
             return count;
diff --git a/System/KnapSack/Logic/SinglePack.cs b/System/KnapSack/Logic/SinglePack.cs
index 2fcd10c..087441e 100644
--- a/System/KnapSack/Logic/SinglePack.cs
+++ b/System/KnapSack/Logic/SinglePack.cs
@@ -57,25 +57,35 @@
             return items;
         }
 
-        public List<ItemModel> GetItemsById(int itemId)
+        public List<ItemModel> GetItemsById(int itemId, bool includeAuction = false)
         {
             var list = new List<ItemModel>();
-            foreach (var model in items.Values)
+            foreach (var item in items.Values)
             {
-                if (model.itemId == itemId)
+                if (!includeAuction && item.isAuction)
                 {
-                    list.Add(model);
+                    continue;
+                }
+
+                if (item.itemId == itemId)
+                {
+                    list.Add(item);
                 }
             }
 
             return list;
         }
 
-        public int GetCountById(int itemId)
+        public int GetCountById(int itemId, bool includeAuction = false)
         {
             var count = 0;
             foreach (var item in items.Values)
             {
+                if (!includeAuction && item.isAuction)
+                {
+                    continue;
+                }
+
                 if (item.itemId == itemId)
                 {
                     count += item.count;
@@ -127,11 +137,16 @@
         /// <param name="needCount"></param>
         /// <param name="type"></param>
         /// <returns></returns>
-        public List<int> GetItemIndexsAppointedCount(int itemId, int needCount)
+        public List<int> GetItemIndexsAppointedCount(int itemId, int needCount, bool includeAuction = false)
         {
             var goalItems = new List<ItemModel>();
             foreach (var item in this.items.Values)
             {
+                if (!includeAuction && item.isAuction)
+                {
+                    continue;
+                }
+
                 if (item.itemId == itemId)
                 {
                     goalItems.Add(item);
diff --git a/System/Treasure/FunctionUnlockFlyObject.cs b/System/Treasure/FunctionUnlockFlyObject.cs
index 9d7b6dd..e2dc7fd 100644
--- a/System/Treasure/FunctionUnlockFlyObject.cs
+++ b/System/Treasure/FunctionUnlockFlyObject.cs
@@ -69,7 +69,7 @@
                     originalScale = 9f;
                     break;
                 case FunctionUnlockType.TreasureChapter:
-                    originalScale = 1f;
+                    originalScale = 2f;
                     var treasureConfig = TreasureConfig.Get(m_Id);
                     m_FunctionIcon.SetSprite(treasureConfig.Icon);
                     break;
diff --git a/System/Treasure/TreasureChapterWin.cs b/System/Treasure/TreasureChapterWin.cs
index 12d9ac2..2a13524 100644
--- a/System/Treasure/TreasureChapterWin.cs
+++ b/System/Treasure/TreasureChapterWin.cs
@@ -14,6 +14,7 @@
 
     public class TreasureChapterWin : Window
     {
+        [SerializeField] RawImage m_GaussianMask;
         [SerializeField] UIAlphaTween m_AlphaTween;
         [SerializeField] Text m_ChapterName;
         [SerializeField] Image m_ChapterIcon;
@@ -54,21 +55,23 @@
 
             flying = false;
 
-            m_CloseRemind.gameObject.SetActive(false);
+            m_GaussianMask.gameObject.SetActive(false);
 
             m_AlphaTween.from = 0f;
             m_AlphaTween.to = 1f;
+            m_AlphaTween.SetStartState();
+
+            m_CloseRemind.gameObject.SetActive(false);
 
             PlayerDatas.Instance.hero.StopAll();
 
             Display();
-            m_AlphaTween.SetStartState();
         }
 
         protected override void OnActived()
         {
             base.OnActived();
-            m_AlphaTween.Play();
+            CameraUtility.ScreenShotCut(m_GaussianMask, DoPrepare, true);
         }
 
         protected override void OnAfterOpen()
@@ -97,12 +100,19 @@
         }
         #endregion
 
+        private void DoPrepare()
+        {
+            m_GaussianMask.gameObject.SetActive(true);
+            m_AlphaTween.Play();
+        }
+
         void Display()
         {
             var instance = UIUtility.CreateWidget("TreasureChapterFlyObject", "TreasureChapterFlyObject");
             instance.transform.SetParentEx(m_ContainerFly, Vector3.zero, Quaternion.identity, Vector3.one);
             flyObject = instance.GetComponent<FunctionUnlockFlyObject>();
             flyObject.SetContent(FunctionUnlockType.TreasureChapter, model.treasureChapterId);
+            flyObject.SetSpeed(6f);
             flyObject.gameObject.SetActive(true);
 
             var config = TreasureConfig.Get(model.treasureChapterId);
@@ -117,7 +127,7 @@
             {
                 m_ChapterIcon.SetSprite(chapterConfig.taskTitle);
                 m_ChapterName.text = Language.Get("TreasureChapterName", Language.Get("Num_CHS_" + chapterConfig.chapterIndex));
-                m_Description.text = chapterConfig.description;
+                m_Description.text = UIHelper.ReplaceNewLine(chapterConfig.description);
             }
         }
 
@@ -127,6 +137,7 @@
             {
                 return;
             }
+            m_GaussianMask.gameObject.SetActive(false);
             flying = true;
             m_AlphaTween.from = 1f;
             m_AlphaTween.to = 0f;
diff --git a/System/Treasure/TreasureCollectBriefInfoBehaviour.cs b/System/Treasure/TreasureCollectBriefInfoBehaviour.cs
index b8dbcd9..41e8317 100644
--- a/System/Treasure/TreasureCollectBriefInfoBehaviour.cs
+++ b/System/Treasure/TreasureCollectBriefInfoBehaviour.cs
@@ -72,7 +72,6 @@
         {
             if (id == displayId)
             {
-                DisplayProgress();
                 m_ProgressEffect.Play();
                 if (m_CacheCoroutine != null)
                 {
@@ -87,6 +86,7 @@
         {
             yield return WaitingForSecondConst.WaitMS1500;
             m_ProgressEffect.StopImediatly();
+            DisplayProgress();
         }
 
         void DisplayBase()

--
Gitblit v1.8.0