소스 검색

Merge branch 'master' of http://10.108.64.190:3000/gfg/client

zhaoyang 2 년 전
부모
커밋
a74d116449
1개의 변경된 파일10개의 추가작업 그리고 2개의 파일을 삭제
  1. 10 2
      GameClient/Assets/Game/HotUpdate/Views/RoleInfo/GMPanelView.cs

+ 10 - 2
GameClient/Assets/Game/HotUpdate/Views/RoleInfo/GMPanelView.cs

@@ -69,6 +69,7 @@ namespace GFGGame
             _ui.m_ComBtn.m_c1.selectedIndex = LauncherConfig.netType == LauncherConfig.EnumNetType.LOCAL ? 0 : 1;
             _ui.m_ComBtn.m_txtArenaGrade.text = "";
             _ui.m_ComBtn.m_txtArenaRank.text = "";
+            InitChapterText();
         }
 
         protected override void OnHide()
@@ -231,13 +232,20 @@ namespace GFGGame
             OnClickBtnGetAllCardItem();
             _ui.m_ComBtn.m_txtRoleLv.text = "99";
             OnClickBtnSetLv();
-            _ui.m_ComBtn.m_txtChapter.text = "5";
-            _ui.m_ComBtn.m_txtChapterLv.text = "1";
+            InitChapterText();
             OnClickBtnSetChapter();
             OnClickBtnSkipCheckOpen();
             OnClickBtnMaterials();
         }
 
+        private void InitChapterText()
+        {
+            var chapterCount = StoryChapterCfgArray.Instance.GetCfgsBysubType(ConstInstanceZonesSubType.Normal).Count;
+            _ui.m_ComBtn.m_txtChapter.text = "" + chapterCount;
+            StoryChapterCfg storyChapterCfg = StoryChapterCfgArray.Instance.GetCfgBysubTypeAndorder(ConstInstanceZonesSubType.Normal, chapterCount);
+            _ui.m_ComBtn.m_txtChapterLv.text = "" + storyChapterCfg.levelCount;
+        }
+
         private void OnClickBtnMaxFightSpeed()
         {
             FightDataManager.Instance.maxFightSpeed = 8;