コード例 #1
0
        //主线任务打开副本界面
        public static void StartTaskCampaignFinding(string taskid, bool isMainCampaign)
        {
            if (AllianceUtil.IsInTransferDart)
            {
                MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_TaskSystem_5855"));
                return;
            }
            if (isMainCampaign)
            {
                string campaign_name = Hotfix_LT.Data.TaskTemplateManager.Instance.GetTask(taskid).target_parameter_1;
                Hotfix_LT.Data.LostMainCampaignsTemplate campaignData = Hotfix_LT.Data.SceneTemplateManager.Instance.GetLostMainCampaignTplById(campaign_name);

                if (!LTInstanceUtil.GetChapterIsOpen(int.Parse(campaignData.ChapterId)))
                {
                    MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_TaskSystem_17027"));
                    return;
                }
                Action act = new Action(delegate
                {
                    LTMainInstanceHudController.EnterInstance(campaignData.ChapterId);
                });
                UIStack.Instance.ShowLoadingScreen(act, false, true, true);
            }
            else
            {
                Hotfix_LT.Data.FuncTemplate ft = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10065);
                if (ft != null && !ft.IsConditionOK())
                {
                    MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, ft.GetConditionStr());
                    return;
                }
                GlobalMenuManager.Instance.Open("LTChallengeInstanceSelectHud");
            }
        }