瀏覽代碼

限时累充

zhaoyang 2 年之前
父節點
當前提交
5797e99a40

+ 0 - 14
GameClient/Assets/Game/HotUpdate/Data/ActivityGlobalDataManager.cs

@@ -95,19 +95,5 @@ 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;
-        }
     }
 }

+ 15 - 3
GameClient/Assets/Game/HotUpdate/Views/DailyWelfare/LimitChargeView.cs

@@ -87,6 +87,7 @@ namespace GFGGame
         private void UpdateView()
         {
             _activityInfo = ActivityGlobalDataManager.Instance.GetActivityInfo(ActivityDataManager.Instance.actLimitChargeId);
+            _rechargeCfgs = SoreCfg(_rechargeCfgs);
             _ui.m_list.numItems = _rechargeCfgs.Count;
         }
         private void RenderListItem(int index, GObject obj)
@@ -139,10 +140,21 @@ namespace GFGGame
         }
         private List<ActivityRechargeCfg> SoreCfg(List<ActivityRechargeCfg> rechargeCfgs)
         {
-            // rechargeCfgs.Sort((ActivityRechargeCfg a, ActivityRechargeCfg b) =>
-            // {
+            rechargeCfgs.Sort((ActivityRechargeCfg a, ActivityRechargeCfg b) =>
+            {
+                int limitChargeExp = GameGlobal.myNumericComponent.GetAsInt(NumericType.TotalRechargeScore);
+                int stateA = _activityInfo.GetRewards.IndexOf(a.id);
+                int stateB = _activityInfo.GetRewards.IndexOf(b.id);
+
+                if (limitChargeExp >= a.value && limitChargeExp < b.value && stateA < 0) return -1;
+                if (limitChargeExp >= b.value && limitChargeExp < a.value && stateB < 0) return 1;
+
+
+                if (stateA >= 0 && stateB < 0) return 1;
+                if (stateB >= 0 && stateA < 0) return -1;
 
-            // });
+                return a.id - b.id;
+            });
             return rechargeCfgs;
         }
     }