소스 검색

茶话会套装小页签改成配置表计算后直接读取,修改茶话会筛选和排序规则

huangxiaoyue 1 년 전
부모
커밋
6071364681

+ 46 - 2
GameClient/Assets/Editor/Excel/Scanner/ItemApproachScanner.cs

@@ -13,16 +13,16 @@ namespace GFGEditor
     /// </summary>
     public class ItemApproachScanner
     {
-
         private delegate string GetApproachCall(int itemId);
 
-
         public static void startScan()
         {
             ItemCfg[] dataArray = ItemCfgArray.Instance.dataArray;
             GetApproachCall[] actions = new GetApproachCall[] { GetClothingShopApproach, GetLeaguePrayApproach, GetLeagueAnswerApproach, CheckStoreApproach, GetClothingSyntheticApproach, GetSuitGuideApproach, GetSuitSyntheticApproach, GetClothingDecomposeApproach, CheckClothingFosterApproach, CheckDailyTaskApproach, CheckWeeklyTaskApproach, GetZhaiXingApproach, GetStoryLevelApproach };
             Dictionary<SuitCfg, List<int>> suitDic = new Dictionary<SuitCfg, List<int>>();
             Dictionary<ItemCfg, List<int>> syntheticSuitDic = new Dictionary<ItemCfg, List<int>>();
+            Dictionary<SuitCfg, Dictionary<string, string>> suitTagsDic = new Dictionary<SuitCfg, Dictionary<string, string>>();
+
             int suitPartTotalCount = 0;
             int clothingPartsCount = 0;
             int cardCount = 0;
@@ -33,6 +33,7 @@ namespace GFGEditor
                 HandleItemSyntheticSuit(cfg, syntheticSuitDic);
                 HandleItemAndDressUpTable(cfg, ref clothingPartsCount);
                 HandleItemAndCardTable(cfg, ref cardCount);
+                HandleItemAndSuitTags(cfg, suitTagsDic);
             }
             var globalCfg = GlobalCfgArray.globalCfg;
             SQLiteHelper.Instance.OpenConnection();
@@ -68,6 +69,19 @@ namespace GFGEditor
                     var values = new string[] { string.Join(";", a.Value) };
                     SQLiteHelper.Instance.UpdateValues(nameof(ItemCfgArray), names, values, nameof(a.Key.id), a.Key.id.ToString());
                 }
+
+                //套装属性累加
+                foreach (var a in suitTagsDic)
+                {
+                    var names = new string[] { nameof(a.Key.tagsArr).Replace("Arr", "") };
+                    var value = "";
+                    foreach (var e in a.Value)
+                    {
+                         value = value + e.Key + "*" + e.Value+ ";";
+                    }
+                    var values = new string[] { string.Join(";", value) };
+                    SQLiteHelper.Instance.UpdateValues(nameof(SuitCfgArray), names, values, nameof(a.Key.id), a.Key.id.ToString());
+                }
             }
             catch (Exception e)
             {
@@ -183,6 +197,36 @@ namespace GFGEditor
             }
         }
 
+        private static void HandleItemAndSuitTags(ItemCfg itemCfg, Dictionary<SuitCfg, Dictionary<string,string>> suitTagsDic)
+        {
+            if (itemCfg.suitId <= 0)
+            {
+                return;
+            }
+            var suitCfg = SuitCfgArray.Instance.GetCfg(itemCfg.suitId);
+            if (suitCfg == null)
+            {
+                return;
+            }
+            if (itemCfg.itemType == ConstItemType.DRESS_UP)
+            {
+                for (int i = 0; i < itemCfg.tagsArr.Length; i++)
+                {
+                    suitTagsDic.TryGetValue(suitCfg, out var tags);
+                    if (tags == null)
+                    {
+                        tags = new Dictionary<string, string>();
+                        suitTagsDic[suitCfg] = tags;
+                    }
+                
+                    if (!tags.ContainsKey(itemCfg.tagsArr[i][0]))
+                        tags[itemCfg.tagsArr[i][0]] = itemCfg.tagsArr[i][1];
+                    else
+                        tags[itemCfg.tagsArr[i][0]] = (Convert.ToInt32(tags[itemCfg.tagsArr[i][0]]) + Convert.ToInt32(itemCfg.tagsArr[i][1])).ToString();
+                }
+            }
+        }
+
         private static void HandleItemApproch(ItemCfg cfg, GetApproachCall[] actions)
         {
             if (cfg.id == 3000001 || cfg.id == 3000002 || cfg.id == 3000003)

+ 5 - 42
GameClient/Assets/Editor/Excel/Scanner/SuitGuideScanner.cs

@@ -12,7 +12,6 @@ namespace GFGEditor
         {
             suitIds.Clear();
             var dataArray = SuitGuideMenuCfgArray.Instance.dataArray;
-            Dictionary<SuitCfg, List<string>> tagsDic = new Dictionary<SuitCfg, List<string>>();
 
             string strs = "";
             for (int i = 0; i < dataArray.Length; i++)
@@ -20,28 +19,17 @@ namespace GFGEditor
                 SuitGuideMenuCfg cfg = dataArray[i];
                 string str = string.Format(";{0}", cfg.suitIds);
                 strs += str;
-
-                HandleItemAndSuitTags(cfg, tagsDic);
             }
 
             SQLiteHelper.Instance.OpenConnection();
             try
             {
-                // foreach (var cfg in dataArray)
-                // {
-
-                //SuitGuideMenuCfg cfg = dataArray[0];
-                //var names = new string[] { nameof(cfg.suitIds) };
-                //var values = new string[] { strs };
-                //SQLiteHelper.Instance.UpdateValues(nameof(SuitGuideMenuCfgArray), names, values, nameof(cfg.id), cfg.id.ToString());
-                // }
-
-                //²ÄÁ϶ÔÓ¦µÄÌ××°id
-                foreach (var a in tagsDic)
+                foreach (var cfg in dataArray)
                 {
-                    var names = new string[] { nameof(a.Key.tagsArr).Replace("Arr", "") };
-                    var values = new string[] { string.Join(";", a.Value) };
-                    SQLiteHelper.Instance.UpdateValues(nameof(SuitCfgArray), names, values, nameof(a.Key.id), a.Key.id.ToString());
+                    //SuitGuideMenuCfg cfg = dataArray[0];
+                    var names = new string[] { nameof(cfg.suitIds) };
+                    var values = new string[] { strs };
+                    SQLiteHelper.Instance.UpdateValues(nameof(SuitGuideMenuCfgArray), names, values, nameof(cfg.id), cfg.id.ToString());
                 }
             }
             catch (Exception e)
@@ -53,30 +41,5 @@ namespace GFGEditor
                 SQLiteHelper.Instance.CloseConnection();
             }
         }
-
-        private static void HandleItemAndSuitTags(SuitGuideMenuCfg cfg, Dictionary<SuitCfg, List<string>> tagsDic)
-        {
-            var suitIDList = new List<int>(SuitCfgArray.Instance.GetSuitItems(cfg.id, true));
-            Dictionary<string, int> tagsArr = new Dictionary<string, int>();
-            //Dictionary<int, Dictionary<string, int>> tagsSuitArr = new Dictionary<int, Dictionary<string, int>>();
-            var suitCfg = SuitCfgArray.Instance.GetCfg(cfg.id);
-            foreach (var id in suitIDList)
-            {
-                ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(id);
-                for (int i = 0; i < itemCfg.tagsArr.Length; i++)
-                {
-                    if (!tagsArr.ContainsKey(itemCfg.tagsArr[i][0]))
-                        tagsArr[itemCfg.tagsArr[i][0]] = Convert.ToInt32(itemCfg.tagsArr[i][1]);
-                    else
-                        tagsArr[itemCfg.tagsArr[i][0]] += Convert.ToInt32(itemCfg.tagsArr[i][1]);
-                }
-            }
-            foreach (var info in tagsArr.Keys)
-            {
-                //Dictionary<string, int> suitArr = new Dictionary<string, int>();
-                string str = info + "*" + tagsArr[info];
-                tagsDic[suitCfg].Add(str);
-            }
-        }
     }
 }

+ 31 - 16
GameClient/Assets/Game/HotUpdate/Data/DressUpMenuItemDataManager.cs

@@ -148,8 +148,8 @@ namespace GFGGame
                         if (isNewB) return 1;
                     }
                 }
-                int scoreA = ItemDataManager.GetItemAdditionScore(a, InstanceZonesDataManager.currentScoreType, InstanceZonesDataManager.currentFightTags); ;
-                int scoreB = ItemDataManager.GetItemAdditionScore(b, InstanceZonesDataManager.currentScoreType, InstanceZonesDataManager.currentFightTags); ;
+                int scoreA = ItemDataManager.GetItemAdditionScore(a, InstanceZonesDataManager.currentScoreType, InstanceZonesDataManager.currentFightTags); 
+                int scoreB = ItemDataManager.GetItemAdditionScore(b, InstanceZonesDataManager.currentScoreType, InstanceZonesDataManager.currentFightTags); 
                 if (scoreB > scoreA) return 1;
                 if (scoreB < scoreA) return -1;
 
@@ -157,6 +157,21 @@ namespace GFGGame
             });
             return arrayList;
         }
+
+        public static List<int> SortItemTeaPartyByHighScore(List<int> arrayList)
+        {
+            arrayList.Sort((int a, int b) =>
+            {
+                int scoreA = ItemDataManager.GetItemAddTeaPartyTagsScore(a);
+                int scoreB = ItemDataManager.GetItemAddTeaPartyTagsScore(b);
+                if (scoreB > scoreA) return 1;
+                if (scoreB < scoreA) return -1;
+
+                return a - b;
+            });
+            return arrayList;
+        }
+
         public static List<int> SortItemListByLowScore(List<int> arrayList, bool checkNew = false)
         {
             arrayList.Sort((int a, int b) =>
@@ -186,6 +201,20 @@ namespace GFGGame
             return arrayList;
         }
 
+        public static List<int> SortItemTeaPartyByLowsore(List<int> arrayList)
+        {
+            arrayList.Sort((int a, int b) =>
+            {
+                int scoreA = ItemDataManager.GetItemAddTeaPartyTagsScore(a);
+                int scoreB = ItemDataManager.GetItemAddTeaPartyTagsScore(b);
+                if (scoreB < scoreA) return 1;
+                if (scoreB > scoreA) return -1;
+
+                return a - b;
+            });
+            return arrayList;
+        }
+
         private static List<int> SortItemListByScoreByType(List<int> arrayList)
         {
             arrayList.Sort((int a, int b) =>
@@ -858,7 +887,6 @@ namespace GFGGame
             });
         }
 
-
         public static void GetTotalProgress(out int haveCount, out int totalCount)
         {
             totalCount = GlobalCfgArray.globalCfg.ClothingPartsCount;
@@ -889,18 +917,5 @@ namespace GFGGame
             }
             haveCount -= defaultID.Count;
         }
-        
-        //整理配置表数据
-        public static Dictionary<int, Dictionary<string, int>> GetTidyTagCfgArray(ItemCfg itemCfg)
-        {
-            Dictionary<int, Dictionary<string, int>> tagsArr = new Dictionary<int, Dictionary<string, int>>();
-            for (int t = 0; t < itemCfg.tagsArr.Length; t++)
-            {
-                Dictionary<string, int> arr = new Dictionary<string, int>();
-                arr.Add(itemCfg.tagsArr[t][0], Convert.ToInt32(itemCfg.tagsArr[t][1]));
-                tagsArr[t] = arr;
-            }
-            return tagsArr;
-        }
     }
 }

+ 0 - 27
GameClient/Assets/Game/HotUpdate/Data/DressUpMenuSuitDataManager.cs

@@ -183,7 +183,6 @@ namespace GFGGame
             return _actionIDList;
         }
 
-
         public static int GetSuitGuideBonusStatus(int suitId)
         {
             int status = ConstBonusStatus.CAN_NOT_GET;
@@ -235,31 +234,5 @@ namespace GFGGame
             var suitCfg = SuitCfgArray.Instance.GetCfg(suitId);
             return suitCfg != null && ResPathUtil.CheckDressUpAnimationResExist(suitCfg.aniRes);
         }
-
-        //从配置表中累加计算出套装分数
-        public static Dictionary<int,Dictionary<string, int>> GetSuitTagCfgArray(int suitId)
-        {
-            var suitIDList = new List<int>(SuitCfgArray.Instance.GetSuitItems(suitId, true));
-            Dictionary<string, int> tagsArr = new Dictionary<string, int>();
-            Dictionary<int,Dictionary<string, int>> tagsSuitArr = new Dictionary<int, Dictionary<string, int>>();
-            int index = 0;
-            foreach (var id in suitIDList) {
-                ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(id);
-                for (int i = 0; i< itemCfg.tagsArr.Length;i ++){
-                    if (!tagsArr.ContainsKey(itemCfg.tagsArr[i][0]))
-                        tagsArr[itemCfg.tagsArr[i][0]] = Convert.ToInt32(itemCfg.tagsArr[i][1]);
-                    else 
-                        tagsArr[itemCfg.tagsArr[i][0]] += Convert.ToInt32(itemCfg.tagsArr[i][1]);
-                }
-            }
-            foreach (var info in tagsArr.Keys)
-            {
-                Dictionary<string, int> suitArr  = new Dictionary<string, int>();
-                suitArr.Add(info, tagsArr[info]);
-                tagsSuitArr[index] = suitArr;
-                index += 1;
-            }
-            return tagsSuitArr;
-        }
     }
 }

+ 25 - 0
GameClient/Assets/Game/HotUpdate/Data/ItemDataManager.cs

@@ -1,3 +1,4 @@
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using ET;
@@ -304,6 +305,30 @@ namespace GFGGame
         }
 
         /// <summary>
+        /// 获取茶话会item物品的属性
+        /// </summary>
+        /// <param name="itemId"></param>
+        /// <param name="scoreType"></param>
+        /// <returns></returns>
+        public static int GetItemAddTeaPartyTagsScore(int itemId)//, int scoreType, string[] tags = null)
+        {
+            if (_dataDic.TryGetValue(itemId, out var itemData))
+            {
+                int scroe = 0;
+                ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(itemId);
+                if (itemCfg.tagsArr != null)
+                {
+                    foreach (var info in itemCfg.tagsArr)
+                    {
+                        scroe += Convert.ToInt32(info[1]);
+                    }
+                }
+                return scroe;
+            }
+            return 0;
+        }
+
+        /// <summary>
         /// 获取一个换装部件对应的标签分数
         /// </summary>
         /// <param name="itemId"></param>

+ 71 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/DressUp/UI_Button4.cs

@@ -0,0 +1,71 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+using FairyGUI;
+
+namespace UI.DressUp
+{
+    public partial class UI_Button4
+    {
+        public GButton target;
+        public Controller m_buttonType;
+        public const string URL = "ui://mbo439wbih753k";
+        public const string PACKAGE_NAME = "DressUp";
+        public const string RES_NAME = "Button4";
+        private static UI_Button4 _proxy;
+
+        public static UI_Button4 Create(GObject gObject = null)
+        {
+            var ui = new UI_Button4();
+            if(gObject == null)
+            	ui.target =  (GButton)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GButton)gObject;
+            ui.Init(ui.target);
+            return ui;
+        }
+
+        public static UI_Button4 Proxy(GObject gObject = null)
+        {
+            if(_proxy == null)
+            {
+                _proxy = new UI_Button4();
+            }
+            var ui = _proxy;
+            if(gObject == null)
+            	ui.target =  (GButton)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GButton)gObject;
+            ui.Init(ui.target);
+            return ui;
+        }
+
+        public static void ProxyEnd()
+        {
+            if (_proxy != null)
+            {
+                _proxy.Dispose();
+            }
+        }
+
+        public static void ClearProxy()
+        {
+            ProxyEnd();
+            _proxy = null;
+        }
+
+        private void Init(GComponent comp)
+        {
+            m_buttonType = comp.GetController("buttonType");
+        }
+        public void Dispose(bool disposeTarget = false)
+        {
+            m_buttonType = null;
+            if(disposeTarget && target != null)
+            {
+                target.RemoveFromParent();
+                target.Dispose();
+            }
+            target = null;
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/DressUp/UI_Button4.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 28540bbf65c09e943ba260d6e5ccdd90
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 51 - 0
GameClient/Assets/Game/HotUpdate/Utils/SuitUtil.cs

@@ -23,6 +23,18 @@ namespace GFGGame
             return score;
         }
 
+        public static int GetTeaPartySuitScore(int suitID)
+        {
+            int score = 0;
+            SuitCfg suitCfg = SuitCfgArray.Instance.GetCfg(suitID);
+            var items = suitCfg.tagsArr;
+            foreach (var info in items)
+            {
+                score += Convert.ToInt32(info[1]);
+            }
+            return score;
+        }
+
         public static List<int> SortSuitListByHighScore(List<int> arrayList)
         {
             arrayList.Sort((int a, int b) =>
@@ -41,6 +53,26 @@ namespace GFGGame
             });
             return arrayList;
         }
+
+        public static List<int> SortTeaPartySuitByHighScore(List<int> arrayList)
+        {
+            arrayList.Sort((int a, int b) =>
+            {
+                int scoreA = GetTeaPartySuitScore(a);
+                int scoreB = GetTeaPartySuitScore(b);
+                if (scoreB > scoreA)
+                {
+                    return 1;
+                }
+                else if (scoreB < scoreA)
+                {
+                    return -1;
+                }
+                return 0;
+            });
+            return arrayList;
+        }
+
         public static List<int> SortSuitListByLowScore(List<int> arrayList)
         {
             arrayList.Sort((int a, int b) =>
@@ -60,6 +92,25 @@ namespace GFGGame
             return arrayList;
         }
 
+        public static List<int> SortTeaPartySuitByLowScore(List<int> arrayList)
+        {
+            arrayList.Sort((int a, int b) =>
+            {
+                int scoreA = GetTeaPartySuitScore(a);
+                int scoreB = GetTeaPartySuitScore(b);
+                if (scoreB < scoreA)
+                {
+                    return 1;
+                }
+                else if (scoreB > scoreA)
+                {
+                    return -1;
+                }
+                return 0;
+            });
+            return arrayList;
+        }
+
         public static List<int> SortSuitListByDefaultPriority(List<int> arrayList)
         {
             arrayList.Sort((int a, int b) =>

+ 47 - 15
GameClient/Assets/Game/HotUpdate/Views/DressUp/DressFilterView.cs

@@ -18,7 +18,8 @@ namespace GFGGame
         private UI_DressFilterUI _ui;
         private List<int> _selectRarityList;
         private List<int> _selectScoreList;
-        private List<string> _selectTagList;
+        private List<string> _selectTagList = new List<string>();
+        private bool _IsTeaPart = false;
 
         public override void Dispose()
         {
@@ -52,7 +53,7 @@ namespace GFGGame
 
             _ui.m_comSearch.m_listRarity.onClickItem.Add(OnClickListRarityItem);
             _ui.m_comSearch.m_listScore.onClickItem.Add(OnClickListScoreItem);
-            _ui.m_comSearch.m_listTag.onClickItem.Add(OnClickListTagItem);
+            //_ui.m_comSearch.m_listTag.onClickItem.Add(OnClickListTagItem);
         }
 
         protected override void OnShown()
@@ -63,6 +64,7 @@ namespace GFGGame
             if ((this.viewData as object[]) == null)
             {
                 _ui.m_c1.selectedIndex = (bool)(this.viewData as object) == true ? 0 : 1;
+                _IsTeaPart = false;
             }
             // New
             else
@@ -70,6 +72,7 @@ namespace GFGGame
                 _ui.m_c1.selectedIndex = (int)(this.viewData as object[])[0];
                 // For change m_comSearch.m_c1
                 _ui.m_comSearch.m_c1.selectedIndex = (int)(this.viewData as object[])[1];
+                _IsTeaPart = (int)(this.viewData as object[])[2] == 1;
             }
 
             _selectRarityList = DressUpMenuItemDataManager.selectRarityList;// new List<int>();
@@ -101,19 +104,31 @@ namespace GFGGame
             int data = index + 1;
             item.data = data;
             item.selected = _selectScoreList.IndexOf(data) >= 0;
-
         }
+
+        private List<GButton> _TagItemObj = new List<GButton>();
         private void RenderListTagItem(int index, GObject obj)
         {
             GButton item = obj.asButton;
             TagCfg tagCfg = TagCfgArray.Instance.dataArray[index];
             item.text = tagCfg.name;
             item.icon = "ui://DressUp/sxsx_fgdi_" + tagCfg.type;
-            // item.data = 
             string data = tagCfg.name;// string.Format("{0}_{1}", tagCfg.type, tagCfg.name);
-            item.data = data;
+            if (item.data == null)
+                item.onClick.Add(onClickTageButton);
+
+            UI_Button4 itemObj = UI_Button4.Proxy(item);
+                int listIndex = _selectTagList.IndexOf(tagCfg.name);
+                if (listIndex < 0)
+                    itemObj.m_buttonType.selectedIndex = 0;
+                else
+                    itemObj.m_buttonType.selectedIndex = 1;
+            UI_Button4.ProxyEnd();
+            item.data = index;
             item.selected = _selectTagList.IndexOf(data) >= 0;
+            _TagItemObj.Add(item);
         }
+
         private void OnClickListRarityItem(EventContext context)
         {
             int data = (int)(context.data as GButton).data;
@@ -141,19 +156,35 @@ namespace GFGGame
                 _selectScoreList.RemoveAt(index);
             }
         }
-        private void OnClickListTagItem(EventContext context)
+
+        private void onClickTageButton(EventContext context)
         {
-            string data = (context.data as GButton).data.ToString();
-            int index = _selectTagList.IndexOf(data);
-            if (index < 0)
-            {
-                _selectTagList.Add(data);
-            }
-            else
-            {
-                _selectTagList.RemoveAt(index);
+            int index = (int)(context.sender as GButton).data;
+            TagCfg tagCfg = TagCfgArray.Instance.dataArray[index];
+            int listIndex = _selectTagList.IndexOf(tagCfg.name);
+
+            if (_IsTeaPart) {
+                if (_selectTagList.Count >= 2 && listIndex < 0)
+                {
+                    PromptController.Instance.ShowFloatTextPrompt("最多只可以选2个标签哦~");
+                    return;
+                }
             }
+
+            UI_Button4 itemObj = UI_Button4.Proxy(_TagItemObj[index]);
+                if (listIndex < 0)
+                {
+                    _selectTagList.Add(tagCfg.name);
+                    itemObj.m_buttonType.selectedIndex = 1;
+                }
+                else
+                {
+                    _selectTagList.RemoveAt(listIndex);
+                    itemObj.m_buttonType.selectedIndex = 0;
+                }
+            UI_Button4.ProxyEnd();
         }
+
         private bool CheckIllegalCharacter(string str)
         {
             if (System.Text.Encoding.Default.GetByteCount(str) < 2)
@@ -212,6 +243,7 @@ namespace GFGGame
             ResetSearch();
             DressUpMenuItemDataManager.dressFilterType = DressFilterType.None;
             EventAgent.DispatchEvent(ConstMessage.DRESS_FILTER_RESET);
+            this.OnHide();
         }
         private void ResetFilter()
         {

+ 61 - 49
GameClient/Assets/Game/HotUpdate/Views/DressUp/DressUpFightView.cs

@@ -34,7 +34,7 @@ namespace GFGGame
         private StoryLevelCfg _levelCfg;
         private StoryFightCfg _fightCfg;
         private int scoreType = 0;  //目标分数类型保存
-        private bool IsTeaPart = false;
+        private bool _IsTeaPart = false;
 
         private const int SORT_BY_HIGH_SCORE = 0;
         private const int SORT_BY_LOW_SCORE = 1;
@@ -152,13 +152,15 @@ namespace GFGGame
 
             var objData = (DressUpFightType)this.viewData;
 
-            if (objData.teaPartID > 0) { 
-                IsTeaPart = true;
+            if (objData.teaPartID > 0) {
+                _IsTeaPart = true;
                 _TeaPartyID = objData.teaPartID;
             }
+            else
+                _IsTeaPart = false;
 
             _levelID = objData.levelID;
-            if (!IsTeaPart)
+            if (!_IsTeaPart)
                 _ui.m_c1.selectedIndex = 0;
             else
                 _ui.m_c1.selectedIndex = 2;
@@ -174,7 +176,7 @@ namespace GFGGame
             _ui.m_btnAutoPlay.visible = FunctionOpenDataManager.Instance.CheckIsFunOpenById(ConstFunctionId.FUNCTION_AUTOPLAY_FIGHT, false);
             _ui.m_btnRecommend.visible = FunctionOpenDataManager.Instance.CheckIsFunOpenById(ConstFunctionId.FUNCTION_AUTOPLAY_FIGHT, false);
 
-            if (!IsTeaPart) { 
+            if (!_IsTeaPart) { 
                 InstanceZonesDataManager.currentLevelCfgId = _levelID;
                 _levelCfg = StoryLevelCfgArray.Instance.GetCfg(_levelID);
                 _fightCfg = StoryFightCfgArray.Instance.GetCfg(_levelCfg.fightID);
@@ -233,14 +235,14 @@ namespace GFGGame
             {
                 _sceneObject = GameObject.Instantiate(_scenePrefab);
                 MyDressUpHelper.dressUpObj.setSceneObj(_sceneObject, false, false);
-                MyDressUpHelper.dressUpObj.PutOnDefaultDressUpData(IsTeaPart);
+                MyDressUpHelper.dressUpObj.PutOnDefaultDressUpData(_IsTeaPart);
             }
             _ui.m_txtDressLimit.text = string.Format("饰品穿戴限制:{0}/{1}", MyDressUpHelper.GetCurrentOrnamentCount(), GlobalCfgArray.globalCfg.dressLimitCount);
 
             UpdateStepBtn(true);
             UpdateScore();
 
-            if (!IsTeaPart)
+            if (!_IsTeaPart)
                 SendLog();
             else
             {
@@ -302,7 +304,7 @@ namespace GFGGame
 
         private void backView()
         {
-            if (IsTeaPart)
+            if (_IsTeaPart)
             {
                 ViewManager.Show<LeagueTeaPartyView>();
             }
@@ -330,7 +332,7 @@ namespace GFGGame
 
         private void OnClickBtnBack()
         {
-            if (!IsTeaPart) {
+            if (!_IsTeaPart) {
                 AlertUI.Show("是否确定退出?")
                 .SetLeftButton(true, "否").SetRightButton(true, "是", (object data) =>
                 {
@@ -802,7 +804,6 @@ namespace GFGGame
         }
         private void UpdatePartsListSort()
         {
-
             if (_currentMenuType == 0) return;
 
             if (_currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG)
@@ -810,11 +811,17 @@ namespace GFGGame
                 _currentList3 = DressUpMenuSuitDataManager.GetSuitIDList();
                 if (_scoreIndex == SORT_BY_HIGH_SCORE)
                 {
-                    _currentList3 = SuitUtil.SortSuitListByHighScore(_currentList3);
+                    if (!_IsTeaPart)
+                        _currentList3 = SuitUtil.SortSuitListByHighScore(_currentList3);
+                    else
+                        _currentList3 = SuitUtil.SortTeaPartySuitByHighScore(_currentList3);
                 }
                 else if (_scoreIndex == SORT_BY_LOW_SCORE)
                 {
-                    _currentList3 = SuitUtil.SortSuitListByLowScore(_currentList3);
+                    if (!_IsTeaPart)
+                        _currentList3 = SuitUtil.SortSuitListByLowScore(_currentList3);
+                    else
+                        _currentList3 = SuitUtil.SortTeaPartySuitByLowScore(_currentList3);
                 }
                 else
                 {
@@ -826,11 +833,17 @@ namespace GFGGame
                 _currentList3 = DressUpMenuItemDataManager.getItemDatasByType(_currentMenuType);
                 if (_scoreIndex == SORT_BY_HIGH_SCORE)
                 {
-                    _currentList3 = DressUpMenuItemDataManager.SortItemListByHighScore(_currentList3, true);
+                    if (!_IsTeaPart)
+                        _currentList3 = DressUpMenuItemDataManager.SortItemListByHighScore(_currentList3, true);
+                    else
+                        _currentList3 = DressUpMenuItemDataManager.SortItemTeaPartyByHighScore(_currentList3);
                 }
                 else if (_scoreIndex == SORT_BY_LOW_SCORE)
                 {
-                    _currentList3 = DressUpMenuItemDataManager.SortItemListByLowScore(_currentList3, true);
+                    if (!_IsTeaPart)
+                        _currentList3 = DressUpMenuItemDataManager.SortItemListByLowScore(_currentList3, true);
+                    else
+                        _currentList3 = DressUpMenuItemDataManager.SortItemTeaPartyByLowsore(_currentList3);
                 }
                 else
                 {
@@ -990,11 +1003,17 @@ namespace GFGGame
         {
             if (_scoreIndex == SORT_BY_HIGH_SCORE)
             {
-                _currentList3 = DressUpMenuItemDataManager.SortItemListByHighScore(_currentList3, true);
+                if (!_IsTeaPart)
+                    _currentList3 = DressUpMenuItemDataManager.SortItemListByHighScore(_currentList3, true);
+                else
+                    _currentList3 = DressUpMenuItemDataManager.SortItemTeaPartyByHighScore(_currentList3);
             }
             else if (_scoreIndex == SORT_BY_LOW_SCORE)
             {
-                _currentList3 = DressUpMenuItemDataManager.SortItemListByLowScore(_currentList3, true);
+                if (!_IsTeaPart)
+                    _currentList3 = DressUpMenuItemDataManager.SortItemListByLowScore(_currentList3, true);
+                else
+                    _currentList3 = DressUpMenuItemDataManager.SortItemTeaPartyByLowsore(_currentList3);
             }
             _currentMenuType = 0;
             _ui.m_partsListSearch.m_list.numItems = _currentList3.Count; ;
@@ -1007,7 +1026,7 @@ namespace GFGGame
             typeItem.m_txtname.text = item1.name;
             //typeItem.m_imgTitle.url = "ui://DressUp/hz_iconzi_" + item1.id;
             typeItem.target.data = item1.id;
-            if (!IsTeaPart)
+            if (!_IsTeaPart)
             {
                 typeItem.m_imgNeed.visible = ItemUtil.CheckMenuType1(_fightCfg.needItemId, _fightCfg.needSuitId, item1.id);
                 typeItem.m_itemType.selectedIndex = 0;
@@ -1028,7 +1047,7 @@ namespace GFGGame
             typeItem.m_txtname.text = item2.name;
             //typeItem.m_imgTitle.url = "ui://DressUp/hz_iconziej_" + item2.id;
             typeItem.target.data = item2.id;
-            if (!IsTeaPart) { 
+            if (!_IsTeaPart) { 
                 typeItem.m_itemType.selectedIndex = 0;
                 var subType = ItemUtilCS.GetItemSubType(_fightCfg.needItemId);
                 typeItem.m_imgNeed.visible = subType == item2.type;
@@ -1042,21 +1061,15 @@ namespace GFGGame
 
         private void ListTagItem(int index, GObject item)
         {
-            Dictionary<int, Dictionary<string, int>> tagsArr = (Dictionary<int, Dictionary<string, int>>)item.parent.data;
+            string[][] tagsArr = (string[][])item.parent.data;
             UI_ComTagItem listItem = UI_ComTagItem.Proxy(item);
-            string name = "";
-            string score = "";
-            foreach (var info in tagsArr[index].Keys) { 
-                name = info;
-                score = tagsArr[index][info].ToString();
-            }
-            int tagType = TagCfgArray.Instance.GetCfg(name).type;
+            int tagType = TagCfgArray.Instance.GetCfg(tagsArr[index][0]).type;
             UI.CommonGame.UI_ComTag itemTag = UI.CommonGame.UI_ComTag.Proxy(listItem.m_loaTag);
-            itemTag.m_txtTag.text = name;
+            itemTag.m_txtTag.text = tagsArr[index][0];
             itemTag.m_loaTag.url = ResPathUtil.GetCommonGameResPath("fzd_bqbq_" + tagType);
             itemTag.m_loaTag.scale = new Vector2(0.8f, 0.8f);
             UI.CommonGame.UI_ComTag.ProxyEnd();
-            listItem.m_txtScore.text = score;
+            listItem.m_txtScore.text = tagsArr[index][1];
             UI_ComTagItem.ProxyEnd();
         }
 
@@ -1073,7 +1086,7 @@ namespace GFGGame
                 iconRes = suitCfg.res;
                 partName = suitCfg.name;
                 listItem.m_iconSelected.visible = false;
-                if (!IsTeaPart)
+                if (!_IsTeaPart)
                 {
                     listItem.m_txtScore.text = "" + SuitUtil.GetSuitScore(id);
                     listItem.m_itemType.selectedIndex = 0;
@@ -1083,9 +1096,8 @@ namespace GFGGame
                     if (listItem.m_ListTag.data == null)
                         listItem.m_ListTag.itemRenderer = ListTagItem;
 
-                    var tagCfg = DressUpMenuSuitDataManager.GetSuitTagCfgArray(id);
-                    listItem.m_ListTag.data = tagCfg;
-                    listItem.m_ListTag.numItems = tagCfg.Count;
+                    listItem.m_ListTag.data = suitCfg.tagsArr;
+                    listItem.m_ListTag.numItems = suitCfg.tagsArr.Length;
                     listItem.m_itemType.selectedIndex = 1;
                 }
 
@@ -1099,7 +1111,7 @@ namespace GFGGame
                 iconRes = itemCfg.res;
                 partName = itemCfg.name;
                 listItem.m_iconSelected.visible = MyDressUpHelper.dressUpObj.CheckDressUpItemIsOn(id);
-                if (!IsTeaPart) {
+                if (!_IsTeaPart) {
                     listItem.m_txtScore.text = "" + ItemDataManager.GetItemAdditionScore(id, InstanceZonesDataManager.currentScoreType, _fightCfg.needTagsArr);
                     listItem.m_itemType.selectedIndex = 0;
                 }
@@ -1107,9 +1119,8 @@ namespace GFGGame
                     if (listItem.m_ListTag.data == null)
                         listItem.m_ListTag.itemRenderer = ListTagItem;
 
-                    var tagsArr = DressUpMenuItemDataManager.GetTidyTagCfgArray(itemCfg);
-                    listItem.m_ListTag.data = tagsArr;
-                    listItem.m_ListTag.numItems = tagsArr.Count;
+                    listItem.m_ListTag.data = itemCfg.tagsArr;
+                    listItem.m_ListTag.numItems = itemCfg.tagsArr.Length;
                     listItem.m_itemType.selectedIndex = 1;
                 }
 
@@ -1160,7 +1171,7 @@ namespace GFGGame
             partName = itemCfg.name;
             listItem.m_iconSelected.visible = MyDressUpHelper.dressUpObj.CheckDressUpItemIsOn(id);
 
-            if (!IsTeaPart) { 
+            if (!_IsTeaPart) { 
                 listItem.m_txtScore.text = "" + ItemDataManager.GetItemAdditionScore(id, InstanceZonesDataManager.currentScoreType, _fightCfg.needTagsArr);
                 listItem.m_itemType.selectedIndex = 0;
             }
@@ -1169,9 +1180,8 @@ namespace GFGGame
                 if (listItem.m_ListTag.data == null)
                     listItem.m_ListTag.itemRenderer = ListTagItem;
 
-                var tagsArr = DressUpMenuItemDataManager.GetTidyTagCfgArray(itemCfg);
-                listItem.m_ListTag.data = tagsArr;
-                listItem.m_ListTag.numItems = tagsArr.Count;
+                listItem.m_ListTag.data = itemCfg.tagsArr;
+                listItem.m_ListTag.numItems = itemCfg.tagsArr.Length;
                 listItem.m_itemType.selectedIndex = 1;
             }
 
@@ -1184,7 +1194,7 @@ namespace GFGGame
             // int mainValuel;
             // ItemDataManager.GetMainScore(id, out mainScore, out mainValuel);
             listItem.m_ScoreType.url = ResPathUtil.GetCommonGameResPath("kp_sx_" + scoreType);
-            if (!IsTeaPart) {
+            if (!_IsTeaPart) {
                 listItem.m_txtScore.text = "" + ItemDataManager.GetItemAdditionScore(id, InstanceZonesDataManager.currentScoreType, _fightCfg.needTagsArr);
                 listItem.m_itemType.selectedIndex = 0;
             }
@@ -1194,9 +1204,8 @@ namespace GFGGame
                 {
                     listItem.m_ListTag.itemRenderer = ListTagItem;
                 }
-                var tagsArr = DressUpMenuItemDataManager.GetTidyTagCfgArray(itemCfg);
-                listItem.m_ListTag.data = tagsArr;
-                listItem.m_ListTag.numItems = tagsArr.Count;
+                listItem.m_ListTag.data = itemCfg.tagsArr;
+                listItem.m_ListTag.numItems = itemCfg.tagsArr.Length;
                 listItem.m_itemType.selectedIndex = 1;
             }
 
@@ -1301,7 +1310,7 @@ namespace GFGGame
             _ui.m_btnClose.visible = true;
             _ui.m_grpTips.visible = true;
             string str = "";
-            if (!IsTeaPart)
+            if (!_IsTeaPart)
                 str = _levelCfg.hint;
             else { 
                 var teapartyRoleCfg = TeapartyRoleCfgArray.Instance.GetCfgsByid(LeagueDataManager.Instance.TeaPartyId);
@@ -1321,7 +1330,7 @@ namespace GFGGame
 
         private void UpdateScore()
         {
-            if (!IsTeaPart)
+            if (!_IsTeaPart)
                 _ui.m_txtScore.text = "" + FightDataManager.Instance.GetScore(InstanceZonesDataManager.roleData).ToString();
             // GuideController.TryGuideDressUpFightViewBtnNext(_ui.m_btnNext);
             else
@@ -1330,7 +1339,10 @@ namespace GFGGame
 
         private void OnClickBtnSearch()
         {
-            ViewManager.Show<DressFilterView>(false, new object[] { typeof(DressUpView).FullName});
+            int type = 0;
+            if (_IsTeaPart)
+                type = 1;
+            ViewManager.Show<DressFilterView>(new object[] { 0, 0, type}, new object[] { typeof(DressUpView).FullName});
         }
         private void OnClickBtnAutoPlay()
         {
@@ -1421,7 +1433,7 @@ namespace GFGGame
         }
         protected override void UpdateToCheckGuide(object param)
         {
-            if (!ViewManager.CheckIsTopView(this.viewCom) || IsTeaPart) return;
+            if (!ViewManager.CheckIsTopView(this.viewCom) || _IsTeaPart) return;
 
             int buyClothingIndex = 0;
             int buyClothingSubIndex = 0;
@@ -1478,7 +1490,7 @@ namespace GFGGame
 
         private void TeaPartyStatuChange()
         {
-            if (IsTeaPart && LeagueDataManager.Instance.TeaPartyStatus == LeagueTeaPartyStatus.YesGo)
+            if (_IsTeaPart && LeagueDataManager.Instance.TeaPartyStatus == LeagueTeaPartyStatus.YesGo)
             {
                 AlertUI.Show("管理员已开启茶会,请前往挑战!")
                 .SetLeftButton(false).SetRightButton(true, "确定", (object data) =>

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Views/DressUp/DressUpView.cs

@@ -175,6 +175,7 @@ namespace GFGGame
             listTypeItem_FreedomDress = null;
             // MusicManager.Instance.Play(ResPathUtil.GetMusicPath(ConstMusicName.DEFAULT));
             MyDressUpHelper.dressUpObj.TakeOffAll();
+            DressUpMenuItemDataManager.Clear();
 
             if (_sceneObject != null)
             {

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/FieldGuide/SuitGuideDetailView.cs

@@ -64,7 +64,7 @@ namespace GFGGame
         protected override void OnHide()
         {
             base.OnHide();
-
+            DressUpMenuItemDataManager.Clear();
         }
         protected override void RemoveEventListener()
         {

BIN
GameClient/Assets/ResIn/UI/DressUp/DressUp_fui.bytes