Browse Source

取消战斗时提示“穿好衣服才能出门”

zhaoyang 2 years ago
parent
commit
479de39b6d

+ 4 - 4
GameClient/Assets/Game/HotUpdate/Controller/GuideController.cs

@@ -73,10 +73,10 @@ namespace GFGGame
             GuideCfg cfg = GuideCfgArray.Instance.GetCfg(guideKey);
             GuideCfg cfg = GuideCfgArray.Instance.GetCfg(guideKey);
             if (cfg == null || GuideDataManager.currentGuideId != 0 && GuideDataManager.currentGuideId != cfg.id) return false;
             if (cfg == null || GuideDataManager.currentGuideId != 0 && GuideDataManager.currentGuideId != cfg.id) return false;
             bool isPass = InstanceZonesDataManager.CheckLevelPass(cfg.storyLevelId);
             bool isPass = InstanceZonesDataManager.CheckLevelPass(cfg.storyLevelId);
-            if (guideKey == ConstGuideId.ARENA_OPEN)
-            {
-                return false;//临时屏蔽
-            }
+            // if (guideKey == ConstGuideId.ARENA_OPEN)
+            // {
+            //     return false;//临时屏蔽
+            // }
             if (guideKey == ConstGuideId.ARENA_OPEN && (isPass || ArenaDataManager.Instance.IsArenaClearing))
             if (guideKey == ConstGuideId.ARENA_OPEN && (isPass || ArenaDataManager.Instance.IsArenaClearing))
             {
             {
                 return false;//竞技场结算中或已通关指定开启关卡,不引导
                 return false;//竞技场结算中或已通关指定开启关卡,不引导

+ 23 - 33
GameClient/Assets/Game/HotUpdate/Data/ArenaDataManager.cs

@@ -157,6 +157,7 @@ namespace GFGGame
             Dictionary<int, List<int>> itemListDic = new Dictionary<int, List<int>>();
             Dictionary<int, List<int>> itemListDic = new Dictionary<int, List<int>>();
             Dictionary<int, List<int>> itemDatasDic = DressUpMenuItemDataManager.ItemDatasBySubTypeDic;
             Dictionary<int, List<int>> itemDatasDic = DressUpMenuItemDataManager.ItemDatasBySubTypeDic;
 
 
+
             foreach (int subType in itemDatasDic.Keys)
             foreach (int subType in itemDatasDic.Keys)
             {
             {
                 int key = subType;
                 int key = subType;
@@ -175,55 +176,44 @@ namespace GFGGame
                 }
                 }
                 itemListDic[key].AddRange(dressList.GetRange(0, max));
                 itemListDic[key].AddRange(dressList.GetRange(0, max));
             }
             }
-            if (itemListDic.ContainsKey(ConstDressUpItemType.LIAN_YI_QUN) &&
-            (!itemListDic.ContainsKey(ConstDressUpItemType.SHANG_YI) ||
-            !itemListDic.ContainsKey(ConstDressUpItemType.XIA_ZHUANG) ||
-            !itemListDic.ContainsKey(ConstDressUpItemType.NEI_DA)))
+
+            bool isHasLYQ = itemListDic.ContainsKey(ConstDressUpItemType.LIAN_YI_QUN);
+            bool isHasSY = itemListDic.ContainsKey(ConstDressUpItemType.SHANG_YI);
+            bool isHasXZ = itemListDic.ContainsKey(ConstDressUpItemType.XIA_ZHUANG);
+            bool isHasND = itemListDic.ContainsKey(ConstDressUpItemType.NEI_DA);
+
+            int countTagLYQ = isHasLYQ && ItemDataManager.CheckItemTagsRight(itemListDic[ConstDressUpItemType.LIAN_YI_QUN][0], tags) ? 1 : 0;
+            int countTagSY = isHasSY && ItemDataManager.CheckItemTagsRight(itemListDic[ConstDressUpItemType.SHANG_YI][0], tags) ? 1 : 0;
+            int countTagXZ = isHasXZ && ItemDataManager.CheckItemTagsRight(itemListDic[ConstDressUpItemType.XIA_ZHUANG][0], tags) ? 1 : 0;
+            int countTagND = isHasND && ItemDataManager.CheckItemTagsRight(itemListDic[ConstDressUpItemType.NEI_DA][0], tags) ? 1 : 0;
+
+            if (countTagLYQ > countTagSY + countTagXZ + countTagND)
             {
             {
+                itemListDic.Remove(ConstDressUpItemType.NEI_DA);
                 itemListDic.Remove(ConstDressUpItemType.SHANG_YI);
                 itemListDic.Remove(ConstDressUpItemType.SHANG_YI);
                 itemListDic.Remove(ConstDressUpItemType.XIA_ZHUANG);
                 itemListDic.Remove(ConstDressUpItemType.XIA_ZHUANG);
-                itemListDic.Remove(ConstDressUpItemType.NEI_DA);
             }
             }
-            else if (!itemListDic.ContainsKey(ConstDressUpItemType.LIAN_YI_QUN) &&
-            (itemListDic.ContainsKey(ConstDressUpItemType.SHANG_YI) &&
-            itemListDic.ContainsKey(ConstDressUpItemType.XIA_ZHUANG) &&
-            itemListDic.ContainsKey(ConstDressUpItemType.NEI_DA)))
+            else if (countTagLYQ < countTagSY + countTagXZ + countTagND)
             {
             {
                 itemListDic.Remove(ConstDressUpItemType.LIAN_YI_QUN);
                 itemListDic.Remove(ConstDressUpItemType.LIAN_YI_QUN);
             }
             }
-            if (itemListDic.ContainsKey(ConstDressUpItemType.LIAN_YI_QUN) && itemListDic.ContainsKey(ConstDressUpItemType.SHANG_YI) && itemListDic.ContainsKey(ConstDressUpItemType.XIA_ZHUANG) && itemListDic.ContainsKey(ConstDressUpItemType.NEI_DA))
+            else
             {
             {
-                bool hasTagLYQ = ItemDataManager.CheckItemTagsRight(itemListDic[ConstDressUpItemType.LIAN_YI_QUN][0], tags);
-                bool hasTagSY = ItemDataManager.CheckItemTagsRight(itemListDic[ConstDressUpItemType.SHANG_YI][0], tags);
-                bool hasTagXZ = ItemDataManager.CheckItemTagsRight(itemListDic[ConstDressUpItemType.XIA_ZHUANG][0], tags);
-                bool hasTagND = ItemDataManager.CheckItemTagsRight(itemListDic[ConstDressUpItemType.NEI_DA][0], tags);
-                if (hasTagLYQ && !hasTagSY && !hasTagXZ)
+                int scoreLYQ = !isHasLYQ ? 0 : ItemDataManager.GetItemAdditionScore(itemListDic[ConstDressUpItemType.LIAN_YI_QUN][0], scoreType, tags);
+                int scoreSY = !isHasSY ? 0 : ItemDataManager.GetItemAdditionScore(itemListDic[ConstDressUpItemType.SHANG_YI][0], scoreType, tags);
+                int scoreXZ = !isHasXZ ? 0 : ItemDataManager.GetItemAdditionScore(itemListDic[ConstDressUpItemType.XIA_ZHUANG][0], scoreType, tags);
+                int scoreND = !isHasND ? 0 : ItemDataManager.GetItemAdditionScore(itemListDic[ConstDressUpItemType.NEI_DA][0], scoreType, tags);
+                if (scoreLYQ > scoreSY + scoreXZ + scoreND)
                 {
                 {
                     itemListDic.Remove(ConstDressUpItemType.SHANG_YI);
                     itemListDic.Remove(ConstDressUpItemType.SHANG_YI);
                     itemListDic.Remove(ConstDressUpItemType.XIA_ZHUANG);
                     itemListDic.Remove(ConstDressUpItemType.XIA_ZHUANG);
                     itemListDic.Remove(ConstDressUpItemType.NEI_DA);
                     itemListDic.Remove(ConstDressUpItemType.NEI_DA);
                 }
                 }
-                else if (!hasTagLYQ && (hasTagSY || hasTagXZ))
-                {
-                    itemListDic.Remove(ConstDressUpItemType.LIAN_YI_QUN);
-                }
                 else
                 else
                 {
                 {
-                    int scoreLYQ = ItemDataManager.GetItemAdditionScore(itemListDic[ConstDressUpItemType.LIAN_YI_QUN][0], scoreType, tags);
-                    int scoreSY = ItemDataManager.GetItemAdditionScore(itemListDic[ConstDressUpItemType.SHANG_YI][0], scoreType, tags);
-                    int scoreXZ = ItemDataManager.GetItemAdditionScore(itemListDic[ConstDressUpItemType.XIA_ZHUANG][0], scoreType, tags);
-                    int scoreND = ItemDataManager.GetItemAdditionScore(itemListDic[ConstDressUpItemType.NEI_DA][0], scoreType, tags);
-                    if (scoreLYQ > scoreSY + scoreXZ + scoreND)
-                    {
-                        itemListDic.Remove(ConstDressUpItemType.SHANG_YI);
-                        itemListDic.Remove(ConstDressUpItemType.XIA_ZHUANG);
-                        itemListDic.Remove(ConstDressUpItemType.NEI_DA);
-                    }
-                    else
-                    {
-                        itemListDic.Remove(ConstDressUpItemType.LIAN_YI_QUN);
-                    }
+                    itemListDic.Remove(ConstDressUpItemType.LIAN_YI_QUN);
                 }
                 }
+
             }
             }
             List<int> itemList = new List<int>();
             List<int> itemList = new List<int>();
             foreach (int subType in itemListDic.Keys)
             foreach (int subType in itemListDic.Keys)