فهرست منبع

摘星抽奖活动红点补充修改

huangxiaoyue 1 سال پیش
والد
کامیت
173af90b46

+ 9 - 5
GameClient/Assets/Game/HotUpdate/Data/LuckyBoxDataManager.cs

@@ -296,19 +296,21 @@ namespace GFGGame
 
         public bool RedBtnLeft(int curIndex)
         {
-            int index = curIndex;
+            int index = curIndex - 1;
             for (int i = index; i >= BOX_ID_2 - 1; i--)
             {
                 int boxId = LuckyBoxDataManager.Instance.luckyBoxIds[i];
                 long freeTime = LuckyBoxDataManager.Instance.GetFreeTime(boxId);
+
                 if (freeTime > 0)
                 {
                     if (freeTime - TimeHelper.ServerNow() < 0)
                         return true;
                 }
+
+                if (index == 1 && RedDotDataManager.Instance.GetActLuckyBoxRewardRed(ConstLimitTimeActivityType.ActLimitTsy))
+                    return true;
             }
-            if(curIndex == 1 && RedDotDataManager.Instance.GetActLuckyBoxRewardRed(ConstLimitTimeActivityType.ActLimitTsy))
-                return true;
 
             return false;
         }
@@ -324,10 +326,12 @@ namespace GFGGame
                     if (freeTime - TimeHelper.ServerNow() < 0)
                         return true;
                 }
+
+                if (index == 1 && RedDotDataManager.Instance.GetActLuckyBoxRewardRed(ConstLimitTimeActivityType.ActLimitTsy))
+                    return true;
             }
 
-            if (curIndex == 1 && RedDotDataManager.Instance.GetActLuckyBoxRewardRed(ConstLimitTimeActivityType.ActLimitTsy))
-                return true;
+           
 
             return false;
         }

+ 6 - 2
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxView.cs

@@ -234,7 +234,8 @@ namespace GFGGame
             UI_ComBox1 comBox = UI_ComBox1.Proxy(obj);
             _listActivityBtnObj.Add(obj);
             int activityId = ActivityDataManager.Instance.GetCurOpenActiveByType(ConstLimitTimeActivityType.ActLimitTsy);
-            if (activityId > 0 && boxId == LuckyBoxDataManager.BOX_ID_2) {
+            if (activityId > 0 && boxId == LuckyBoxDataManager.BOX_ID_2)
+            {
                 comBox.m_showActivityType.selectedIndex = 1;
                 UpGiftBox(comBox);
                 if (comBox.m_btnRule.data == null)
@@ -242,9 +243,12 @@ namespace GFGGame
                     comBox.m_btnRule.onClick.Add(RuleController.ShowRuleView);
                     comBox.m_btnRule.data = 300024;
                 }
+                comBox.m_btnRule.visible = true;
             }
-            else
+            else {
                 comBox.m_showActivityType.selectedIndex = 0;
+                comBox.m_btnRule.visible = false;
+            }
 
             if (!_lcukyBoxCtrl.ContainsKey(boxId))
             {