ソースを参照

抽奖展示套装集齐进度对不上问题

huangxiaoyue 1 年間 前
コミット
f6768c6c85

+ 9 - 2
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxBonusShowView.cs

@@ -13,6 +13,7 @@ namespace GFGGame
         private List<ItemData> _rewardItemList = new List<ItemData>();
         private Dictionary<int, Dictionary<int, EffectUI>> _effListTen = new Dictionary<int, Dictionary<int, EffectUI>>();
         private Dictionary<int, EffectUI> _effList = new Dictionary<int, EffectUI>();
+        private Dictionary<int, bool> _itemHasNew = new Dictionary<int, bool>();
 
         private Dictionary<int, int> _itemIdList = new Dictionary<int, int>();
         private Dictionary<int, GComponent> _itemObjList = new Dictionary<int, GComponent>();
@@ -144,6 +145,7 @@ namespace GFGGame
             _itemObjList.Clear();
             _recordOpenIndex.Clear();
             _recordTurnIndex.Clear();
+            _itemHasNew.Clear();
             _ui.m_BtnPass.visible = true;
             _ui.m_touchFlipOpen.touchable = false;
             GetSuitItemController.isAuto = false;
@@ -263,6 +265,10 @@ namespace GFGGame
                 if (count == 1 && i == index) isFirst = true;
             }
             item.m_comIcon.m_imgNew.visible = count == ItemDataManager.GetItemNum(itemData.id) && isFirst;
+            if (_itemHasNew.ContainsKey(index))
+                _itemHasNew[index] = item.m_comIcon.m_imgNew.visible;
+            else
+                _itemHasNew.Add(index, item.m_comIcon.m_imgNew.visible);
             item.m_t0.Play();
             if (item.target.data == null)
             {
@@ -445,17 +451,18 @@ namespace GFGGame
                         int count = 0;
                         int totalCount = 0;
                         DressUpMenuSuitDataManager.GetSuitProgressBySuitId(suitId, out count, out totalCount);
-
                         if (_countShow == 2)   //展示进度条界面
                         {
                             int countSuitId = 0;
                             for (int i = index + 1; i < _rewardList.Count; i++)
                             {
-                                if (_rewardList[i].id != _itemIdList[index]) {
+                                _itemHasNew.TryGetValue(i, out bool isNew);
+                                if (isNew) { //_rewardList[i].id != _itemIdList[index] &&
                                     int itemSuitId = SuitCfgArray.Instance.GetSuitIdOfItem(_rewardList[i].id);
                                     if (itemSuitId == suitId)
                                         countSuitId++;
                                 }
+
                             }
                             count = count - countSuitId;
                             ViewManager.Show<SuitItemView>(new object[] { suitId, countSuitId });