protected void UpdateSubMissionButton()
    {
        uint questId = info.needs[0].questId;

        if (questId == 0)
        {
            SetActive((Enum)UI.BTN_SUBMISSION, false);
        }
        else
        {
            QuestTable.QuestTableData questData = Singleton <QuestTable> .I.GetQuestData(questId);

            SetActive((Enum)UI.BTN_SUBMISSION, questData.IsMissionExist());
        }
    }
示例#2
0
    private void SetUpSubMissions(Transform t, QuestTable.QuestTableData quest)
    {
        UI[] array = new UI[3]
        {
            UI.OBJ_MISSION_INFO_1,
            UI.OBJ_MISSION_INFO_2,
            UI.OBJ_MISSION_INFO_3
        };
        if (!quest.IsMissionExist())
        {
            SetActive(t, UI.OBJ_SUBMISSION_ROOT, false);
        }
        else
        {
            SetActive(t, UI.OBJ_SUBMISSION_ROOT, true);
            ClearStatusQuest clearStatusQuestData = MonoBehaviourSingleton <QuestManager> .I.GetClearStatusQuestData(quest.questID);

            if (clearStatusQuestData == null)
            {
                int i = 0;
                for (int num = quest.missionID.Length; i < num; i++)
                {
                    uint num2 = quest.missionID[i];
                    SetActive(t, array[i], num2 != 0);
                    SetSubMissionNotCleared(FindCtrl(t, array[i]), num2);
                }
            }
            else
            {
                int j = 0;
                for (int count = clearStatusQuestData.missionStatus.Count; j < count; j++)
                {
                    uint num3 = quest.missionID[j];
                    SetActive(t, array[j], num3 != 0);
                    CLEAR_STATUS clearStatus = (CLEAR_STATUS)clearStatusQuestData.missionStatus[j];
                    SetSubMissionCleared(FindCtrl(t, array[j]), num3, clearStatus);
                }
            }
        }
    }
    protected void UpdateSubMission()
    {
        UI[] array = new UI[3]
        {
            UI.OBJ_MISSION_INFO_1,
            UI.OBJ_MISSION_INFO_2,
            UI.OBJ_MISSION_INFO_3
        };
        UI[] array2 = new UI[3]
        {
            UI.OBJ_TOP_CROWN_1,
            UI.OBJ_TOP_CROWN_2,
            UI.OBJ_TOP_CROWN_3
        };
        UI[] array3 = new UI[3]
        {
            UI.LBL_MISSION_INFO_1,
            UI.LBL_MISSION_INFO_2,
            UI.LBL_MISSION_INFO_3
        };
        UI[] array4 = new UI[3]
        {
            UI.SPR_MISSION_INFO_CROWN_1,
            UI.SPR_MISSION_INFO_CROWN_2,
            UI.SPR_MISSION_INFO_CROWN_3
        };
        UI[] array5 = new UI[3]
        {
            UI.SPR_CROWN_1,
            UI.SPR_CROWN_2,
            UI.SPR_CROWN_3
        };
        if (info.needs.Length != 0)
        {
            uint questId = info.needs[0].questId;
            if (questId != 0)
            {
                QuestTable.QuestTableData questData = Singleton <QuestTable> .I.GetQuestData(questId);

                if (!questData.IsMissionExist())
                {
                    SetActive((Enum)UI.OBJ_SUBMISSION_ROOT, false);
                }
                else
                {
                    ClearStatusQuest clearStatusQuestData = MonoBehaviourSingleton <QuestManager> .I.GetClearStatusQuestData(questId);

                    if (clearStatusQuestData == null)
                    {
                        SetActive((Enum)UI.OBJ_SUBMISSION_ROOT, true);
                        int i = 0;
                        for (int num = questData.missionID.Length; i < num; i++)
                        {
                            uint num2 = questData.missionID[i];
                            SetActive(submissionFrame, array[i], num2 != 0);
                            SetActive(submissionFrame, array2[i], num2 != 0);
                            SetActive(submissionFrame, array3[i], num2 != 0);
                            if (num2 != 0)
                            {
                                SetActive(submissionFrame, array4[i], false);
                                SetActive(submissionFrame, array5[i], false);
                                QuestTable.MissionTableData missionData = Singleton <QuestTable> .I.GetMissionData(num2);

                                SetLabelText(submissionFrame, array3[i], missionData.missionText);
                            }
                        }
                    }
                    else
                    {
                        SetActive((Enum)UI.OBJ_SUBMISSION_ROOT, true);
                        int j = 0;
                        for (int count = clearStatusQuestData.missionStatus.Count; j < count; j++)
                        {
                            CLEAR_STATUS cLEAR_STATUS = (CLEAR_STATUS)clearStatusQuestData.missionStatus[j];
                            SetActive(submissionFrame, array[j], questData.missionID[j] != 0);
                            SetActive(submissionFrame, array2[j], questData.missionID[j] != 0);
                            SetActive(submissionFrame, array4[j], cLEAR_STATUS >= CLEAR_STATUS.CLEAR);
                            SetActive(submissionFrame, array5[j], cLEAR_STATUS >= CLEAR_STATUS.CLEAR);
                            QuestTable.MissionTableData missionData2 = Singleton <QuestTable> .I.GetMissionData(questData.missionID[j]);

                            SetLabelText(submissionFrame, array3[j], missionData2.missionText);
                        }
                    }
                }
            }
        }
    }