Преглед на файлове

高级合成副本问题修复

zhangyuqian преди 1 година
родител
ревизия
a7830f8ca0

+ 7 - 12
GameClient/Assets/Game/HotUpdate/ServerProxy/TimeTracingSProxy.cs

@@ -11,24 +11,17 @@ namespace GFGGame
         {
             TimeTracingDataManager._LevelMaxInfoDic.Clear();
             M2C_GetCompositeLevelMaxScoreInfos response = null;
-            Dictionary<int, LevelRoleInfoProto> levelInfo; 
             response = (M2C_GetCompositeLevelMaxScoreInfos)await MessageHelper.SendToServer(new C2M_GetCompositeLevelMaxScoreInfos { ChapterId = chapID });
             if (!(response is { Error: ErrorCode.ERR_Success })) return false;
             ActivityFightCfg chapterCfg = ActivityFightCfgArray.Instance.GetCfg(chapID);
             var list = StoryLevelCfgArray.Instance.GetCfgsBytypeAndsubTypeAndchapterId(chapterCfg.type, chapterCfg.subType, chapterCfg.id);
+            Dictionary<int, LevelRoleInfoProto> levelInfo;
+            levelInfo = new Dictionary<int, LevelRoleInfoProto>();
             for (int i = 0; i < response.LevelRoleInfoList.Count; i++)
-            {
-                levelInfo = new Dictionary<int, LevelRoleInfoProto>();
-                levelInfo.Add(list[i].id, response.LevelRoleInfoList[i]);
-                if (TimeTracingDataManager._LevelMaxInfoDic.ContainsKey(chapID))
-                {
-                    TimeTracingDataManager._LevelMaxInfoDic[chapID] = levelInfo;
-                }
-                else
-                {
-                    TimeTracingDataManager._LevelMaxInfoDic.Add(chapID, levelInfo);
-                }
+            {   
+                levelInfo.Add(list[i].id, response.LevelRoleInfoList[i]);      
             }
+            TimeTracingDataManager._LevelMaxInfoDic.Add(chapID, levelInfo);
             return true;
         }
         //获取套装积分奖励状态(已领取的奖励id)
@@ -88,6 +81,7 @@ namespace GFGGame
                     rewardData.Add(response.RewardKs[j], response.RewardVs[j]);
                 }
             TimeTracingDataManager.LevelRewardDic[levelId] = rewardData;
+            EventAgent.DispatchEvent(ConstMessage.TIMETRACINGREDUPDATE);
             // 奖励弹窗
             BonusController.TryShowBonusList(ItemUtil.CreateItemDataList(response.BonusList));
             return true;
@@ -104,6 +98,7 @@ namespace GFGGame
                     rewardData.Add(response.RewardKs[j], response.RewardVs[j]);
                 }
             TimeTracingDataManager.LevelRewardDic[levelID] = rewardData;
+            EventAgent.DispatchEvent(ConstMessage.TIMETRACINGREDUPDATE);
             // 奖励弹窗
             BonusController.TryShowBonusList(ItemUtil.CreateItemDataList(response.BonusList));
             return true;

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/TimeTracing/TimeTracingLevelRankView.cs

@@ -59,7 +59,7 @@ namespace GFGGame
 
         private void UpdateView()
         {
-            rankType = 0;
+            rankType = 1;
             UpdateRank();
         }
         private void UpdateRank()

+ 1 - 3
GameClient/Assets/Game/HotUpdate/Views/TimeTracing/TimeTracingLevelRewardView.cs

@@ -87,8 +87,7 @@ namespace GFGGame
                 return;
             }
             await TimeTracingSProxy.ReqGetLevelReward(levelID, bonuscfg.id);
-            _ui.m_list.numItems = bonusList.Count;
-            EventAgent.DispatchEvent(ConstMessage.TIMETRACINGREDUPDATE);
+            _ui.m_list.numItems = bonusList.Count; 
         }
         private async void OnBtnGetClcik()
         {
@@ -98,7 +97,6 @@ namespace GFGGame
             }
             await TimeTracingSProxy.ReqGetAllLevelReward(levelID);
             _ui.m_list.numItems = bonusList.Count;
-            EventAgent.DispatchEvent(ConstMessage.TIMETRACINGREDUPDATE);
         }
         private void OnClickBtnBack()
         {

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/TimeTracing/TimeTracingSuitRankView.cs

@@ -63,7 +63,7 @@ namespace GFGGame
 
         private void UpdateView()
         {
-            rankType = 0;
+            rankType = 1;
             UpdateRank();
         }
 

+ 0 - 1
GameClient/Assets/Game/HotUpdate/Views/TimeTracing/TimeTracingSwitchView.cs

@@ -118,7 +118,6 @@ namespace GFGGame
                 {
                     if(chapterID[0] == _ui.m_List.numItems - 2 || chapterID[1] == 0)
                     {
-                        PromptController.Instance.ShowFloatTextPrompt("没有该套装");
                         return;
                     }
                     TimeTracingDataManager.SuitID = chapterID[1];