Pārlūkot izejas kodu

返利商城红点刷新问题

huangxiaoyue 1 gadu atpakaļ
vecāks
revīzija
6ab1bc25ed

+ 9 - 1
GameClient/Assets/Game/HotUpdate/Views/Store/StoreView.cs

@@ -56,6 +56,7 @@ namespace GFGGame
             base.AddEventListener();
             base.AddEventListener();
             EventAgent.AddEventListener(ConstMessage.NUMERIC_CHANGE, UpdateRedDot);
             EventAgent.AddEventListener(ConstMessage.NUMERIC_CHANGE, UpdateRedDot);
             EventAgent.AddEventListener(ConstMessage.SHOP_BUY, UpdateRedDot);
             EventAgent.AddEventListener(ConstMessage.SHOP_BUY, UpdateRedDot);
+            EventAgent.AddEventListener(ConstMessage.CONTINUOUS_REBATE_GIFT, UpdateRedDot);
             EventAgent.AddEventListener(ConstMessage.NOTICE_BATCH_TASK_STATE_CHANGE, UpdateStoreMonthRedDot);
             EventAgent.AddEventListener(ConstMessage.NOTICE_BATCH_TASK_STATE_CHANGE, UpdateStoreMonthRedDot);
             EventAgent.AddEventListener(ConstMessage.STORE_BROCADE_WEAV_RECEIVE, UpdateStoreMonthRedDot);
             EventAgent.AddEventListener(ConstMessage.STORE_BROCADE_WEAV_RECEIVE, UpdateStoreMonthRedDot);
 
 
@@ -104,6 +105,7 @@ namespace GFGGame
             base.RemoveEventListener();
             base.RemoveEventListener();
             EventAgent.RemoveEventListener(ConstMessage.NUMERIC_CHANGE, UpdateRedDot);
             EventAgent.RemoveEventListener(ConstMessage.NUMERIC_CHANGE, UpdateRedDot);
             EventAgent.RemoveEventListener(ConstMessage.SHOP_BUY, UpdateRedDot);
             EventAgent.RemoveEventListener(ConstMessage.SHOP_BUY, UpdateRedDot);
+            EventAgent.RemoveEventListener(ConstMessage.CONTINUOUS_REBATE_GIFT, UpdateRedDot);
             EventAgent.RemoveEventListener(ConstMessage.NOTICE_BATCH_TASK_STATE_CHANGE, UpdateStoreMonthRedDot);
             EventAgent.RemoveEventListener(ConstMessage.NOTICE_BATCH_TASK_STATE_CHANGE, UpdateStoreMonthRedDot);
             EventAgent.RemoveEventListener(ConstMessage.STORE_BROCADE_WEAV_RECEIVE, UpdateStoreMonthRedDot);
             EventAgent.RemoveEventListener(ConstMessage.STORE_BROCADE_WEAV_RECEIVE, UpdateStoreMonthRedDot);
         }
         }
@@ -229,7 +231,13 @@ namespace GFGGame
             RedDotController.Instance.SetComRedDot(_ui.m_comTab.m_btn2.target, (RedDotDataManager.Instance.GetGiftBagRewardRed() || RedDotDataManager.Instance.GetGiftBagRebateRed()));
             RedDotController.Instance.SetComRedDot(_ui.m_comTab.m_btn2.target, (RedDotDataManager.Instance.GetGiftBagRewardRed() || RedDotDataManager.Instance.GetGiftBagRebateRed()));
             if (_ui.m_comTab.m_c1.selectedIndex == ConstStoreTabId.STORE_GIFT_BAG)
             if (_ui.m_comTab.m_c1.selectedIndex == ConstStoreTabId.STORE_GIFT_BAG)
             {
             {
-                RedDotController.Instance.SetComRedDot(_ui.m_listSubTab.GetChildAt(ConstStoreSubId.STORE_GIFT_BAG_ACTIVITY).asCom, (RedDotDataManager.Instance.GetGiftBagRewardRed() || RedDotDataManager.Instance.GetGiftBagRebateRed()));
+                RedDotController.Instance.SetComRedDot(_ui.m_listSubTab.GetChildAt(ConstStoreSubId.STORE_GIFT_BAG_ACTIVITY).asCom,RedDotDataManager.Instance.GetGiftBagRewardRed());
+
+                int needSub = 0;
+                if (!ShopDataManager.Instance.GetShopActivityIsShow(ConstStoreSubId.STORE_GIFT_BAG_ACTIVITY))
+                    needSub = 1;
+
+                RedDotController.Instance.SetComRedDot(_ui.m_listSubTab.GetChildAt(ConstStoreSubId.STORE_GIFT_BAG_REBATE - needSub).asCom,RedDotDataManager.Instance.GetGiftBagRebateRed());
             }
             }
         }
         }