guodong 3 years ago
parent
commit
a2419ebdaa

+ 1 - 1
GameClient/Assets/Game/CSShare

@@ -1 +1 @@
-Subproject commit f2aebf6f033938b9f778d8f00c0c6f68e4256906
+Subproject commit c539e2e466db8ce1b50544453ebf098dffce81b9

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Controller/GameController.cs

@@ -165,7 +165,7 @@ namespace GFGGame
 
             ItemHelper.GetItemAttributeInfos().Coroutine();
             SuitFosterHelper.SendGetSuitInfos().Coroutine();
-            StorySProxy.GetStoryInfos().Coroutine();
+            InstanceZonesSProxy.GetStoryInfos().Coroutine();
         }
 
         public static void PrepareUpdateTreasure()

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Data/Handler/RoleDataHandler.cs

@@ -44,7 +44,7 @@ namespace GFGGame
             int dailyResetSecs = GameGlobal.myNumericComponent.GetAsInt(NumericType.DailyResetSecs);
             if (TimeHelper.ServerNowSecs >= dailyResetSecs)
             {
-                RoleSproxy.ResetDailyData().Coroutine();
+                CommonSProxy.ResetDailyData().Coroutine();
             }
         }
 

+ 1 - 1
GameClient/Assets/Game/HotUpdate/ServerProxy/RoleSproxy.cs → GameClient/Assets/Game/HotUpdate/ServerProxy/CommonSProxy.cs

@@ -28,7 +28,7 @@ namespace ET
 namespace GFGGame
 {
 
-    public static class RoleSproxy
+    public static class CommonSProxy
     {
         public static async ETTask ResetDailyData()
         {

+ 0 - 0
GameClient/Assets/Game/HotUpdate/ServerProxy/RoleSproxy.cs.meta → GameClient/Assets/Game/HotUpdate/ServerProxy/CommonSProxy.cs.meta


+ 11 - 14
GameClient/Assets/Game/HotUpdate/ServerProxy/StorySProxy.cs → GameClient/Assets/Game/HotUpdate/ServerProxy/InstanceZonesSProxy.cs

@@ -6,20 +6,19 @@ using ET;
 
 namespace GFGGame
 {
-    public class StorySProxy
+    public class InstanceZonesSProxy
     {
         //请求剧情关卡数据
         public static async ETTask GetStoryInfos()
         {
-            M2C_GetStoryInfos response = null;
-            response = (M2C_GetStoryInfos)await MessageHelper.SendToServer(new C2M_GetStoryInfos());
+            M2C_GetInstanceZonesInfos response = null;
+            response = (M2C_GetInstanceZonesInfos)await MessageHelper.SendToServer(new C2M_GetInstanceZonesInfos());
             if(response != null)
             {
                 if(response.Error == ErrorCode.ERR_Success)
                 {
                     InstanceZonesDataManager.InitScoreList(response.ksScore, response.vsScore);
                     InstanceZonesDataManager.InitStarList(response.ksStar, response.vsStar);
-                    StoryDataManager.InitBoxBonusStates(response.ksBonusState, response.vsBonusState);
                     InstanceZonesDataManager.InitLevelPass(response.ksPass, response.VsPass);
                 }
             }
@@ -28,8 +27,8 @@ namespace GFGGame
         //完成剧情对话关卡
         public static async ETTask FinishStoryDialogLevel(int levelCfgId)
         {
-            M2C_FinishStoryDialog response = null;
-            response = (M2C_FinishStoryDialog)await MessageHelper.SendToServer(new C2M_FinishStoryDialog()
+            M2C_FinishInstanceZonesDialog response = null;
+            response = (M2C_FinishInstanceZonesDialog)await MessageHelper.SendToServer(new C2M_FinishInstanceZonesDialog()
             {
                 LevelCfgId = levelCfgId
             });
@@ -51,8 +50,8 @@ namespace GFGGame
         //完成剧情战斗关卡
         public static async ETTask FinishStoryFightLevel(int levelCfgId, int score, int npcScore, bool useRecomend)
         {
-            M2C_FinishStoryFightLevel response = null;
-            response = (M2C_FinishStoryFightLevel)await MessageHelper.SendToServer(new C2M_FinishStoryFightLevel()
+            M2C_FinishInstanceZonesFightLevel response = null;
+            response = (M2C_FinishInstanceZonesFightLevel)await MessageHelper.SendToServer(new C2M_FinishInstanceZonesFightLevel()
             {
                 LevelCfgId = levelCfgId,
                 Score = score,
@@ -66,8 +65,6 @@ namespace GFGGame
                     //更新数据
                     InstanceZonesDataManager.TryUpdateScore(response.LevelCfgId, response.Score);
                     InstanceZonesDataManager.TryUpdateLevelStar(response.LevelCfgId, response.Star);
-                    var levelCfg = StoryLevelCfgArray.Instance.GetCfg(levelCfgId);
-                    StoryDataManager.UpdateBoxBonusStates(levelCfg.chapterId, response.BoxStates);
                     //展示奖励
                     List<ItemData> bonusList = StoryBonusDataCache.GetBonusList(response.LevelCfgId, response.HasOnceBonus);
                     if(response.RandomBonusList != null)
@@ -102,8 +99,8 @@ namespace GFGGame
         //剧情战斗关卡失败,更新最高分
         public static async ETTask StoryFightLevelFail(int levelCfgId, int score)
         {
-            M2C_FinishStoryFightLevelFail response = null;
-            response = (M2C_FinishStoryFightLevelFail)await MessageHelper.SendToServer(new C2M_FinishStoryFightLevelFail()
+            M2C_FinishInstanceZonesFightLevelFail response = null;
+            response = (M2C_FinishInstanceZonesFightLevelFail)await MessageHelper.SendToServer(new C2M_FinishInstanceZonesFightLevelFail()
             {
                 LevelCfgId = levelCfgId,
                 Score = score,
@@ -120,8 +117,8 @@ namespace GFGGame
         //快速完成关卡战斗
         public static async ETTask FinishStoryFightQuickly(int levelCfgId, int times)
         {
-            M2C_FinishStoryFightQuickly response = null;
-            response = (M2C_FinishStoryFightQuickly)await MessageHelper.SendToServer(new C2M_FinishStoryFightQuickly()
+            M2C_FinishInstanceZonesFightQuickly response = null;
+            response = (M2C_FinishInstanceZonesFightQuickly)await MessageHelper.SendToServer(new C2M_FinishInstanceZonesFightQuickly()
             {
                 LevelCfgId = levelCfgId,
                 times = times

+ 1 - 1
GameClient/Assets/Game/HotUpdate/ServerProxy/SuitServerProxy.cs.meta → GameClient/Assets/Game/HotUpdate/ServerProxy/InstanceZonesSProxy.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 22faaacf8a8365e46a3f7e553b5400d7
+guid: 95397ad19b3c8cb46bd3cca4d01360f8
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 41 - 0
GameClient/Assets/Game/HotUpdate/ServerProxy/MainStorySProxy.cs

@@ -0,0 +1,41 @@
+using ET;
+using GFGGame;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace ET
+{
+    public class M2C_NoticeMainStoryBoxBonusStateHandler : AMHandler<M2C_NoticeMainStoryBoxBonusState>
+    {
+        protected override async ETTask Run(Session session, M2C_NoticeMainStoryBoxBonusState message)
+        {
+            var levelCfg = StoryLevelCfgArray.Instance.GetCfg(message.LevelCfgId);
+            StoryDataManager.UpdateBoxBonusStates(levelCfg.chapterId, message.BoxStates);
+            await ETTask.CompletedTask;
+        }
+    }
+}
+
+namespace GFGGame
+{
+    public class MainStorySProxy
+    {
+        //请求剧情关卡数据
+        public static async ETTask GetStoryInfos()
+        {
+            M2C_GetMainStoryInfos response = null;
+            response = (M2C_GetMainStoryInfos)await MessageHelper.SendToServer(new C2M_GetMainStoryInfos());
+            if (response != null)
+            {
+                if (response.Error == ErrorCode.ERR_Success)
+                {
+                    StoryDataManager.InitBoxBonusStates(response.ksBonusState, response.vsBonusState);
+                }
+            }
+        }
+
+    }
+}

+ 1 - 1
GameClient/Assets/Game/HotUpdate/ServerProxy/StorySProxy.cs.meta → GameClient/Assets/Game/HotUpdate/ServerProxy/MainStorySProxy.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 4fa34e91f96d1e5409ae10e83d561406
+guid: b4e2d38c06a875541956ba29af3fd53a
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 1 - 1
GameClient/Assets/Game/HotUpdate/ServerProxy/SuitServerProxy.cs → GameClient/Assets/Game/HotUpdate/ServerProxy/SuitSProxy.cs

@@ -2,7 +2,7 @@
 
 namespace GFGGame
 {
-    public static class SuitServerProxy
+    public static class SuitSProxy
     {
         public static async ETTask GetSuitGuideBoxBonus(int suitId)
         {

+ 11 - 0
GameClient/Assets/Game/HotUpdate/ServerProxy/SuitSProxy.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 34df4f7e3c116cf448e2c90e1d98cba6
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 2 - 2
GameClient/Assets/Game/HotUpdate/Utils/SuitUtil.cs

@@ -293,7 +293,7 @@ namespace GFGGame
             }
             void GetBonus()
             {
-                SuitServerProxy.GetSuitGuideBoxBonus(suitId).Coroutine();
+                SuitSProxy.GetSuitGuideBoxBonus(suitId).Coroutine();
             }
             ViewManager.Show(ViewName.BONUS_BOX_DETAIL_VIEW, new object[] { itemDatas, new GetBoxBonusStatusCall(GetStatus), new GetBoxBonusCall(GetBonus) });
         }
@@ -308,7 +308,7 @@ namespace GFGGame
             }
             void GetBonus()
             {
-                SuitServerProxy.GetSuitSyntheticBoxBonus(suitId).Coroutine();
+                SuitSProxy.GetSuitSyntheticBoxBonus(suitId).Coroutine();
             }
             ViewManager.Show(ViewName.BONUS_BOX_DETAIL_VIEW, new object[] { itemDatas, new GetBoxBonusStatusCall(GetStatus), new GetBoxBonusCall(GetBonus) });
         }

+ 3 - 3
GameClient/Assets/Game/HotUpdate/Views/MainStory/InstanceZonesController.cs

@@ -44,7 +44,7 @@ namespace GFGGame
             var success = InstanceZonesDataManager.GetFightResult(score, out var npcScore);
             if (success)
             {
-                await StorySProxy.FinishStoryFightLevel(InstanceZonesDataManager.currentLevelCfgId, score, npcScore, InstanceZonesDataManager.usedRecommend);
+                await InstanceZonesSProxy.FinishStoryFightLevel(InstanceZonesDataManager.currentLevelCfgId, score, npcScore, InstanceZonesDataManager.usedRecommend);
             }
             else
             {
@@ -58,7 +58,7 @@ namespace GFGGame
                 //失败仅判断并更新最高分
                 if (score > InstanceZonesDataManager.GetScoreHighest(InstanceZonesDataManager.currentCardId))
                 {
-                    StorySProxy.StoryFightLevelFail(InstanceZonesDataManager.currentLevelCfgId, score).Coroutine();
+                    InstanceZonesSProxy.StoryFightLevelFail(InstanceZonesDataManager.currentLevelCfgId, score).Coroutine();
                 }
             }
         }
@@ -67,7 +67,7 @@ namespace GFGGame
         {
             if (!StoryDataManager.CheckCurrentLevelPass())
             {
-                StorySProxy.FinishStoryDialogLevel(InstanceZonesDataManager.currentLevelCfgId).Coroutine();
+                InstanceZonesSProxy.FinishStoryDialogLevel(InstanceZonesDataManager.currentLevelCfgId).Coroutine();
             }
             else
             {

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightQuicklyView.cs

@@ -85,7 +85,7 @@ namespace GFGGame
             //    List<ItemData> bonusList = StoryDataManager.PassCurrentLevel(out fistPassLastLvl, out curLvfirstPass);
             //    _totalBonusList.Add(bonusList);
             //}
-            StorySProxy.FinishStoryFightQuickly(_levelID, count).Coroutine();
+            InstanceZonesSProxy.FinishStoryFightQuickly(_levelID, count).Coroutine();
         }
 
         private void StartShowBonus(EventContext eventContext)