Example #1
0
        public bool GotoGuildTask(params object[] args)
        {
            if (!SysConfigManager.GetInstance().CheckSysHasOpened(GameConst.SYS_OPEN_QUEST_GUILD, true))
            {
                return(false);
            }
            if (!CheckSysDownloaded(GameConst.SYS_OPEN_QUEST_GUILD))
            {
                return(false);
            }

            // 记录当弹出退出提示的时候是否要继续自动战斗
            if (SceneHelp.Instance.IsInInstance == true || SceneHelp.Instance.IsCanExitBtnInWild == true)
            {
                SceneHelp.Instance.IsAutoFightingWhenShowExitTips = InstanceManager.Instance.IsAutoFighting || SceneHelp.Instance.IsAutoFightingWhenShowExitTips;
            }

            GuildTaskInfo guildTaskInfo = TaskManager.Instance.GuildTaskInfo;
            List <Task>   tasks         = TaskManager.Instance.VisibleGuildTasks;
            bool          isGoto        = false;

            if (guildTaskInfo == null)
            {
                isGoto = false;
            }
            else
            {
                if (tasks.Count > 0)
                {
                    isGoto = true;
                }
                else
                {
                    isGoto = false;
                }
            }
            if (isGoto == true)
            {
                TaskHelper.TaskGuide(tasks[0]);
            }
            else
            {
                if (guildTaskInfo != null && guildTaskInfo.reward_state == 1)
                {
                    xc.ui.ugui.UIManager.Instance.ShowSysWindow("UITaskWindow", xc.GameConst.QUEST_GUILD, null);
                }
                else
                {
                    TaskHelper.AcceptGuildTaskGuide();
                }
            }
            UIManager.Instance.CloseSysWindow("UITowerClimbWindow");

            return(true);
        }