Ver código fonte

副本优化

guodong 3 anos atrás
pai
commit
954513f2a7

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

@@ -138,13 +138,13 @@ namespace GFGGame
         private static void EnterGame()
         {
             ViewManager.Hide<LoginView>();
-            if (StoryDataManager.CheckOpenMainUI() || GameGlobal.skipGuide)
+            if (MainStoryDataManager.CheckOpenMainUI() || GameGlobal.skipGuide)
             {
                 ViewManager.Show(ViewName.MAINUI_VIEW);
             }
             else
             {
-                StoryDataManager.currentChapterCfgId = 10001;
+                MainStoryDataManager.currentChapterCfgId = 10001;
                 if (GameGlobal.isFirstEntry == true)
                 {
                     // ViewManager.Show(ViewName.STORY_CHAPTER_VIEW, StoryDataManager.currentChapter, new object[] { ViewName.STORY_CHAPTER_LIST_VIEW, });
@@ -152,7 +152,7 @@ namespace GFGGame
                 }
                 else
                 {
-                    ViewManager.Show(ViewName.STORY_CHAPTER_VIEW, StoryDataManager.currentChapterCfgId, new object[] { ViewName.STORY_CHAPTER_LIST_VIEW });
+                    ViewManager.Show(ViewName.STORY_CHAPTER_VIEW, MainStoryDataManager.currentChapterCfgId, new object[] { ViewName.STORY_CHAPTER_LIST_VIEW });
                 }
             }
             Timers.inst.CallLater(AfterEnterGame);
@@ -165,7 +165,7 @@ namespace GFGGame
 
             ItemHelper.GetItemAttributeInfos().Coroutine();
             SuitFosterProxy.SendGetSuitInfos().Coroutine();
-            InstanceZonesSProxy.GetStoryInfos().Coroutine();
+            InstanceZonesSProxy.GetInstanceZonesInfos().Coroutine();
             MainStorySProxy.GetStoryInfos().Coroutine();
         }
 

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

@@ -37,7 +37,7 @@ namespace GFGGame
             && (cfg.priorId <= 0 || cfg.priorId > 0 && (GuideDataManager.GetGuideCountCopy(cfg.priorId) > 0))
             && (!checkIndex || checkIndex && GuideDataManager.IsGuideIndexFinish(cfg.id, index - 1) == true && GuideDataManager.IsGuideIndexFinish(cfg.id, index) == false)
             && (GuideDataManager.currentGuideId == 0 || GuideDataManager.currentGuideId == cfg.id && GuideDataManager.currentGuideIdIndex != index)
-            && (StoryDataManager.CurrentChapterOrder == 0 || StoryDataManager.CheckCurrentLevelPass() == false)
+            && (MainStoryDataManager.CurrentChapterOrder == 0 || MainStoryDataManager.CheckCurrentLevelPass() == false)
             && InstanceZonesDataManager.CheckLevelPass(cfg.storyLevelId - 1)
             && !InstanceZonesDataManager.CheckLevelPass(cfg.storyLevelId))
             ||

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Data/InstanceZonesDataManager.cs

@@ -29,7 +29,7 @@ namespace GFGGame
                 var levelCfg = StoryLevelCfgArray.Instance.GetCfg(_currentLevelCfgId);
                 if (levelCfg.type == ConstInstanceZonesType.Story)
                 {
-                    StoryDataManager.currentLevelCfgId = _currentLevelCfgId;
+                    MainStoryDataManager.currentLevelCfgId = _currentLevelCfgId;
                 }
             }
         }

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Data/StoryDataManager.cs → GameClient/Assets/Game/HotUpdate/Data/MainStoryDataManager.cs

@@ -7,7 +7,7 @@ using ProtoBuf.Meta;
 
 namespace GFGGame
 {
-    public class StoryDataManager
+    public class MainStoryDataManager
     {
         public static string priorId = "prior";//首次登录前置剧情id
 

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Data/StoryDataManager.cs.meta → GameClient/Assets/Game/HotUpdate/Data/MainStoryDataManager.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 79140e1e433d7ca4c8a66a3dc8c3e8a8
+guid: 1417e66ae6c5a4041a8a3de9a9b884f8
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

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

@@ -9,7 +9,7 @@ namespace GFGGame
     public class InstanceZonesSProxy
     {
         //请求剧情关卡数据
-        public static async ETTask GetStoryInfos()
+        public static async ETTask GetInstanceZonesInfos()
         {
             M2C_GetInstanceZonesInfos response = null;
             response = (M2C_GetInstanceZonesInfos)await MessageHelper.SendToServer(new C2M_GetInstanceZonesInfos());

+ 2 - 2
GameClient/Assets/Game/HotUpdate/ServerProxy/MainStorySProxy.cs

@@ -13,7 +13,7 @@ namespace ET
         protected override async ETTask Run(Session session, M2C_NoticeMainStoryBoxBonusState message)
         {
             var levelCfg = StoryLevelCfgArray.Instance.GetCfg(message.LevelCfgId);
-            StoryDataManager.UpdateBoxBonusStates(levelCfg.chapterId, message.BoxStates);
+            MainStoryDataManager.UpdateBoxBonusStates(levelCfg.chapterId, message.BoxStates);
             await ETTask.CompletedTask;
         }
     }
@@ -32,7 +32,7 @@ namespace GFGGame
             {
                 if (response.Error == ErrorCode.ERR_Success)
                 {
-                    StoryDataManager.InitBoxBonusStates(response.ksBonusState, response.vsBonusState);
+                    MainStoryDataManager.InitBoxBonusStates(response.ksBonusState, response.vsBonusState);
                 }
             }
         }

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

@@ -25,7 +25,7 @@ namespace GFGGame
             }
             else if (!string.IsNullOrEmpty(levelCfg.storyStartID))
             {
-                bool skipable = StoryDataManager.CheckCurrentLevelPass();
+                bool skipable = MainStoryDataManager.CheckCurrentLevelPass();
                 ViewManager.Show(ViewName.STORY_DIALOG_VIEW, new object[] { levelCfg.storyStartID, skipable, new OnCompleteStoryDialogCall(OnCompleteChapterStoryDialog) }, null, true);
             }
         }
@@ -65,7 +65,7 @@ namespace GFGGame
 
         private static void OnCompleteChapterStoryDialog(bool isSkip, object param)
         {
-            if (!StoryDataManager.CheckCurrentLevelPass())
+            if (!MainStoryDataManager.CheckCurrentLevelPass())
             {
                 InstanceZonesSProxy.FinishStoryDialogLevel(InstanceZonesDataManager.currentLevelCfgId).Coroutine();
             }

+ 4 - 4
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryChapterListView.cs

@@ -43,7 +43,7 @@ namespace GFGGame
         protected override void OnShown()
         {
             base.OnShown();
-            subType = StoryDataManager.GetChapterSubType(StoryDataManager.currentChapterCfgId);
+            subType = MainStoryDataManager.GetChapterSubType(MainStoryDataManager.currentChapterCfgId);
             _ui.m_listType.selectedIndex = subType;
             UpdateList();
         }
@@ -80,7 +80,7 @@ namespace GFGGame
             GObject chapterItem = context.data as GObject;
             int chapterID = (int)chapterItem.data;
             StoryChapterCfg chapterCfg = StoryChapterCfgArray.Instance.GetCfg(chapterID);
-            if (StoryDataManager.CheckChapterUnlock(chapterID))
+            if (MainStoryDataManager.CheckChapterUnlock(chapterID))
             {
                 this.Hide();
                 ViewManager.Show(ViewName.STORY_CHAPTER_VIEW, chapterID, new object[] { ViewName.STORY_CHAPTER_LIST_VIEW });
@@ -120,7 +120,7 @@ namespace GFGGame
                 StoryChapterCfg chapterCfg = _chapterCfgs[i];
                 int starCountChapter = InstanceZonesDataManager.GetChapterStarCount(chapterCfg.id);
                 listItem.m_content.m_txtProgress.text = "" + starCountChapter + "/" + chapterCfg.bonusStar3;
-                if (StoryDataManager.CheckChapterUnlock(chapterCfg.id))
+                if (MainStoryDataManager.CheckChapterUnlock(chapterCfg.id))
                 {
                     listItem.m_content.m_imgLock.visible = false;
                     listItem.m_content.m_imgLockBg.visible = false;
@@ -137,7 +137,7 @@ namespace GFGGame
                     }
                     else
                     {
-                        if (StoryDataManager.CheckChapterIsHard(chapterID) && !StoryDataManager.CheckNeedChapterPass(chapterID, out var needChapterId))
+                        if (MainStoryDataManager.CheckChapterIsHard(chapterID) && !MainStoryDataManager.CheckNeedChapterPass(chapterID, out var needChapterId))
                         {
                             var needChapterCfg = StoryChapterCfgArray.Instance.GetCfg(needChapterId);
                             listItem.m_content.m_txtLockDesc.text = $"通关第{needChapterCfg.order}章普通剧情后开启";

+ 5 - 5
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryChapterView.cs

@@ -64,7 +64,7 @@ namespace GFGGame
             base.OnShown();
             MusicManager.Instance.Play(ResPathUtil.GetMusicPath(ConstMusicName.DEFAULT));
             _chapterID = (int)viewData;
-            StoryDataManager.currentChapterCfgId = _chapterID;
+            MainStoryDataManager.currentChapterCfgId = _chapterID;
             _compChapter = (GComponent)UIPackage.CreateObject("Main", "CompChapter" + _chapterID);
             _ui.m_chapter.AddChild(_compChapter);
             InitChapter();
@@ -113,7 +113,7 @@ namespace GFGGame
                 {
                     UI_CompStoryLevelItem levelItem = UI_CompStoryLevelItem.Proxy(obj);
                     levelItem.target.data = levelCfg.id;
-                    if (StoryDataManager.CheckLevelUnlock(levelCfg.id))
+                    if (MainStoryDataManager.CheckLevelUnlock(levelCfg.id))
                     {
                         levelItem.target.visible = true;
                         levelItem.target.onClick.Clear();
@@ -149,7 +149,7 @@ namespace GFGGame
                         if (levelItem.m_holder.visible)
                         {
                             //设置为解锁关卡
-                            StoryDataManager.currentLevelCfgId = levelCfg.id;
+                            MainStoryDataManager.currentLevelCfgId = levelCfg.id;
 
                             _unPasslevelItem = levelItem.target;
                             _gameObject = null;
@@ -195,7 +195,7 @@ namespace GFGGame
 
         private void UpdateBonusBoxStatus(UI_CompBonusBox bonusBox, int index)
         {
-            int status = StoryDataManager.GetChapterBonusStatus(StoryDataManager.currentChapterCfgId, index);
+            int status = MainStoryDataManager.GetChapterBonusStatus(MainStoryDataManager.currentChapterCfgId, index);
             bonusBox.m_iconActive.visible = status == ConstBonusStatus.CAN_GET;
             if (status == ConstBonusStatus.GOT)
             {
@@ -213,7 +213,7 @@ namespace GFGGame
             int status = (int)bonusBox.target.data;
             if (status == ConstBonusStatus.CAN_GET)
             {
-                List<ItemData> bonusList = StoryDataManager.GetChapterBonus(StoryDataManager.currentChapterCfgId, index);
+                List<ItemData> bonusList = MainStoryDataManager.GetChapterBonus(MainStoryDataManager.currentChapterCfgId, index);
                 if (bonusList != null && bonusList.Count > 0)
                 {
                     // ViewManager.Show(ViewName.GET_BONUS_VIEW, bonusList);

+ 4 - 4
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryController.cs

@@ -20,7 +20,7 @@ namespace GFGGame
         public static void ShowPriorStoryDialog()
         {
             InstanceZonesDataManager.currentLevelCfgId = 100001001;
-            ViewManager.Show(ViewName.STORY_DIALOG_VIEW, new object[] { StoryDataManager.priorId, false, new OnCompleteStoryDialogCall(OnCompletePriorStoryDialog) }, null, true);
+            ViewManager.Show(ViewName.STORY_DIALOG_VIEW, new object[] { MainStoryDataManager.priorId, false, new OnCompleteStoryDialogCall(OnCompletePriorStoryDialog) }, null, true);
         }
 
         public static void OnFinishStoryLevel(int levelCfgId, bool firstPass, bool success)
@@ -38,13 +38,13 @@ namespace GFGGame
                 }
                 else
                 {
-                    ViewManager.Show(ViewName.STORY_CHAPTER_VIEW, StoryDataManager.currentChapterCfgId, ViewManager.GetGoBackDatas(ViewName.STORY_CHAPTER_VIEW), true);
+                    ViewManager.Show(ViewName.STORY_CHAPTER_VIEW, MainStoryDataManager.currentChapterCfgId, ViewManager.GetGoBackDatas(ViewName.STORY_CHAPTER_VIEW), true);
                 }
             }
             else
             {
                 //异常返回到关卡列表界面
-                ViewManager.Show(ViewName.STORY_CHAPTER_VIEW, StoryDataManager.currentChapterCfgId, ViewManager.GetGoBackDatas(ViewName.STORY_CHAPTER_VIEW), true);
+                ViewManager.Show(ViewName.STORY_CHAPTER_VIEW, MainStoryDataManager.currentChapterCfgId, ViewManager.GetGoBackDatas(ViewName.STORY_CHAPTER_VIEW), true);
             }
         }
 
@@ -58,7 +58,7 @@ namespace GFGGame
 
         private static void OnCompletePriorStoryDialog(bool isSkip, object param)
         {
-            ViewManager.Show(ViewName.STORY_CHAPTER_VIEW, StoryDataManager.currentChapterCfgId, ViewManager.GetGoBackDatas(ViewName.STORY_CHAPTER_VIEW), true);
+            ViewManager.Show(ViewName.STORY_CHAPTER_VIEW, MainStoryDataManager.currentChapterCfgId, ViewManager.GetGoBackDatas(ViewName.STORY_CHAPTER_VIEW), true);
         }
     }
 }

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

@@ -111,7 +111,7 @@ namespace GFGGame
 
             _ui.m_c1.selectedIndex = 0;
             _ui.m_btnAutoPlay.selected = false;
-            if (stroyStartID == StoryDataManager.priorId)
+            if (stroyStartID == MainStoryDataManager.priorId)
             {
                 _ui.m_c1.selectedIndex = 1;
                 _ui.m_btnAutoPlay.selected = true;

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

@@ -119,7 +119,7 @@ namespace GFGGame
             }
             (item.data as ItemView).SetData(itemData);
             List<ItemData> bonusOnceData = StoryBonusDataCache.GetBonusData(_levelID).bonusOnce;
-            (item.data as ItemView).LoaShouTongRewardVisble = !StoryDataManager.CheckCurrentLevelPass() && index < bonusOnceData.Count;
+            (item.data as ItemView).LoaShouTongRewardVisble = !MainStoryDataManager.CheckCurrentLevelPass() && index < bonusOnceData.Count;
 
         }
 
@@ -157,7 +157,7 @@ namespace GFGGame
             switch (levelCfg.type)
             {
                 case ConstInstanceZonesType.Story:
-                    title = StoryDataManager.CurrentChapterOrder + "-" + InstanceZonesDataManager.currentLevelOrder + " " + levelCfg.name;
+                    title = MainStoryDataManager.CurrentChapterOrder + "-" + InstanceZonesDataManager.currentLevelOrder + " " + levelCfg.name;
                     break;
             }
             _ui.m_txtTitle.text = title;
@@ -175,7 +175,7 @@ namespace GFGGame
                 _ui.m_loaderHead.url = ResPathUtil.GetNpcHeadPath("self");
             }
             _bonusList.Clear();
-            if (StoryDataManager.CheckCurrentLevelPass())
+            if (MainStoryDataManager.CheckCurrentLevelPass())
             {
                 _bonusList = StoryBonusDataCache.GetBonusList(_levelID, false);
                 _ui.m_groupPass.visible = true;