コード例 #1
0
    //     void ClearItems()
    //     {
    //         foreach (UIItemShow item in m_lstItem)
    //         {
    //             item.Release();
    //         }
    //         m_lstItem.Clear();
    //     }

    void ShowUI()
    {
        table.QuestDataBase quest = GameTableManager.Instance.GetTableItem <table.QuestDataBase>(m_nTaskid);
        if (quest == null)
        {
            return;
        }

        m_widget_demonTask.alpha  = (TaskType)quest.dwType == TaskType.TaskType_Demons ? 1f : 0f;
        m_widget_normalTask.alpha = (TaskType)quest.dwType == TaskType.TaskType_Demons ? 0f : 1f;

        m_label_title.text = quest.strName;


        QuestTraceInfo taskInfo = QuestTranceManager.GetInstance().GetQuestTraceInfo(m_nTaskid);

        if (quest.dwType != (uint)GameCmd.TaskType.TaskType_Demons)
        {
            ShowNormalTaskUI(quest, taskInfo);
        }
        else
        {
            ShowDemonsTaskUI(quest, taskInfo);
        }
    }
コード例 #2
0
    void CanDoneBtn()
    {
        QuestTraceInfo taskInfo = QuestTranceManager.GetInstance().GetQuestTraceInfo(m_nTaskid);

        if (taskInfo == null)
        {
            Engine.Utility.Log.Error(" No Found taskindo id {0}", m_nTaskid);
            return;
        }

        TaskProcess process = taskInfo.GetTaskProcess();

        if (process == TaskProcess.TaskProcess_CanDone)
        {
            onClick_Btn_bottom_Btn(null);
        }
    }
コード例 #3
0
    void onClick_Btn_bottom_Btn(GameObject caster)
    {
        this.HideSelf();
        QuestTraceInfo taskInfo = QuestTranceManager.GetInstance().GetQuestTraceInfo(m_nTaskid);

        if (taskInfo == null)
        {
            Engine.Utility.Log.Error(" No Found taskindo id {0}", m_nTaskid);
            return;
        }

        if (taskInfo.Received)
        {
            TaskProcess process = taskInfo.GetTaskProcess();
            if (taskInfo.taskSubType == TaskSubType.Guild)
            {
                if (process == TaskProcess.TaskProcess_CanDone)
                {
                    if (CanPutInKanpsack())
                    {
                        Protocol.Instance.RequestFinishTask(m_nTaskid);
                    }
                }
            }
            else
            {
                if (process == TaskProcess.TaskProcess_Doing)
                {
                    Protocol.Instance.RequestDelTask(m_nTaskid);
                }
                else if (process == TaskProcess.TaskProcess_CanDone)
                {
                    if (CanPutInKanpsack())
                    {
                        Protocol.Instance.RequestDialogSelect(1, m_strStep);
                    }
                }
            }
        }
        else
        {
            Protocol.Instance.RequestDialogSelect(1, m_strStep);
        }
    }