Browse Source

月卡套装位置

zhaoyang 2 years ago
parent
commit
3e3fa1dc7e
1 changed files with 6 additions and 4 deletions
  1. 6 4
      GameClient/Assets/Game/HotUpdate/Views/DressUp/DressUpView.cs

+ 6 - 4
GameClient/Assets/Game/HotUpdate/Views/DressUp/DressUpView.cs

@@ -33,7 +33,7 @@ namespace GFGGame
         private int _rarityIndex = SORT_BY_HIGH_RARITY;
         private UI_TypeItem listTypeItem_FreedomDress;
         private List<LongPressGesture> _listLongPress = new List<LongPressGesture>();
-
+        private int currentIndex = 0;
         private int _stepIndex = -1;
         private List<CustomSuitData> _dressMemory = new List<CustomSuitData>();
         public override void Dispose()
@@ -138,6 +138,7 @@ namespace GFGGame
 
             _ui.m_comboBox.items = CustomSuitDataManager.GetSuitPosItems();
             _ui.m_comboBox.selectedIndex = CustomSuitDataManager.currentIndex;
+            currentIndex = _ui.m_comboBox.selectedIndex;
             MyDressUpHelper.PutOnSuitSavedByPos(CustomSuitDataManager.currentIndex);
             // UpdateStepBtn();
             // AddMemoryDressup();
@@ -205,19 +206,20 @@ namespace GFGGame
         }
         private void OnComboBoxChanged()
         {
-            if (_ui.m_comboBox.selectedIndex == CustomSuitDataManager.currentIndex) return;
+            if (_ui.m_comboBox.selectedIndex == currentIndex) return;
             if (CustomSuitDataManager.GetPosType(_ui.m_comboBox.selectedIndex) == MonthCardType.Gold && !RoleDataManager.CheckIsMonthCardOpenByType(MonthCardType.Gold))
             {
                 PromptController.Instance.ShowFloatTextPrompt("开通金卡开启");
-                _ui.m_comboBox.selectedIndex = CustomSuitDataManager.currentIndex;
+                _ui.m_comboBox.selectedIndex = currentIndex;
                 return;
             }
             if (CustomSuitDataManager.GetPosType(_ui.m_comboBox.selectedIndex) == MonthCardType.BlackGold && !RoleDataManager.CheckIsMonthCardOpenByType(MonthCardType.BlackGold))
             {
                 PromptController.Instance.ShowFloatTextPrompt("开通黑金卡开启");
-                _ui.m_comboBox.selectedIndex = CustomSuitDataManager.currentIndex;
+                _ui.m_comboBox.selectedIndex = currentIndex;
                 return;
             }
+            currentIndex = _ui.m_comboBox.selectedIndex;
             MyDressUpHelper.PutOnSuitSavedByPos(_ui.m_comboBox.selectedIndex);
         }