private void ShowNpcImage(Adventure adventure) { if (adventure == null) { return; } bool flag = false; for (int i = 0; i < this.m_MaxControlNum; i++) { NrCharKindInfo charKindInfoFromCode = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfoFromCode(adventure.GetMonsterKind(i)); if (charKindInfoFromCode != null) { this.m_AdventureControl[i].m_MonsterImage.SetTexture(eCharImageType.SMALL, charKindInfoFromCode.GetCharKind(), -1, string.Empty); this.m_AdventureControl[i].m_ClearImage.Visible = false; if (NrTSingleton <NkQuestManager> .Instance.QuestGroupClearCheck(adventure.GetQuestGroupUnique(i)) == QUEST_CONST.E_QUEST_GROUP_STATE.E_QUEST_GROUP_STATE_NONE) { this.m_AdventureControl[i].m_ClearImage.Visible = true; this.m_AdventureControl[i].m_DisableMark.Visible = false; this.m_AdventureControl[i].m_DisableBG.Visible = false; this.m_AdventureControl[i].m_MonsterLevel.Text = NrTSingleton <UIDataManager> .Instance.GetString(NrTSingleton <CTextParser> .Instance.GetTextColor("1002"), NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("152"), charKindInfoFromCode.GetCHARKIND_MONSTERINFO().MINLEVEL.ToString()); } else if (!flag) { CQuestGroup questGroupByGroupUnique = NrTSingleton <NkQuestManager> .Instance.GetQuestGroupByGroupUnique(adventure.GetQuestGroupUnique(i)); if (questGroupByGroupUnique != null) { CQuest cQuest = questGroupByGroupUnique.FindCurrentQuest(); if (cQuest != null) { QUEST_CONST.eQUESTSTATE questState = NrTSingleton <NkQuestManager> .Instance.GetQuestState(cQuest.GetQuestUnique()); if (questState == QUEST_CONST.eQUESTSTATE.QUESTSTATE_ACCEPTABLE) { this.m_CurrentQuest = cQuest; this.m_AdventureControl[i].m_NpcButton.Visible = true; this.m_AdventureControl[i].m_NpcImage.Visible = true; this.m_AdventureControl[i].m_QuestMark.Visible = true; this.m_AdventureControl[i].m_NpcImage.SetTexture(eCharImageType.SMALL, cQuest.GetQuestCommon().i32QuestCharKind, -1, string.Empty); this.m_AdventureControl[i].m_MonsterLevel.Text = NrTSingleton <UIDataManager> .Instance.GetString(NrTSingleton <CTextParser> .Instance.GetTextColor("1002"), NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("152"), charKindInfoFromCode.GetCHARKIND_MONSTERINFO().MINLEVEL.ToString()); } else if (questState == QUEST_CONST.eQUESTSTATE.QUESTSTATE_ONGOING || questState == QUEST_CONST.eQUESTSTATE.QUESTSTATE_COMPLETE) { this.m_AdventureControl[i].m_DisableMark.Visible = false; this.m_AdventureControl[i].m_DisableBG.Visible = false; this.m_AdventureControl[i].m_MonsterLevel.Text = NrTSingleton <UIDataManager> .Instance.GetString(NrTSingleton <CTextParser> .Instance.GetTextColor("1002"), NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("152"), charKindInfoFromCode.GetCHARKIND_MONSTERINFO().MINLEVEL.ToString()); } else { this.m_AdventureControl[i].m_MonsterLevel.Text = NrTSingleton <UIDataManager> .Instance.GetString(NrTSingleton <CTextParser> .Instance.GetTextColor("1102"), NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("152"), charKindInfoFromCode.GetCHARKIND_MONSTERINFO().MINLEVEL.ToString()); } flag = true; } } } else { this.m_AdventureControl[i].m_MonsterLevel.Text = NrTSingleton <UIDataManager> .Instance.GetString(NrTSingleton <CTextParser> .Instance.GetTextColor("1102"), NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("152"), charKindInfoFromCode.GetCHARKIND_MONSTERINFO().MINLEVEL.ToString()); } } } CQuestGroup questGroupByGroupUnique2 = NrTSingleton <NkQuestManager> .Instance.GetQuestGroupByGroupUnique(adventure.GetQuestGroupUnique(0)); if (questGroupByGroupUnique2 == null) { return; } CQuest firstQuest = questGroupByGroupUnique2.GetFirstQuest(); if (firstQuest == null) { return; } NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo; if (kMyCharInfo == null) { return; } if ((int)firstQuest.GetQuestLevel(0) > kMyCharInfo.GetLevel()) { base.SetShowLayer(1, true); string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("622"), "count", firstQuest.GetQuestLevel(0) }); this.m_BaloonText.Text = empty; this.m_NextButton.controlIsEnabled = false; } else { base.SetShowLayer(1, false); this.m_NextButton.controlIsEnabled = true; } }
private void SetQuestSubStory() { bool flag = false; this.m_kSubStoryListBox.Clear(); int level = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetLevel(); foreach (CQuestGroup current in this.m_kQuestGroupList) { for (int i = 0; i < 200; i++) { CQuest questByQuestUnique = NrTSingleton <NkQuestManager> .Instance.GetQuestByQuestUnique(current.GetQuestUniqueByBit(i)); if (questByQuestUnique != null) { if (!NrTSingleton <NkQuestManager> .Instance.IsCompletedQuest(questByQuestUnique.GetQuestUnique())) { if ((int)questByQuestUnique.GetQuestLevel(1) <= level) { if (NrTSingleton <NkQuestManager> .Instance.GetQuestState(questByQuestUnique.GetQuestUnique()) == QUEST_CONST.eQUESTSTATE.QUESTSTATE_ACCEPTABLE) { NewListItem newListItem = new NewListItem(this.m_kSubStoryListBox.ColumnNum, true, string.Empty); if ((int)questByQuestUnique.GetQuestLevel(1) < level) { newListItem.SetListItemData(7, false); } string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("75"), "count", current.GetPageUnique() }); newListItem.SetListItemData(1, empty, null, null, null); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("93"), "targetname", questByQuestUnique.GetQuestNpcName() }); newListItem.SetListItemData(3, empty, questByQuestUnique.GetQuestUnique(), new EZValueChangedDelegate(this.ClickMove), null); newListItem.SetListItemData(4, current.GetGroupTitle(), null, null, null); newListItem.SetListItemData(5, "UI/Adventure/EpisodeBG", true, null, null); newListItem.SetListItemData(6, questByQuestUnique.GetQuestNpc().GetCharKind(), true, null, null); newListItem.SetListItemData(8, questByQuestUnique.GetQuestLevel(1).ToString(), null, null, null); newListItem.SetListItemData(8, false); this.m_kSubStoryListBox.Add(newListItem); flag = true; break; } } } } } } this.m_kSubStoryListBox.RepositionItems(); if (flag) { base.SetShowLayer(1, false); } }