Selaa lähdekoodia

gm命令通过精英章节

zhangyuqian 1 vuosi sitten
vanhempi
commit
3fb8d22ac5
1 muutettua tiedostoa jossa 29 lisäystä ja 1 poistoa
  1. 29 1
      GameClient/Assets/Game/HotUpdate/Views/RoleInfo/GMPanelView.cs

+ 29 - 1
GameClient/Assets/Game/HotUpdate/Views/RoleInfo/GMPanelView.cs

@@ -2,6 +2,7 @@ using FairyGUI;
 using System.Collections.Generic;
 using System.Text.RegularExpressions;
 using UI.RoleInfo;
+using ET;
 
 namespace GFGGame
 {
@@ -166,11 +167,38 @@ namespace GFGGame
             string content = _ui.m_ComBtn.m_txtChapter.text + " " + _ui.m_ComBtn.m_txtChapterLv.text;
             string messageSuc = string.Format("当前关卡第{0}章第{1}关", _ui.m_ComBtn.m_txtChapter.text,
                 _ui.m_ComBtn.m_txtChapterLv.text);
-            GMController.SendGMCommand("chapter " + content, messageSuc).Coroutine();
+            if (_ui.m_ComBtn.m_txtChapter.text == "99" || _ui.m_ComBtn.m_txtChapterLv.text == "99")
+            {
+                SkipAllChapter();
+            }
+            else
+            {
+                GMController.SendGMCommand("chapter " + content, messageSuc).Coroutine();
+            }
             ActivitySProxy.ReqGetNewPlayerBonusStatus().Coroutine();
             MainStorySProxy.GetStoryBonusDate().Coroutine();
+
         }
 
+        private async void SkipAllChapter()
+        {
+            List<StoryChapterCfg> chapterList = StoryChapterCfgArray.Instance.GetCfgsBysubType(1);   
+            foreach (var item in chapterList)
+            {
+                List<StoryLevelCfg> levelList = StoryLevelCfgArray.Instance.GetCfgsBytypeAndsubTypeAndchapterId(1,1,item.id);
+                foreach (var level in levelList)
+                {
+                    M2C_FinishInstanceZonesFightLevel response = null;
+                    response = (M2C_FinishInstanceZonesFightLevel)await MessageHelper.SendToServer(new C2M_FinishInstanceZonesFightLevel()
+                    {
+                        LevelCfgId = level.id,
+                        Score = 99999,
+                        NpcScore = 0,
+                        UseRecommend = false
+                    });
+                }
+            }
+        }
         private async void OnClickBtnSkipCheckOpen()
         {
             int isSkip = GameGlobal.skipCheckOpen == false ? 1 : 0;