public void SetQuestUnique(CQuest kQuest) { int num = 1; USER_QUEST_COMPLETE_INFO completeQuestInfo = NrTSingleton <NkQuestManager> .Instance.GetCompleteQuestInfo(kQuest.GetQuestGroupUnique()); if (completeQuestInfo != null) { num = completeQuestInfo.i32LastGrade; } this.m_i32CurGrade = num; this.SetGrade(num); }
public void SetOnGoing() { this.SetOngoingRootNode(); List<QuestList_DLG.GRADE_TEMP> list = new List<QuestList_DLG.GRADE_TEMP>(); List<QuestList_DLG.GRADE_TEMP> list2 = new List<QuestList_DLG.GRADE_TEMP>(); USER_CURRENT_QUEST_INFO[] userCurrentQuestInfo = NrTSingleton<NkQuestManager>.Instance.GetUserCurrentQuestInfo(); for (byte b = 0; b < 10; b += 1) { if (userCurrentQuestInfo[(int)b].strQuestUnique != null) { string strQuestUnique = userCurrentQuestInfo[(int)b].strQuestUnique; if (strQuestUnique != string.Empty) { CQuest questByQuestUnique = NrTSingleton<NkQuestManager>.Instance.GetQuestByQuestUnique(strQuestUnique); if (questByQuestUnique != null) { CQuestGroup questGroupByQuestUnique = NrTSingleton<NkQuestManager>.Instance.GetQuestGroupByQuestUnique(strQuestUnique); if (questGroupByQuestUnique != null) { QuestList_DLG.GRADE_TEMP gRADE_TEMP = new QuestList_DLG.GRADE_TEMP(); gRADE_TEMP.kQuest = questByQuestUnique; gRADE_TEMP.i32Grade = userCurrentQuestInfo[(int)b].i32Grade; if (this.m_CurQuestType == (QUEST_CONST.E_QUEST_TYPE)questGroupByQuestUnique.GetQuestType()) { list.Add(gRADE_TEMP); } else { list2.Add(gRADE_TEMP); } } } } } } list.Sort(new Comparison<QuestList_DLG.GRADE_TEMP>(QuestList_DLG.AscendingQuest)); list2.Sort(new Comparison<QuestList_DLG.GRADE_TEMP>(QuestList_DLG.AscendingQuest)); foreach (QuestList_DLG.GRADE_TEMP current in list) { TREE_TYPE tREE_TYPE = new TREE_TYPE(); tREE_TYPE.bType = 1; tREE_TYPE.bData = current.kQuest; this.m_OngoingNode.AddChild(1, this.m_str1202 + current.kQuest.GetQuestTitle(), this.m_str1202 + current.kQuest.GetQuestCommon().i16RequireLevel[current.i32Grade].ToString(), this.m_str1202 + current.kQuest.GetQuestNpcName(), tREE_TYPE, "Bat_I_Minimap1"); } foreach (QuestList_DLG.GRADE_TEMP current2 in list2) { TREE_TYPE tREE_TYPE2 = new TREE_TYPE(); tREE_TYPE2.bType = 1; tREE_TYPE2.bData = current2.kQuest; this.m_OngoingNode.AddChild(1, this.m_str1202 + current2.kQuest.GetQuestTitle(), this.m_str1202 + current2.kQuest.GetQuestCommon().i16RequireLevel[current2.i32Grade].ToString(), this.m_str1202 + current2.kQuest.GetQuestNpcName(), tREE_TYPE2); } list.Clear(); list2.Clear(); foreach (CQuest current3 in this.m_QuestList) { if (NrTSingleton<NkQuestManager>.Instance.GetQuestState(current3.GetQuestUnique()) == QUEST_CONST.eQUESTSTATE.QUESTSTATE_ACCEPTABLE) { CQuestGroup questGroupByQuestUnique2 = NrTSingleton<NkQuestManager>.Instance.GetQuestGroupByQuestUnique(current3.GetQuestUnique()); if (questGroupByQuestUnique2 != null) { if (questGroupByQuestUnique2.GetQuestType() != 100) { QuestList_DLG.GRADE_TEMP gRADE_TEMP2 = new QuestList_DLG.GRADE_TEMP(); gRADE_TEMP2.kQuest = current3; USER_QUEST_COMPLETE_INFO completeQuestInfo = NrTSingleton<NkQuestManager>.Instance.GetCompleteQuestInfo(questGroupByQuestUnique2.GetGroupUnique()); if (completeQuestInfo != null) { gRADE_TEMP2.i32Grade = (int)completeQuestInfo.bCurrentGrade; } else { gRADE_TEMP2.i32Grade = 1; } if (this.m_CurQuestType == (QUEST_CONST.E_QUEST_TYPE)questGroupByQuestUnique2.GetQuestType()) { list.Add(gRADE_TEMP2); } else { list2.Add(gRADE_TEMP2); } } } } } list.Sort(new Comparison<QuestList_DLG.GRADE_TEMP>(QuestList_DLG.AscendingQuest)); list2.Sort(new Comparison<QuestList_DLG.GRADE_TEMP>(QuestList_DLG.AscendingQuest)); foreach (QuestList_DLG.GRADE_TEMP current4 in list) { TREE_TYPE tREE_TYPE3 = new TREE_TYPE(); tREE_TYPE3.bType = 1; tREE_TYPE3.bData = current4.kQuest; this.m_AcceptableNode.AddChild(1, this.m_str1202 + current4.kQuest.GetQuestTitle(), this.m_str1202 + current4.kQuest.GetQuestCommon().i16RequireLevel[current4.i32Grade - 1].ToString(), this.m_str1202 + current4.kQuest.GetQuestNpcName(), tREE_TYPE3, "Bat_I_Minimap1"); } foreach (QuestList_DLG.GRADE_TEMP current5 in list2) { TREE_TYPE tREE_TYPE4 = new TREE_TYPE(); tREE_TYPE4.bType = 1; tREE_TYPE4.bData = current5.kQuest; this.m_AcceptableNode.AddChild(1, this.m_str1202 + current5.kQuest.GetQuestTitle(), this.m_str1202 + current5.kQuest.GetQuestCommon().i16RequireLevel[current5.i32Grade - 1].ToString(), this.m_str1202 + current5.kQuest.GetQuestNpcName(), tREE_TYPE4); } foreach (CQuest current6 in this.m_QuestList) { if (NrTSingleton<NkQuestManager>.Instance.GetQuestState(current6.GetQuestUnique()) == QUEST_CONST.eQUESTSTATE.QUESTSTATE_ACCEPTABLE) { CQuestGroup questGroupByQuestUnique3 = NrTSingleton<NkQuestManager>.Instance.GetQuestGroupByQuestUnique(current6.GetQuestUnique()); if (questGroupByQuestUnique3 != null) { if (questGroupByQuestUnique3.GetQuestType() == 100) { QuestList_DLG.GRADE_TEMP gRADE_TEMP3 = new QuestList_DLG.GRADE_TEMP(); gRADE_TEMP3.kQuest = current6; USER_QUEST_COMPLETE_INFO completeQuestInfo2 = NrTSingleton<NkQuestManager>.Instance.GetCompleteQuestInfo(questGroupByQuestUnique3.GetGroupUnique()); if (completeQuestInfo2 != null) { gRADE_TEMP3.i32Grade = (int)completeQuestInfo2.bCurrentGrade; } else { gRADE_TEMP3.i32Grade = 1; } TREE_TYPE tREE_TYPE5 = new TREE_TYPE(); tREE_TYPE5.bType = 1; tREE_TYPE5.bData = current6; this.m_DayQuestNode.AddChild(1, this.m_str1202 + current6.GetQuestTitle(), this.m_str1202 + current6.GetQuestCommon().i16RequireLevel[gRADE_TEMP3.i32Grade].ToString(), this.m_str1202 + current6.GetQuestNpcName(), tREE_TYPE5); } } } } this.m_Quest_Info_List_TreeView.RepositionItems(); }