ソースを参照

feat 通行证继续购买按钮

Jae 2 年 前
コミット
9ce21372e5

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Data/ActivityDay7DataManager.cs

@@ -28,6 +28,7 @@ namespace GFGGame
         
         public long GetEndTime()
         {
+            //TODO 进行缓存
             return TimeUtil.TodayRestTime() +
                    (Activity7DaysCfgArray.Instance.dataArray.Length - GetActivityDay7Day())
                    * TimeUtil.SECOND_PER_DAY * 1000;

+ 1 - 2
GameClient/Assets/Game/HotUpdate/Data/BattlePassTaskDataManager.cs

@@ -68,8 +68,7 @@ namespace GFGGame
             var battlePassLevel = GetBattlePassLevel();
             if (level > battlePassLevel) return 0;
             if (!NormalRewards.Contains(level)) return 1;
-            if (!IsBuy) return 2;
-            return !SuperRewards.Contains(level) ? 3 : 2;
+            return SuperRewards.Contains(level) ? 2 : 3;
         }
 
         //检查普通领取状态

+ 6 - 0
GameClient/Assets/Game/HotUpdate/Views/Task/BattlePassTaskView.cs

@@ -107,6 +107,12 @@ namespace GFGGame
         {
             if (!(context.sender is GObject obj)) return;
             var id = (int)obj.data;
+            var isBuy = BattlePassTaskDataManager.Instance.GetIsBuy();
+            if (!isBuy)
+            {
+                ViewManager.Show<OpenBattlePassView>(null, new object[] { typeof(BattlePassTaskView).FullName, null });
+                return;
+            }
             var get = await BattlePassTaskSProxy.GetBattlePassReward(id);
             if (!get) return;
             SetBattlePassLevel();