zhaoyang 2 жил өмнө
parent
commit
8b0f6f3324

+ 15 - 1
GameClient/Assets/Game/HotUpdate/Data/ActivityGlobalDataManager.cs

@@ -38,7 +38,7 @@ namespace GFGGame
             EventAgent.DispatchEvent(ConstMessage.ACTIVITY_ADD, activityInfo.activityId);
             //TODO 判断下时间非法情况
             var remainTime = activityInfo.endTime - TimeHelper.ServerNow();
-            if(remainTime > 0)
+            if (remainTime > 0)
             {
                 Timers.inst.Add(activityInfo.endTime - TimeHelper.ServerNow(), 1, ClientRemoveActivityInfo,
                     activityInfo.activityId);
@@ -95,5 +95,19 @@ namespace GFGGame
             activityInfo.GetRewards.Add(rewardId);
             EventAgent.DispatchEvent(ConstMessage.ACTIVITY_REWARD_ADD, activityId);
         }
+
+        /// <summary>
+        /// ConstBonusStatus
+        /// </summary>
+        /// <param name="activityId"></param>
+        /// <param name="rewardId"></param>
+        /// <returns></returns>
+        public int GetBonusStatus(int activityId, int rewardId)
+        {
+            // if (!activityInfos.ContainsKey(activityId)) return ConstBonusStatus.CAN_NOT_GET;
+            // var activityInfo = activityInfos[activityId];
+            // if (activityInfo.GetRewards.Contains(rewardId)) return 2;
+            return 0;
+        }
     }
 }

+ 9 - 1
GameClient/Assets/Game/HotUpdate/Views/DailyWelfare/LimitChargeView.cs

@@ -98,7 +98,7 @@ namespace GFGGame
             item.m_txtTitle.text = string.Format("活动期间累计获得{0}会员积分({1}/{2})", _rechargeCfgs[index].value, limitChargeExp, _rechargeCfgs[index].value);
             if (limitChargeExp >= _rechargeCfgs[index].value)
             {
-                item.m_c1.selectedIndex = _activityInfo.GetRewards.IndexOf(_rechargeCfgs[index].id) > 0 ? 2 : 1;
+                item.m_c1.selectedIndex = _activityInfo.GetRewards.IndexOf(_rechargeCfgs[index].id) >= 0 ? 2 : 1;
             }
             else
             {
@@ -137,5 +137,13 @@ namespace GFGGame
             int id = (int)obj.data;
             ActivityGlobalSProxy.ReqGetActivityBonus(ActivityDataManager.Instance.actLimitChargeId, id).Coroutine();
         }
+        private List<ActivityRechargeCfg> SoreCfg(List<ActivityRechargeCfg> rechargeCfgs)
+        {
+            // rechargeCfgs.Sort((ActivityRechargeCfg a, ActivityRechargeCfg b) =>
+            // {
+
+            // });
+            return rechargeCfgs;
+        }
     }
 }