Эх сурвалжийг харах

feat 任务,通行证换号清理

Jae 2 жил өмнө
parent
commit
b2ba455350

+ 2 - 0
GameClient/Assets/Game/HotUpdate/Controller/GameController.cs

@@ -182,6 +182,8 @@ namespace GFGGame
             ActivityGlobalDataManager.Instance.Clear();
             EnduringGiftBoxDataManager.Instance.Clear();
             LimitedTimeGiftBoxDataManager.Instance.Clear();
+            BattlePassTaskDataManager.Instance.Clear();
+            TaskDataManager.Instance.Clear();
             GameGlobal.zoneScene.GetComponent<SessionComponent>()?.Disconnect();
             GameGlobal.zoneScene.GetComponent<ServerInfosComponent>()?.ServerInfoList?.Clear();
             GameGlobal.zoneScene.GetComponent<AccountInfoComponent>()?.Clear();

+ 11 - 0
GameClient/Assets/Game/HotUpdate/Data/BattlePassTaskDataManager.cs

@@ -174,5 +174,16 @@ namespace GFGGame
             }
             return false;
         }
+
+        public void Clear()
+        {
+            SeasonId = 0;
+            IsBuy = false;
+            SeasonEndTime = 0;
+            selectionCache = null;
+            NormalRewards.Clear();
+            SuperRewards.Clear();
+            tempItems.Clear();
+        }
     }
 }

+ 9 - 3
GameClient/Assets/Game/HotUpdate/Data/TaskDataManager.cs

@@ -151,9 +151,9 @@ namespace GFGGame
                     return string.Format(activeRewardCfg.desc, taskCfg.paramsArr[0], taskCfg.paramsArr[1]);
                 case ConstTaskType.FinishStory:
                 case ConstTaskType.FinishInstanceZones:
-                    {
-                        return string.Format(activeRewardCfg.desc, taskCfg.paramsArr[0]);
-                    }
+                {
+                    return string.Format(activeRewardCfg.desc, taskCfg.paramsArr[0]);
+                }
                 default: return string.Format(activeRewardCfg.desc, taskCfg.GetTargetCount());
             }
         }
@@ -188,5 +188,11 @@ namespace GFGGame
                     break;
             }
         }
+
+        public void Clear()
+        {
+            TaskInfosDic.Clear();
+            TaskType2TaskIdListDic.Clear();
+        }
     }
 }