Explorar o código

战斗套装选择显示

zhaoyang %!s(int64=3) %!d(string=hai) anos
pai
achega
af130123d4

+ 7 - 3
GameClient/Assets/Game/HotUpdate/Views/DressUp/DressUpFightView.cs

@@ -214,6 +214,7 @@ namespace GFGGame
 
             }
             this.hideListType1();
+            UpdateListPartsSelected();
         }
 
         private void OnClickListType2Item(EventContext context)
@@ -239,9 +240,9 @@ namespace GFGGame
             {
                 EquipDataCache.cacher.TryCancelSuit(id);
                 EquipDataCache.cacher.AddOrRemove(id, true);
-                UpdateListPartsSelected();
 
             }
+            UpdateListPartsSelected();
 
         }
 
@@ -558,11 +559,14 @@ namespace GFGGame
                 int id = (int)listItem.target.data;
                 if (_currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG)
                 {
-                    listItem.m_iconSelected.visible = false;
+                    listItem.m_iconSelected.visible = EquipDataCache.cacher.suitId > 0 && id == EquipDataCache.cacher.suitId;
                 }
                 else
                 {
-                    listItem.m_iconSelected.visible = EquipDataCache.cacher.CheckDressUpItemIsOn(id);
+                    bool isPutOn = EquipDataCache.cacher.CheckDressUpItemIsOn(id);//非套装金判断是否穿戴
+                    bool isSuit = !DressUpMenuItemDataManager.CheckIsSceneType(id) && EquipDataCache.cacher.suitId > 0 && SuitCfgManager.Instance.GetItemSuitId(id) == EquipDataCache.cacher.suitId;//非场景类, 若当前穿戴套装要判断item是否属于套装(更换场景类不会改变套装穿戴状态)
+                    bool isSceneSuit = DressUpMenuItemDataManager.CheckIsSceneType(id) && EquipDataCache.cacher.suitId > 0 && isPutOn;//场景类, 若当前穿戴套装要判断item是否属已穿戴
+                    listItem.m_iconSelected.visible = isPutOn || isSuit || isSceneSuit;
                 }
             }
         }