From f2f6a288f1df9d5cf2eb07cf0ded09c1a6ce3af2 Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期三, 15 八月 2018 16:01:55 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts

---
 System/MainInterfacePanel/HighSettingTip.cs           |   37 ++--
 System/Dungeon/TrialExchangeTitleCell.cs              |   19 ++
 System/Dungeon/TrialExchangeWin.cs                    |   65 ++++++
 System/Dungeon/TrialExchangeCell.cs                   |   75 ++------
 System/Dungeon/TrialExchangeCell.cs.meta              |    4 
 System/Dungeon/TrialExchangeBehaviour.cs              |   80 ++++++++
 System/Dungeon/TrialExchangeBehaviour.cs.meta         |   12 +
 System/Dungeon/TrialDungeonModel.cs                   |  133 +++++++++++++-
 System/Dungeon/TrialExchangeTitleCell.cs.meta         |   12 +
 System/MainInterfacePanel/TopAnimationPlay.cs         |    4 
 System/MainInterfacePanel/HighSettingFadeInFadeOut.cs |   72 +++++--
 System/Rune/RuneModel.cs                              |    2 
 12 files changed, 398 insertions(+), 117 deletions(-)

diff --git a/System/Dungeon/TrialDungeonModel.cs b/System/Dungeon/TrialDungeonModel.cs
index d8d55fe..3f7b2c3 100644
--- a/System/Dungeon/TrialDungeonModel.cs
+++ b/System/Dungeon/TrialDungeonModel.cs
@@ -10,6 +10,7 @@
     {
         Dictionary<int, List<TrialExchangeConfig>> trialTokenExchangeDict = new Dictionary<int, List<TrialExchangeConfig>>();
         Dictionary<int, int> lineToTokenClassDict;
+        public Dictionary<int, List<int>> trialClassTokens = new Dictionary<int, List<int>>();
         public List<int> trialTokens = new List<int>();
         PlayerPackModel packModel { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
         DailyQuestModel dailyQuestModel { get { return ModelCenter.Instance.GetModel<DailyQuestModel>(); } }
@@ -54,6 +55,16 @@
                 if (!trialTokens.Contains(configs[i].tokenId))
                 {
                     trialTokens.Add(configs[i].tokenId);
+                    List<int> _tokens;
+                    if (!trialClassTokens.TryGetValue(itemConfig.LV, out _tokens))
+                    {
+                        _tokens = new List<int>();
+                        trialClassTokens.Add(itemConfig.LV, _tokens);
+                    }
+                    if (!_tokens.Contains(configs[i].tokenId))
+                    {
+                        _tokens.Add(configs[i].tokenId);
+                    }
                 }
             }
             var funcConfig = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("LineToItemStage");
@@ -67,6 +78,10 @@
         private void RefreshItemCountAct(PackType packType, int arg2, int itemId)
         {
             if (packType == PackType.rptItem && trialTokens.Contains(itemId))
+            {
+                UpdateRedpoint();
+            }
+            else if (packType == PackType.rptEquip)
             {
                 UpdateRedpoint();
             }
@@ -144,9 +159,14 @@
             {
                 NewBieCenter.Instance.RemoveNewBieGuide(TRIALEXCHANGE_GUIDE);
             }
-            CA32F_tagCMTrialExchange pak = new CA32F_tagCMTrialExchange();
-            pak.ID = (uint)_id;
-            GameNetSystem.Instance.SendInfo(pak);
+            var tokenConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(config.tokenId);
+            ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"),
+                Language.Get("TokenUseConfirm", config.tokenCount, tokenConfig.ItemName, config.description), (bool isOk) =>
+                   {
+                       CA32F_tagCMTrialExchange pak = new CA32F_tagCMTrialExchange();
+                       pak.ID = (uint)_id;
+                       GameNetSystem.Instance.SendInfo(pak);
+                   });
             return true;
         }
 
@@ -182,6 +202,44 @@
             SysNotifyMgr.Instance.ShowTip("TrialExchangeLimit");
         }
 
+        public int EquipCompare(int _itemId)
+        {
+            var config = ConfigManager.Instance.GetTemplate<ItemConfig>(_itemId);
+            var equipPlace = config.EquipPlace;
+            if (equipPlace == 0)
+            {
+                return 0;
+            }
+            var singlepack = packModel.GetSinglePackModel(PackType.rptEquip);
+            if (singlepack == null)
+            {
+                return 1;
+            }
+            var equipItem = singlepack.GetItemModelByIndex(equipPlace);
+            if (equipItem == null)
+            {
+                return 1;
+            }
+            var compareConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(equipItem.itemId);
+            if (compareConfig == null)
+            {
+                return 1;
+            }
+            if (compareConfig.ItemColor != config.ItemColor)
+            {
+                return compareConfig.ItemColor > config.ItemColor ? -1 : 1;
+            }
+            if (compareConfig.StarLevel != config.StarLevel)
+            {
+                return compareConfig.StarLevel > config.StarLevel ? -1 : 1;
+            }
+            if (compareConfig.LV != config.LV)
+            {
+                return compareConfig.LV > config.LV ? -1 : 1;
+            }
+            return 0;
+        }
+
         #region 绾㈢偣
         void UpdateRedpoint()
         {
@@ -199,22 +257,77 @@
 
         public bool TryGetSatisfyExchange(out int maxClass)
         {
-            var configs = ConfigManager.Instance.GetAllValues<TrialExchangeConfig>();
             maxClass = 0;
-            for (int i = 0; i < configs.Count; i++)
+            foreach (var _class in trialTokenExchangeDict.Keys)
             {
-                var count = GetTrialTokenCount(configs[i].tokenId);
-                if (count >= configs[i].tokenCount)
+                List<TrialExchangeConfig> list;
+                if (TryGetTrialExchanges(_class, out list))
                 {
-                    var itemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(configs[i].tokenId);
-                    if (itemConfig.LV > maxClass)
+                    for (int i = 0; i < list.Count; i++)
                     {
-                        maxClass = itemConfig.LV;
+                        if (SatisfyExchangeBetter(list[i].id))
+                        {
+                            var itemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(list[i].tokenId);
+                            if (itemConfig.LV > maxClass)
+                            {
+                                maxClass = itemConfig.LV;
+                            }
+                            break;
+                        }
                     }
                 }
             }
             return maxClass != 0;
         }
+
+        public bool SatisfyExchangeBetter(int _id)
+        {
+            var config = ConfigManager.Instance.GetTemplate<TrialExchangeConfig>(_id);
+            if (config == null)
+            {
+                return false;
+            }
+            var count = GetTrialTokenCount(config.tokenId);
+            if (count < config.tokenCount)
+            {
+                return false;
+            }
+            var exchangeItemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(config.exchangeItemID);
+            if (exchangeItemConfig.EquipPlace == 0)
+            {
+                return true;
+            }
+            if (EquipCompare(config.exchangeItemID) == 1)
+            {
+                return true;
+            }
+            return false;
+        }
+
+        public bool IsAnySatisfyExchangeBetterEquip(int _class, out int _id)
+        {
+            _id = -1;
+            List<TrialExchangeConfig> list;
+            if (TryGetTrialExchanges(_class, out list))
+            {
+                for (int i = 0; i < list.Count; i++)
+                {
+                    var itemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(list[i].exchangeItemID);
+                    if (SatisfyExchangeBetter(list[i].id) && itemConfig.EquipPlace != 0)
+                    {
+                        _id = list[i].id;
+                        return true;
+                    }
+                }
+            }
+            return false;
+        }
+
+        public bool IsAnySatisfyExchangeBetter()
+        {
+            int _class = 0;
+            return TryGetSatisfyExchange(out _class);
+        }
         #endregion
     }
 }
diff --git a/System/Dungeon/TrialExchangeBehaviour.cs b/System/Dungeon/TrialExchangeBehaviour.cs
new file mode 100644
index 0000000..64bdc8a
--- /dev/null
+++ b/System/Dungeon/TrialExchangeBehaviour.cs
@@ -0,0 +1,80 @@
+锘縰sing System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+using TableConfig;
+using System;
+
+namespace Snxxz.UI
+{
+    public class TrialExchangeBehaviour : MonoBehaviour
+    {
+        [SerializeField] ItemCell m_Item;
+        [SerializeField] Text m_Description;
+        [SerializeField] ItemBehaviour m_Token;
+        [SerializeField] Button m_Exchange;
+        [SerializeField] Image m_Redpoint;
+        [SerializeField] Image m_Up;
+        [SerializeField] Image m_Down;
+        TrialDungeonModel model { get { return ModelCenter.Instance.GetModel<TrialDungeonModel>(); } }
+        DailyQuestModel dailyQuestModel { get { return ModelCenter.Instance.GetModel<DailyQuestModel>(); } }
+
+        PlayerPackModel packModel { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
+
+        int trialExchangeId = 0;
+        private void Awake()
+        {
+            m_Exchange.AddListener(Exchange);
+        }
+
+        private void Exchange()
+        {
+            if (trialExchangeId != 0)
+            {
+                int error = 0;
+                if (!model.TrialSendExchange(trialExchangeId, out error))
+                {
+                    if (error == 1)
+                    {
+                        var config = ConfigManager.Instance.GetTemplate<TrialExchangeConfig>(trialExchangeId);
+                        if (config != null)
+                        {
+                            ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(config.tokenId);
+                        }
+                    }
+                }
+            }
+        }
+
+        public void Display(int id, bool equipBetter = true)
+        {
+            trialExchangeId = id;
+            var config = ConfigManager.Instance.GetTemplate<TrialExchangeConfig>(id);
+            if (config == null)
+            {
+                trialExchangeId = 0;
+                return;
+            }
+            m_Item.cellBtn.RemoveAllListeners();
+            m_Item.gameObject.SetActive(true);
+            ItemCellModel cellModel = new ItemCellModel(config.exchangeItemID, true, (ulong)config.exchangeItemCount, config.exchangeItemIsBind);
+            m_Item.Init(cellModel);
+            m_Item.cellBtn.AddListener(() =>
+            {
+                ItemAttrData itemAttrData = new ItemAttrData(config.exchangeItemID, true, (ulong)config.exchangeItemCount, -1, config.exchangeItemIsBind, true);
+                ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(itemAttrData);
+            });
+            m_Description.text = config.description;
+            m_Token.SetItem(config.tokenId, config.tokenCount);
+            var count = model.GetTrialTokenCount(config.tokenId);
+            m_Token.count.color = UIHelper.GetUIColor(count >= config.tokenCount ? TextColType.Green : TextColType.NavyBrown, true);
+            var equipCompare = model.EquipCompare(config.exchangeItemID);
+            m_Up.gameObject.SetActive(equipCompare == 1);
+            m_Down.gameObject.SetActive(equipCompare == -1);
+
+            var exchangeItemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(config.exchangeItemID);
+            m_Redpoint.gameObject.SetActive(count >= config.tokenCount && (equipBetter || exchangeItemConfig.EquipPlace == 0));
+        }
+    }
+}
+
diff --git a/System/Dungeon/TrialExchangeBehaviour.cs.meta b/System/Dungeon/TrialExchangeBehaviour.cs.meta
new file mode 100644
index 0000000..f9fb53b
--- /dev/null
+++ b/System/Dungeon/TrialExchangeBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 9ebb65b796d3424439f2dff414553268
+timeCreated: 1533181655
+licenseType: Pro
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 
diff --git a/System/Dungeon/TrialExchangeCell.cs b/System/Dungeon/TrialExchangeCell.cs
index 5776fe5..f48d3f1 100644
--- a/System/Dungeon/TrialExchangeCell.cs
+++ b/System/Dungeon/TrialExchangeCell.cs
@@ -1,72 +1,37 @@
 锘縰sing System.Collections;
 using System.Collections.Generic;
-using UnityEngine;
-using UnityEngine.UI;
 using TableConfig;
-using System;
-
+using UnityEngine;
 namespace Snxxz.UI
 {
     public class TrialExchangeCell : CellView
     {
-        [SerializeField] ItemCell m_Item;
-        [SerializeField] Text m_Description;
-        [SerializeField] ItemBehaviour m_Token;
-        [SerializeField] Button m_Exchange;
-        [SerializeField] Image m_Redpoint;
+        [SerializeField] TrialExchangeBehaviour[] m_TrialExchanges;
+
         TrialDungeonModel model { get { return ModelCenter.Instance.GetModel<TrialDungeonModel>(); } }
-        DailyQuestModel dailyQuestModel { get { return ModelCenter.Instance.GetModel<DailyQuestModel>(); } }
 
-        int trialExchangeId = 0;
-        private void Awake()
+        public void Display(int _class, int _line)
         {
-            m_Exchange.AddListener(Exchange);
-        }
-
-        private void Exchange()
-        {
-            if (trialExchangeId != 0)
+            List<TrialExchangeConfig> list;
+            if (!model.TryGetTrialExchanges(_class, out list))
             {
-                int error = 0;
-                if (!model.TrialSendExchange(trialExchangeId, out error))
-                {
-                    if (error == 1)
-                    {
-                        var config = ConfigManager.Instance.GetTemplate<TrialExchangeConfig>(trialExchangeId);
-                        if (config != null)
-                        {
-                            ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(config.tokenId);
-                        }
-                    }
-                    model.ProcessTrialError(error);
-                }
-            }
-        }
-
-        public void Display(int id)
-        {
-            trialExchangeId = id;
-            var config = ConfigManager.Instance.GetTemplate<TrialExchangeConfig>(id);
-            if (config == null)
-            {
-                trialExchangeId = 0;
                 return;
             }
-            m_Item.cellBtn.RemoveAllListeners();
-            m_Item.gameObject.SetActive(true);
-            ItemCellModel cellModel = new ItemCellModel(config.exchangeItemID, true, (ulong)config.exchangeItemCount, config.exchangeItemIsBind);
-            m_Item.Init(cellModel);
-            m_Item.cellBtn.AddListener(() =>
+            int _betterEquipId = -1;
+            model.IsAnySatisfyExchangeBetterEquip(_class, out _betterEquipId);
+            for (int i = 0; i < m_TrialExchanges.Length; i++)
             {
-                ItemAttrData itemAttrData = new ItemAttrData(config.exchangeItemID, true, (ulong)config.exchangeItemCount, -1, config.exchangeItemIsBind);
-                ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(itemAttrData);
-            });
-            m_Description.text = config.description;
-            m_Token.SetItem(config.tokenId, config.tokenCount);
-
-            var count = model.GetTrialTokenCount(config.tokenId);
-            m_Redpoint.gameObject.SetActive(count >= config.tokenCount
-                && dailyQuestModel.trialExchangeRedpoint.state == RedPointState.Simple);
+                var index = _line * 4 + i;
+                if (index < list.Count)
+                {
+                    m_TrialExchanges[i].gameObject.SetActive(true);
+                    m_TrialExchanges[i].Display(list[index].id, _betterEquipId == list[index].id);
+                }
+                else
+                {
+                    m_TrialExchanges[i].gameObject.SetActive(false);
+                }
+            }
         }
     }
 }
diff --git a/System/Dungeon/TrialExchangeCell.cs.meta b/System/Dungeon/TrialExchangeCell.cs.meta
index 63de5ee..c962446 100644
--- a/System/Dungeon/TrialExchangeCell.cs.meta
+++ b/System/Dungeon/TrialExchangeCell.cs.meta
@@ -1,6 +1,6 @@
 fileFormatVersion: 2
-guid: 9ebb65b796d3424439f2dff414553268
-timeCreated: 1533181655
+guid: 5c0805e8cad6c2e44bbd30aaaff7008f
+timeCreated: 1534302392
 licenseType: Pro
 MonoImporter:
   serializedVersion: 2
diff --git a/System/Dungeon/TrialExchangeTitleCell.cs b/System/Dungeon/TrialExchangeTitleCell.cs
new file mode 100644
index 0000000..11baabd
--- /dev/null
+++ b/System/Dungeon/TrialExchangeTitleCell.cs
@@ -0,0 +1,19 @@
+锘縰sing System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+
+namespace Snxxz.UI
+{
+    public class TrialExchangeTitleCell : CellView
+    {
+        [SerializeField] Image m_BackGround;
+        [SerializeField] Text m_Title;
+
+        public void Display(int _class)
+        {
+            m_Title.text = Language.Get("TrialExchangeTitle", _class);
+        }
+    }
+}
+
diff --git a/System/Dungeon/TrialExchangeTitleCell.cs.meta b/System/Dungeon/TrialExchangeTitleCell.cs.meta
new file mode 100644
index 0000000..d07f918
--- /dev/null
+++ b/System/Dungeon/TrialExchangeTitleCell.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 62d21c0bcc1b7ad4e8528d2bfb9f7b91
+timeCreated: 1534303452
+licenseType: Pro
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 
diff --git a/System/Dungeon/TrialExchangeWin.cs b/System/Dungeon/TrialExchangeWin.cs
index bde81f7..d2404fd 100644
--- a/System/Dungeon/TrialExchangeWin.cs
+++ b/System/Dungeon/TrialExchangeWin.cs
@@ -18,6 +18,8 @@
         [SerializeField] Text m_SelectClass;
         [SerializeField] Button m_SelectClassUp;
         [SerializeField] TrialSelectClassBehaviour m_SelectClassBehaviour;
+        [SerializeField] ItemBehaviour[] m_Tokens;
+        [SerializeField] Text[] m_TokenCounts;
         [SerializeField] Button m_Close;
 
         TrialDungeonModel model { get { return ModelCenter.Instance.GetModel<TrialDungeonModel>(); } }
@@ -98,8 +100,19 @@
         #endregion
         private void OnRefreshCell(ScrollerDataType type, CellView cell)
         {
-            TrialExchangeCell trialExchangeCell = cell as TrialExchangeCell;
-            trialExchangeCell.Display(cell.index);
+            switch (type)
+            {
+                case ScrollerDataType.Header:
+                    var _class = cell.index / 100;
+                    var _line = cell.index % 100;
+                    TrialExchangeCell trialExchangeCell = cell as TrialExchangeCell;
+                    trialExchangeCell.Display(_class, _line);
+                    break;
+                case ScrollerDataType.Normal:
+                    TrialExchangeTitleCell trialExchangeTitleCell = cell as TrialExchangeTitleCell;
+                    trialExchangeTitleCell.Display(cell.index);
+                    break;
+            }
         }
 
         private void SelectClassUp()
@@ -117,6 +130,7 @@
         {
             DisplayTrialExchanges();
             DisplaySelectClass();
+            DisplayTokens();
         }
 
         void DisplayTrialExchanges()
@@ -124,10 +138,19 @@
             m_Controller.Refresh();
             if (model.selectEquipClass == 1)
             {
-                var configs = ConfigManager.Instance.GetAllValues<TrialExchangeConfig>();
-                for (int i = 0; i < configs.Count; i++)
+                var trialClasses = model.GetTotalClass();
+                for (int i = 0; i < trialClasses.Count; i++)
                 {
-                    m_Controller.AddCell(ScrollerDataType.Header, configs[i].id);
+                    List<TrialExchangeConfig> list;
+                    if (model.TryGetTrialExchanges(trialClasses[i], out list))
+                    {
+                        m_Controller.AddCell(ScrollerDataType.Normal, trialClasses[i]);
+                        var line = Mathf.CeilToInt((float)list.Count / 4);
+                        for (int k = 0; k < line; k++)
+                        {
+                            m_Controller.AddCell(ScrollerDataType.Header, trialClasses[i] * 100 + k);
+                        }
+                    }
                 }
             }
             else
@@ -135,9 +158,10 @@
                 List<TrialExchangeConfig> list;
                 if (model.TryGetTrialExchanges(model.selectEquipClass, out list))
                 {
-                    for (int i = 0; i < list.Count; i++)
+                    var line = Mathf.CeilToInt((float)list.Count / 4);
+                    for (int i = 0; i < line; i++)
                     {
-                        m_Controller.AddCell(ScrollerDataType.Header, list[i].id);
+                        m_Controller.AddCell(ScrollerDataType.Header, model.selectEquipClass * 100 + i);
                     }
                 }
             }
@@ -149,6 +173,11 @@
             if (packtype == PackType.rptItem && model.trialTokens.Contains(itemId))
             {
                 m_Controller.m_Scorller.RefreshActiveCellViews();
+                DisplayTokens();
+            }
+            else if (packtype == PackType.rptEquip)
+            {
+                m_Controller.m_Scorller.RefreshActiveCellViews();
             }
         }
 
@@ -158,10 +187,32 @@
                 Language.Get("EquipSuitLV", Language.Get(StringUtility.Contact("Num_CHS_", model.selectEquipClass)));
         }
 
+        void DisplayTokens()
+        {
+            var list = model.trialClassTokens.ContainsKey(model.selectEquipClass) ? model.trialClassTokens[model.selectEquipClass] : null;
+            for (int i = 0; i < m_Tokens.Length; i++)
+            {
+                if (list != null && i < list.Count)
+                {
+                    m_Tokens[i].gameObject.SetActive(model.selectEquipClass != 1);
+                    if (model.selectEquipClass != 1)
+                    {
+                        m_Tokens[i].SetItem(list[i], 0);
+                        m_TokenCounts[i].text = model.GetTrialTokenCount(list[i]).ToString();
+                    }
+                }
+                else
+                {
+                    m_Tokens[i].gameObject.SetActive(false);
+                }
+            }
+        }
+
         private void SelectEquipClassEvent()
         {
             DisplayTrialExchanges();
             DisplaySelectClass();
+            DisplayTokens();
             bool _up = m_SelectClassBehaviour.gameObject.activeSelf;
             m_SelectClassUp.transform.localEulerAngles = Vector3.zero.SetZ(_up ? 0 : 180);
         }
diff --git a/System/MainInterfacePanel/HighSettingFadeInFadeOut.cs b/System/MainInterfacePanel/HighSettingFadeInFadeOut.cs
index 53aaede..a092d56 100644
--- a/System/MainInterfacePanel/HighSettingFadeInFadeOut.cs
+++ b/System/MainInterfacePanel/HighSettingFadeInFadeOut.cs
@@ -99,7 +99,7 @@
 
         private void operationEndEvent(Operation arg1, int arg2)
         {
-            if (arg1 == Operation.GiftPackage || arg1 == Operation.FairyCeremony)
+            if (arg1 == Operation.FairyCeremony)
             {
                 Classify();
             }
@@ -107,7 +107,7 @@
 
         private void operationStartEvent(Operation arg1, int arg2)
         {
-            if (arg1 == Operation.GiftPackage || arg1 == Operation.FairyCeremony)
+            if (arg1 == Operation.FairyCeremony)
             {
                 Classify();
             }
@@ -378,7 +378,6 @@
             PositionReduction();
             SetGroupTop();
             SetGroupLow();
-            //  SetGroupThree();
             SetfatherNodeTop();
             SetfatherNodeLow();
             SetfatherNodeThree();
@@ -555,7 +554,8 @@
                         }
                         else if (IndexOf == 1)
                         {
-                            if (ModelCenter.Instance.GetModel<OSGiftModel>().activate)//瓒呭�肩ぜ鍖�
+                            var _funcOrder = 0;
+                            if (OpenServerActivityCenter.Instance.IsAnyActivityOpen(out _funcOrder))//寮�鏈嶆椿鍔�
                             {
                                 if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index))
                                 {
@@ -581,22 +581,8 @@
                         }
                         else if (IndexOf == 2)
                         {
-                            var _funcOrder = 0;
-                            if (OpenServerActivityCenter.Instance.IsAnyActivityOpen(out _funcOrder))//寮�鏈嶆椿鍔�
-                            {
-                                if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index))
-                                {
-                                    SelectCaseRequest selectCaseRequest = new SelectCaseRequest();
-                                    selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i);
-                                    selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki;
-                                    selectCaseRequest.Index = highBtnRecord.Index;
-                                    AnimationFadeOutDicLow.Add(highBtnRecord.Index, selectCaseRequest);
-                                }
-                            }
-                        }
-                        else if (IndexOf == 3)
-                        {
-                            if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && OperationTimeHepler.Instance.InOperationTime(Operation.FairyCeremony))
+                            bool Isopen = OpenServerActivityCenter.Instance.IsActivityOpen(4);
+                            if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && Isopen)//闄愭椂鐗规儬
                             {
                                 if (AnimationFadeOutDicLow.Count < 6)//------绗簩灞�
                                 {
@@ -615,7 +601,51 @@
                                     AnimationFadeOutDicThree.Add(highBtnRecord.Index, selectCaseRequest);
                                 }
                             }
-
+                        }
+                        else if (IndexOf == 3)
+                        {
+                            bool Isopen = OpenServerActivityCenter.Instance.IsActivityOpen(0);
+                            if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && Isopen)//闄愭椂鐗规儬
+                            {
+                                if (AnimationFadeOutDicLow.Count < 6)//------绗簩灞�
+                                {
+                                    SelectCaseRequest selectCaseRequest = new SelectCaseRequest();
+                                    selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i);
+                                    selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki;
+                                    selectCaseRequest.Index = highBtnRecord.Index;
+                                    AnimationFadeOutDicLow.Add(highBtnRecord.Index, selectCaseRequest);
+                                }
+                                else//------绗笁灞�
+                                {
+                                    SelectCaseRequest selectCaseRequest = new SelectCaseRequest();
+                                    selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i);
+                                    selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki;
+                                    selectCaseRequest.Index = highBtnRecord.Index;
+                                    AnimationFadeOutDicThree.Add(highBtnRecord.Index, selectCaseRequest);
+                                }
+                            }
+                        }
+                        else if (IndexOf == 4)
+                        {
+                            if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && OperationTimeHepler.Instance.InOperationTime(Operation.FairyCeremony))//绮剧伒鐩涘吀
+                            {
+                                if (AnimationFadeOutDicLow.Count < 6)//------绗簩灞�
+                                {
+                                    SelectCaseRequest selectCaseRequest = new SelectCaseRequest();
+                                    selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i);
+                                    selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki;
+                                    selectCaseRequest.Index = highBtnRecord.Index;
+                                    AnimationFadeOutDicLow.Add(highBtnRecord.Index, selectCaseRequest);
+                                }
+                                else//------绗笁灞�
+                                {
+                                    SelectCaseRequest selectCaseRequest = new SelectCaseRequest();
+                                    selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i);
+                                    selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki;
+                                    selectCaseRequest.Index = highBtnRecord.Index;
+                                    AnimationFadeOutDicThree.Add(highBtnRecord.Index, selectCaseRequest);
+                                }
+                            }
                         }
                     }
                 }
diff --git a/System/MainInterfacePanel/HighSettingTip.cs b/System/MainInterfacePanel/HighSettingTip.cs
index 3909f89..a5f40cf 100644
--- a/System/MainInterfacePanel/HighSettingTip.cs
+++ b/System/MainInterfacePanel/HighSettingTip.cs
@@ -44,10 +44,12 @@
         [SerializeField] Button m_FindHostBtn;//浠欏疂瀵讳富
 
         [SerializeField] RechargeBtnBehaviour m_RechargetBtnBehaviour;
-        [SerializeField] Button m_OSGiftBtn;
 
         [SerializeField] Button m_LimitedTimePBtn;//闄愭椂绀煎寘
         [SerializeField] Button m_ElfFestivalBtn;//浠欑晫鐩涘吀
+
+        [SerializeField] Button m_FlashSaleBtn;//闄愭椂鐗规儬
+        [SerializeField] Button m_AllThePeopleBtn;//鍏ㄦ皯鍐叉
         private bool _bool = true;
         private int swicthCdTime = 0;
         private bool IsFadeOut = true;
@@ -65,7 +67,6 @@
         {
             swicthCdTime = int.Parse(ConfigManager.Instance.GetTemplate<FuncConfigConfig>("AutomaticSwitch").Numerical1);
             OpenServerActivityStateChange();
-            CheckOSGift();
             m_RechargetBtnBehaviour.Init();
             m_HighSettingFadeInFadeOut.Init();
             storeDesBtn.AddListener(() => { storeDesBtn.gameObject.SetActive(false); });
@@ -82,10 +83,11 @@
             m_HappyXBBtn.AddListener(OnClickHappyXBBtn);
             m_FindHostBtn.AddListener(OnClickFindHostBtn);
             m_OpenService.AddListener(OpenService);
-            m_OSGiftBtn.AddListener(OSGiftBtn);
             _RuneTaBtn.onClick.AddListener(RuneTaButton);
             m_LimitedTimePBtn.AddListener(OnCliCkLimitedTimePBtn);
             m_ElfFestivalBtn.AddListener(OnClickElfFestivalBtn);
+            m_FlashSaleBtn.AddListener(OnClickmFlashSaleBtn);
+            m_AllThePeopleBtn.AddListener(OnClickmAllThePeopleBtn);
             if (_bool)
             {
                 ColseButton();
@@ -137,9 +139,10 @@
             m_OpenService.RemoveAllListeners();
             m_HappyXBBtn.RemoveAllListeners();
             m_FindHostBtn.RemoveAllListeners();
-            m_OSGiftBtn.RemoveAllListeners();
             m_LimitedTimePBtn.RemoveAllListeners();
             _RuneTaBtn.onClick.RemoveAllListeners();
+            m_FlashSaleBtn.RemoveAllListeners();
+            m_AllThePeopleBtn.RemoveAllListeners();
             CoroutineMgr.Instance.MainHighTipCdTimeEvent -= OnMainHighTipCdTime;
             FunctionUnlockFlyObjectTarget.IsPlayerUiEffect -= IsPlayerUiEffect;
             FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChange;
@@ -266,32 +269,17 @@
                         WindowCenter.Instance.Open<FirstRechargeWin>(true);
                     }
                     break;
-                //case 2:
-                //    WindowCenter.Instance.Open<OpenServerGiftWin>();
-                //    break;
                 case 3:
                     WindowCenter.Instance.Close<MainInterfaceWin>();
                     WindowCenter.Instance.Open<VipRechargeWin>(false, 0);
                     break;
             }
         }
-
-        private void OSGiftBtn()
-        {
-            //WindowCenter.Instance.Open<OpenServerGiftWin>();
-        }
-
         void RuneTaButton()//绗﹀嵃濉�
         {
             WindowCenter.Instance.Close<MainInterfaceWin>();
             WindowCenter.Instance.Open<RuneTowerWin>();
         }
-        private void CheckOSGift()
-        {
-            m_OSGiftBtn.gameObject.SetActive(osGiftModel.activate);
-            SwithButtonObj();
-        }
-
         void OpenTreasure()
         {
             WindowCenter.Instance.Close<MainInterfaceWin>();
@@ -325,6 +313,17 @@
             WindowCenter.Instance.Close<MainInterfaceWin>();
             WindowCenter.Instance.Open<FairylandCeremonyWin>();
         }
+        void OnClickmFlashSaleBtn()//闄愭椂鐗规儬
+        {
+            WindowCenter.Instance.Close<MainInterfaceWin>();
+            WindowCenter.Instance.Open<OpenServerActivityWin>(false, 4);
+        }
+
+        void OnClickmAllThePeopleBtn()//鍏ㄦ皯鍐叉
+        {
+            WindowCenter.Instance.Close<MainInterfaceWin>();
+            WindowCenter.Instance.Open<OpenServerActivityWin>(false,0);
+        }
         public void ShowButton()//鍚戜笂
         {
 
diff --git a/System/MainInterfacePanel/TopAnimationPlay.cs b/System/MainInterfacePanel/TopAnimationPlay.cs
index b21e705..d97d06a 100644
--- a/System/MainInterfacePanel/TopAnimationPlay.cs
+++ b/System/MainInterfacePanel/TopAnimationPlay.cs
@@ -41,14 +41,14 @@
 
         private void operationStartEvent(Operation arg1, int arg2)
         {
-            if (arg1 == Operation.GiftPackage || arg1 == Operation.FairyCeremony)
+            if (arg1 == Operation.FairyCeremony)
             {
                 Await1();
             }
         }
         private void operationEndEvent(Operation arg1, int arg2)
         {
-            if (arg1 == Operation.GiftPackage || arg1 == Operation.FairyCeremony)
+            if ( arg1 == Operation.FairyCeremony)
             {
                 Await1();
             }
diff --git a/System/Rune/RuneModel.cs b/System/Rune/RuneModel.cs
index 651337d..41e2adc 100644
--- a/System/Rune/RuneModel.cs
+++ b/System/Rune/RuneModel.cs
@@ -743,7 +743,7 @@
             for (int i = 0; i < runes.Count; i++)
             {
                 int offset = (int)RuneTowerOpenLV - runes[i].TowerID;
-                if (offset >= 0)
+                if (offset >= 0 && runes[i].AttrType.Length < 2)
                 {
                     if (!unlockDict.ContainsKey(runes[i].TowerID))
                     {

--
Gitblit v1.8.0