Example #1
0
    public int GetGroupLevel()
    {
        if (!this.m_stQuestGroupInfo.m_QuestUniqueBit.ContainsKey(0))
        {
            return(0);
        }
        QUEST_SORTID qUEST_SORTID       = this.m_stQuestGroupInfo.m_QuestUniqueBit[0];
        CQuest       questByQuestUnique = NrTSingleton <NkQuestManager> .Instance.GetQuestByQuestUnique(qUEST_SORTID.m_strQuestUnique);

        if (questByQuestUnique != null)
        {
            return(questByQuestUnique.GetQuestCommon().i32QuestLevel);
        }
        return(0);
    }
Example #2
0
    public void SortingQuestInGroup()
    {
        CQuest       cQuest       = null;
        QUEST_SORTID qUEST_SORTID = null;

        for (int i = 0; i < 200; i++)
        {
            if (this.m_stQuestGroupInfo.m_QuestUniqueBit.ContainsKey(i))
            {
                QUEST_SORTID qUEST_SORTID2 = this.m_stQuestGroupInfo.m_QuestUniqueBit[i];
                if (qUEST_SORTID2 != null)
                {
                    cQuest = NrTSingleton <NkQuestManager> .Instance.GetQuestByQuestUnique(qUEST_SORTID2.m_strQuestUnique);

                    if (cQuest != null)
                    {
                        CQuest questByQuestUnique = NrTSingleton <NkQuestManager> .Instance.GetQuestByQuestUnique(cQuest.GetQuestCommon().strPreQuestUnique);

                        if (questByQuestUnique != null)
                        {
                            CQuestGroup questGroupByQuestUnique = NrTSingleton <NkQuestManager> .Instance.GetQuestGroupByQuestUnique(cQuest.GetQuestUnique());

                            CQuestGroup questGroupByQuestUnique2 = NrTSingleton <NkQuestManager> .Instance.GetQuestGroupByQuestUnique(questByQuestUnique.GetQuestUnique());

                            if (questGroupByQuestUnique != null && questGroupByQuestUnique2 != null && questGroupByQuestUnique.GetGroupUnique() != questGroupByQuestUnique2.GetGroupUnique() && questGroupByQuestUnique.GetGroupSort() > questGroupByQuestUnique2.GetGroupSort() && this.m_stQuestGroupInfo.m_QuestUnique.ContainsKey(qUEST_SORTID2.m_strQuestUnique))
                            {
                                qUEST_SORTID = this.m_stQuestGroupInfo.m_QuestUnique[qUEST_SORTID2.m_strQuestUnique];
                                qUEST_SORTID.m_i32QuestSort = 1;
                                break;
                            }
                        }
                        else if (questByQuestUnique == null && this.m_stQuestGroupInfo.m_QuestUnique.ContainsKey(qUEST_SORTID2.m_strQuestUnique))
                        {
                            qUEST_SORTID = this.m_stQuestGroupInfo.m_QuestUnique[qUEST_SORTID2.m_strQuestUnique];
                            qUEST_SORTID.m_i32QuestSort = 1;
                            break;
                        }
                    }
                }
            }
        }
        if (qUEST_SORTID == null || cQuest == null)
        {
            return;
        }
        int num = 2;

        for (int j = 0; j < 200; j++)
        {
            CQuest questByQuestUnique2 = NrTSingleton <NkQuestManager> .Instance.GetQuestByQuestUnique(qUEST_SORTID.m_strQuestUnique);

            if (questByQuestUnique2 != null)
            {
                if (this.m_stQuestGroupInfo.m_QuestUnique.ContainsKey(questByQuestUnique2.GetQuestCommon().strNextQuestUnique))
                {
                    QUEST_SORTID qUEST_SORTID3 = this.m_stQuestGroupInfo.m_QuestUnique[questByQuestUnique2.GetQuestCommon().strNextQuestUnique];
                    if (qUEST_SORTID3 != null)
                    {
                        qUEST_SORTID3.m_i32QuestSort = num;
                        num++;
                        qUEST_SORTID = qUEST_SORTID3;
                    }
                }
            }
        }
        this.m_stQuestGroupInfo.m_QuestList.Sort(new Comparison <QUEST_SORTID>(NkQuestManager.AscendingQuestNum));
    }
Example #3
0
    public CQuest GetLastQuest()
    {
        if (this.m_stQuestGroupInfo.m_QuestList.Count <= 0)
        {
            return(null);
        }
        for (int i = 0; i < 200; i++)
        {
            if (this.m_stQuestGroupInfo.m_QuestUniqueBit.ContainsKey(i))
            {
                QUEST_SORTID qUEST_SORTID = this.m_stQuestGroupInfo.m_QuestUniqueBit[i];
                if (qUEST_SORTID != null)
                {
                    CQuest questByQuestUnique = NrTSingleton <NkQuestManager> .Instance.GetQuestByQuestUnique(qUEST_SORTID.m_strQuestUnique);

                    CQuest questByQuestUnique2 = NrTSingleton <NkQuestManager> .Instance.GetQuestByQuestUnique(questByQuestUnique.GetQuestCommon().strNextQuestUnique);

                    if (questByQuestUnique.GetQuestGroupUnique() != questByQuestUnique2.GetQuestGroupUnique())
                    {
                        return(questByQuestUnique2);
                    }
                }
            }
        }
        return(null);
    }
Example #4
0
    public bool CheckQuestResult(USER_CURRENT_QUEST_INFO cUserCurrentQuestInfo)
    {
        CQuest questByQuestUnique = NrTSingleton <NkQuestManager> .Instance.GetQuestByQuestUnique(cUserCurrentQuestInfo.strQuestUnique);

        if (questByQuestUnique == null)
        {
            return(false);
        }
        bool result = true;

        for (int i = 0; i < 3; i++)
        {
            if (this.m_QuestCondition[i] != null && !this.m_QuestCondition[i].CheckCondition(questByQuestUnique.GetQuestCommon().cQuestCondition[i].i64Param, ref cUserCurrentQuestInfo.i64ParamVal[i]))
            {
                result = false;
            }
        }
        return(result);
    }
Example #5
0
    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 BtnDoubleClickQuestList(object sender)
    {
        UI_UIGuide uI_UIGuide = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.UIGUIDE_DLG) as UI_UIGuide;

        if (uI_UIGuide != null)
        {
            uI_UIGuide.CloseUI = true;
        }
        if (string.Empty != this.m_szSelectQuestUnique)
        {
            CQuest questByQuestUnique = NrTSingleton <NkQuestManager> .Instance.GetQuestByQuestUnique(this.m_szSelectQuestUnique);

            if (questByQuestUnique == null)
            {
                string text = this.m_szSelectQuestUnique.Replace(this.m_ChallengeUniqueDistinguish, string.Empty);
                if (string.IsNullOrEmpty(text))
                {
                    return;
                }
                short          unique         = short.Parse(text);
                ChallengeTable challengeTable = NrTSingleton <ChallengeManager> .Instance.GetChallengeTable(unique);

                if (challengeTable == null)
                {
                    return;
                }
                this.ShowClickQuestOpenDlg(challengeTable.m_szOpenUI, challengeTable.m_nUnique);
                return;
            }
            else
            {
                QUEST_CONST.eQUESTSTATE questState = NrTSingleton <NkQuestManager> .Instance.GetQuestState(questByQuestUnique.GetQuestUnique());

                if (questState == QUEST_CONST.eQUESTSTATE.QUESTSTATE_ONGOING)
                {
                    for (int i = 0; i < 3; i++)
                    {
                        if (questByQuestUnique.GetQuestCommon().cQuestCondition[i].i32QuestCode == 155)
                        {
                            MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

                            if (msgBoxUI != null)
                            {
                                string empty = string.Empty;
                                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                                {
                                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1533"),
                                    "targetname",
                                    NrTSingleton <NrCharKindInfoManager> .Instance.GetName((int)questByQuestUnique.GetQuestCommon().cQuestCondition[1].i64Param)
                                });

                                msgBoxUI.SetMsg(new YesDelegate(NrTSingleton <NkQuestManager> .Instance.OpenQuestBattle), questByQuestUnique, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1532"), empty, eMsgType.MB_OK_CANCEL, 2);
                                msgBoxUI.SetButtonOKText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("320"));
                                msgBoxUI.SetButtonCancelText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("321"));
                                return;
                            }
                        }
                    }
                }
                NrTSingleton <NkQuestManager> .Instance.QuestAutoMove(this.m_szSelectQuestUnique);

                if (null != this.m_Touch)
                {
                    this.m_Touch.RenderEnabled = false;
                    this.bClickTouch           = true;
                }
            }
        }
    }
    public void QuestUpdate()
    {
        this.m_kQuestList.Clear();
        List <USER_CURRENT_QUEST_INFO> list = new List <USER_CURRENT_QUEST_INFO>();

        foreach (USER_CURRENT_QUEST_INFO current in NrTSingleton <NkQuestManager> .Instance.GetMainlist())
        {
            list.Add(current);
        }
        foreach (USER_CURRENT_QUEST_INFO current2 in NrTSingleton <NkQuestManager> .Instance.GetSublist())
        {
            list.Add(current2);
        }
        float num  = 0f;
        int   num2 = 0;

        foreach (USER_CURRENT_QUEST_INFO current3 in list)
        {
            if (!(current3.strQuestUnique == string.Empty))
            {
                string strQuestUnique = current3.strQuestUnique;
                if (strQuestUnique != string.Empty)
                {
                    CQuestGroup questGroupByQuestUnique = NrTSingleton <NkQuestManager> .Instance.GetQuestGroupByQuestUnique(strQuestUnique);

                    if (questGroupByQuestUnique != null)
                    {
                        CQuest questByQuestUnique = NrTSingleton <NkQuestManager> .Instance.GetQuestByQuestUnique(strQuestUnique);

                        if (questByQuestUnique != null)
                        {
                            float num3 = 80f;
                            int   num4 = 0;
                            for (int i = 0; i < 3; i++)
                            {
                                if (0 < questByQuestUnique.GetQuestCommon().cQuestCondition[i].i32QuestCode)
                                {
                                    num4++;
                                }
                            }
                            if (num4 == 1)
                            {
                                this.m_kQuestList.SetColumnData("Mobile/DLG/Main/nlb_questlist_columndata" + NrTSingleton <UIDataManager> .Instance.AddFilePath);
                            }
                            else if (num4 == 2)
                            {
                                this.m_kQuestList.SetColumnData("Mobile/DLG/Main/nlb_questlist2_columndata" + NrTSingleton <UIDataManager> .Instance.AddFilePath);
                                num3 = 120f;
                            }
                            else if (num4 == 3)
                            {
                                this.m_kQuestList.SetColumnData("Mobile/DLG/Main/nlb_questlist3_columndata" + NrTSingleton <UIDataManager> .Instance.AddFilePath);
                                num3 = 160f;
                            }
                            num += num3;
                            this.m_kQuestList.LineHeight = num3;
                            NewListItem newListItem = new NewListItem(this.m_kQuestList.ColumnNum, true, string.Empty);
                            this.ShowTouchButton(questByQuestUnique);
                            string   text  = string.Empty;
                            string[] array = new string[3];
                            text = questByQuestUnique.GetGiveQuestNpcName();
                            if (!(text != string.Empty))
                            {
                                string msg = string.Format("Quest Give Npc Name == Blank, unique = {0}, charcode = {1}", questByQuestUnique.GetQuestUnique(), questByQuestUnique.GetQuestCommon().i32QuestCharKind);
                                NrTSingleton <NrMainSystem> .Instance.Alert(msg);

                                return;
                            }
                            CSelQuestInfo cSelQuestInfo = new CSelQuestInfo();
                            cSelQuestInfo.m_bComplete          = true;
                            cSelQuestInfo.m_SeldQuestCondition = questByQuestUnique.GetQuestCommon().cQuestCondition[0];
                            cSelQuestInfo.m_SelQuest           = questByQuestUnique;
                            cSelQuestInfo.bType = 0;
                            CQuestGroup questGroupByQuestUnique2 = NrTSingleton <NkQuestManager> .Instance.GetQuestGroupByQuestUnique(questByQuestUnique.GetQuestUnique());

                            if (questGroupByQuestUnique2 != null)
                            {
                                if (NrTSingleton <NkQuestManager> .Instance.GetToggleQuestUnique())
                                {
                                    text = NrTSingleton <UIDataManager> .Instance.GetString(this.m_ColorTitle, questByQuestUnique.GetQuestTitle(), "(", questByQuestUnique.GetQuestUnique().ToString(), ")");
                                }
                                else
                                {
                                    text = NrTSingleton <UIDataManager> .Instance.GetString(this.m_ColorTitle, questByQuestUnique.GetQuestTitle());
                                }
                                newListItem.SetListItemData(3, text, cSelQuestInfo, null, null);
                            }
                            for (int j = 0; j < 3; j++)
                            {
                                if (0 < questByQuestUnique.GetQuestCommon().cQuestCondition[j].i32QuestCode)
                                {
                                    array[j] = questByQuestUnique.GetConditionText(current3.i64ParamVal[j], j);
                                    if (string.Empty != array[j])
                                    {
                                        string conditionText = questByQuestUnique.GetConditionText(current3.i64ParamVal[j], j);
                                        string empty         = string.Empty;
                                        bool   bTitle        = NrTSingleton <CTextParser> .Instance.ChangeQuestConditionText(conditionText, out empty);

                                        if (NrTSingleton <NkQuestManager> .Instance.GetToggleQuestUnique())
                                        {
                                            array[j] = string.Concat(new object[]
                                            {
                                                empty,
                                                "(",
                                                questByQuestUnique.GetQuestCommon().cQuestCondition[j].i32QuestCode,
                                                ")"
                                            });
                                        }
                                        else
                                        {
                                            array[j] = empty;
                                        }
                                        CSelQuestInfo cSelQuestInfo2 = new CSelQuestInfo();
                                        int           index          = 5;
                                        if (j == 0)
                                        {
                                            index = 5;
                                        }
                                        else if (j == 1)
                                        {
                                            index = 10;
                                        }
                                        else if (j == 2)
                                        {
                                            index = 13;
                                        }
                                        if (questByQuestUnique.CheckCondition(questByQuestUnique.GetQuestCommon().cQuestCondition[j].i64Param, ref current3.i64ParamVal[j], j) && current3.bFailed == 0)
                                        {
                                            cSelQuestInfo2.m_bComplete          = true;
                                            cSelQuestInfo2.m_SeldQuestCondition = questByQuestUnique.GetQuestCommon().cQuestCondition[j];
                                            cSelQuestInfo2.m_SelQuest           = questByQuestUnique;
                                            cSelQuestInfo2.bType  = 1;
                                            cSelQuestInfo2.bTitle = bTitle;
                                            cSelQuestInfo2.strCon = conditionText;
                                            newListItem.SetListItemData(index, this.m_ColorComplte + array[j], cSelQuestInfo2, null, null);
                                        }
                                        else
                                        {
                                            cSelQuestInfo2.m_bComplete          = false;
                                            cSelQuestInfo2.m_SeldQuestCondition = questByQuestUnique.GetQuestCommon().cQuestCondition[j];
                                            cSelQuestInfo2.m_SelQuest           = questByQuestUnique;
                                            cSelQuestInfo2.bType  = 1;
                                            cSelQuestInfo2.bTitle = bTitle;
                                            cSelQuestInfo2.strCon = conditionText;
                                            newListItem.SetListItemData(index, this.m_ColorNormal + array[j], cSelQuestInfo2, null, null);
                                        }
                                    }
                                }
                            }
                            if (questGroupByQuestUnique.GetQuestType() == 2)
                            {
                                newListItem.SetListItemData(7, string.Empty, questByQuestUnique, new EZValueChangedDelegate(this.ClickCancelQuest), null);
                            }
                            else
                            {
                                newListItem.SetListItemData(6, false);
                                newListItem.SetListItemData(7, false);
                            }
                            newListItem.Data = strQuestUnique;
                            this.m_kQuestList.Add(newListItem);
                            if (0 < num2)
                            {
                                num += this.m_kQuestList.itemSpacing;
                            }
                            num2++;
                        }
                    }
                }
            }
        }
        NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;

        if (kMyCharInfo != null)
        {
            ChallengeTable sequenceChallengeTable = NrTSingleton <ChallengeManager> .Instance.GetSequenceChallengeTable();

            if (sequenceChallengeTable != null && (int)sequenceChallengeTable.m_nLevel <= kMyCharInfo.GetLevel())
            {
                UserChallengeInfo userChallengeInfo = kMyCharInfo.GetUserChallengeInfo();
                if (userChallengeInfo != null && userChallengeInfo.GetLoadData())
                {
                    Challenge_Info userChallengeInfo2 = userChallengeInfo.GetUserChallengeInfo(sequenceChallengeTable.m_nUnique);
                    num += 80f;
                    this.m_kQuestList.LineHeight = 80f;
                    NewListItem newListItem2 = new NewListItem(this.m_kQuestList.ColumnNum, true, string.Empty);
                    newListItem2.SetListItemData(0, "Win_T_QuestTitleBK2", null, null, null);
                    newListItem2.SetListItemData(2, "Win_I_QuestMark02", null, null, null);
                    newListItem2.SetListItemData(3, this.m_ColorTitle + NrTSingleton <NrTextMgr> .Instance.GetTextFromChallenge(sequenceChallengeTable.m_szTitleTextKey), null, null, null);
                    string str = string.Empty;
                    string textFromChallenge = NrTSingleton <NrTextMgr> .Instance.GetTextFromChallenge(sequenceChallengeTable.m_kRewardInfo[0].m_szConditionTextKey);

                    if (textFromChallenge.Contains("count"))
                    {
                        if (userChallengeInfo2 == null)
                        {
                            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref str, new object[]
                            {
                                textFromChallenge,
                                "count",
                                sequenceChallengeTable.m_kRewardInfo[0].m_nConditionCount,
                                "count1",
                                0,
                                "count2",
                                sequenceChallengeTable.m_kRewardInfo[0].m_nConditionCount
                            });

                            newListItem2.SetListItemData(5, this.m_ColorNormal + str, null, null, null);
                        }
                        else if (userChallengeInfo2.m_nValue >= (long)sequenceChallengeTable.m_kRewardInfo[0].m_nConditionCount)
                        {
                            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref str, new object[]
                            {
                                textFromChallenge,
                                "count",
                                sequenceChallengeTable.m_kRewardInfo[0].m_nConditionCount,
                                "count1",
                                userChallengeInfo2.m_nValue,
                                "count2",
                                sequenceChallengeTable.m_kRewardInfo[0].m_nConditionCount
                            });

                            newListItem2.SetListItemData(5, this.m_ColorComplte + str, null, null, null);
                        }
                    }
                    else
                    {
                        str = textFromChallenge;
                        if (userChallengeInfo2 == null)
                        {
                            newListItem2.SetListItemData(5, this.m_ColorNormal + str, null, null, null);
                        }
                        else if (userChallengeInfo2.m_nValue >= (long)sequenceChallengeTable.m_kRewardInfo[0].m_nConditionCount)
                        {
                            newListItem2.SetListItemData(5, this.m_ColorComplte + str, null, null, null);
                        }
                        else
                        {
                            newListItem2.SetListItemData(5, this.m_ColorNormal + str, null, null, null);
                        }
                    }
                    newListItem2.SetListItemData(6, false);
                    newListItem2.SetListItemData(7, false);
                    newListItem2.Data = sequenceChallengeTable.m_nUnique.ToString() + this.m_ChallengeUniqueDistinguish;
                    this.m_kQuestList.Add(newListItem2);
                }
            }
        }
        base.SetSize(base.GetSizeX(), num);
        this.m_kQuestList.ResizeViewableArea(this.m_kQuestList.GetSize().x, num);
        NrTSingleton <NkQuestManager> .Instance.UpdateClientNpc(0);
    }
    private void ClickMove(IUIObject obj)
    {
        if (obj == null)
        {
            return;
        }
        string     strQuestUnique = (string)obj.Data;
        NrCharBase @char          = NrTSingleton <NkCharManager> .Instance.GetChar(1);

        if (@char == null)
        {
            return;
        }
        if (!NrTSingleton <NkClientLogic> .Instance.IsMovable())
        {
            return;
        }
        CQuest questByQuestUnique = NrTSingleton <NkQuestManager> .Instance.GetQuestByQuestUnique(strQuestUnique);

        if (questByQuestUnique == null)
        {
            return;
        }
        NrTSingleton <NrAutoPath> .Instance.ResetData();

        Vector3 lhs  = Vector3.zero;
        Vector2 zero = Vector2.zero;

        if (@char.m_kCharMove == null)
        {
            return;
        }
        int num = 0;

        if (questByQuestUnique != null)
        {
            num = questByQuestUnique.GetQuestCommon().iCastleUnique;
            NrCharKindInfo charKindInfoFromCode = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfoFromCode(questByQuestUnique.GetQuestCommon().GiveQuestCharCode);

            if (charKindInfoFromCode != null)
            {
                NrClientNpcPosList clientNpcPosList = NrTSingleton <NkQuestManager> .Instance.GetClientNpcPosList(num);

                if (clientNpcPosList != null)
                {
                    for (int i = 0; i < clientNpcPosList.ClientNpcPosList.Count; i++)
                    {
                        NrClientNpcInfo nrClientNpcInfo = clientNpcPosList.ClientNpcPosList[i];
                        if (nrClientNpcInfo != null && NrTSingleton <NkQuestManager> .Instance.ClinetNpcCreateCheck(nrClientNpcInfo.kStartCon, nrClientNpcInfo.kEndCon) && charKindInfoFromCode.GetCode() == nrClientNpcInfo.strCharCode && num == nrClientNpcInfo.i32MapIndex)
                        {
                            NrCharBase char2 = NrTSingleton <NkCharManager> .Instance.GetChar(1);

                            if (char2 != null && char2.m_kCharMove != null)
                            {
                                lhs    = char2.m_kCharMove.FindFirstPath(num, (short)nrClientNpcInfo.fFixPosX, (short)nrClientNpcInfo.fFixPosY, false);
                                zero.x = nrClientNpcInfo.fFixPosX;
                                zero.y = nrClientNpcInfo.fFixPosY;
                            }
                        }
                    }
                }
                if (lhs == Vector3.zero)
                {
                    NrNpcPos npcPos = NrTSingleton <NrNpcPosManager> .Instance.GetNpcPos(charKindInfoFromCode.GetPosKey(), charKindInfoFromCode.GetCharKind(), num);

                    if (npcPos != null && @char.m_kCharMove != null)
                    {
                        lhs    = @char.m_kCharMove.FindFirstPath(npcPos.nMapIndex, (short)npcPos.kPos.x, (short)npcPos.kPos.z, false);
                        zero.x = npcPos.kPos.x;
                        zero.y = npcPos.kPos.z;
                    }
                }
            }
        }
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        if (myCharInfo == null)
        {
            return;
        }
        int mapIndex = myCharInfo.m_kCharMapInfo.MapIndex;

        if (num == mapIndex)
        {
            if (lhs != Vector3.zero)
            {
                GS_CHAR_FINDPATH_REQ gS_CHAR_FINDPATH_REQ = new GS_CHAR_FINDPATH_REQ();
                gS_CHAR_FINDPATH_REQ.DestPos.x = lhs.x;
                gS_CHAR_FINDPATH_REQ.DestPos.y = lhs.y;
                gS_CHAR_FINDPATH_REQ.DestPos.z = lhs.z;
                SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_CHAR_FINDPATH_REQ, gS_CHAR_FINDPATH_REQ);
                TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "QUEST", "AUTOMOVE", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay));
            }
            base.CloseForm(null);
            NrTSingleton <FormsManager> .Instance.GetForm(G_ID.ADVENTURE_DLG).CloseForm(null);
        }
        else
        {
            string mapName = NrTSingleton <MapManager> .Instance.GetMapName(num);

            if (mapName != string.Empty)
            {
                MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

                if (msgBoxUI == null)
                {
                    return;
                }
                ICollection gateInfo_Col = NrTSingleton <NrBaseTableManager> .Instance.GetGateInfo_Col();

                if (gateInfo_Col == null)
                {
                    return;
                }
                int num2 = 0;
                foreach (GATE_INFO gATE_INFO in gateInfo_Col)
                {
                    if (num == gATE_INFO.DST_MAP_IDX)
                    {
                        num2 = gATE_INFO.GATE_IDX;
                    }
                }
                string empty = string.Empty;
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("4"),
                    "mapname",
                    mapName
                });

                msgBoxUI.SetMsg(new YesDelegate(this.MapWarp), num2, NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("3"), empty, eMsgType.MB_OK_CANCEL, 2);
                msgBoxUI.SetButtonOKText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("109"));
                msgBoxUI.SetButtonCancelText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("11"));
                this.m_nAutoMoveMapIndex  = num;
                this.m_nAutoMoveGateIndex = num2;
                NrTSingleton <NkQuestManager> .Instance.AutoMoveMapIndex = this.m_nAutoMoveMapIndex;
                NrTSingleton <NkQuestManager> .Instance.AutoMove         = true;
                NrTSingleton <NkQuestManager> .Instance.AutoMoveDestPos  = zero;
            }
        }
    }
    private void SetDlgInfo()
    {
        byte b    = 0;
        byte b2   = 0;
        long num  = 0L;
        long num2 = 0L;

        this.m_Questreset_gradeinfo_recruitlist.Clear();
        this.m_Questreset_gradeinfo_upgradelist.Clear();
        this.SetGrade();
        string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("667");

        string textFromInterface2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("666");

        this.m_Box_Box27.Text = string.Concat(new string[]
        {
            this.m_CurrentGroup.GetChapterUnique().ToString(),
            textFromInterface,
            " ",
            this.m_CurrentGroup.GetPage(),
            textFromInterface2,
            " ",
            this.m_CurrentGroup.GetGroupTitle()
        });
        if (this.m_CurrentGroup != null)
        {
            for (int i = 0; i < 200; i++)
            {
                QUEST_SORTID qUEST_SORTID = this.m_CurrentGroup.GetGroupInfo().m_QuestUniqueBit[i];
                if (qUEST_SORTID != null)
                {
                    if (qUEST_SORTID.m_strQuestUnique != string.Empty && !qUEST_SORTID.m_strQuestUnique.Equals("0"))
                    {
                        CQuest questByQuestUnique = NrTSingleton <NkQuestManager> .Instance.GetQuestByQuestUnique(qUEST_SORTID.m_strQuestUnique);

                        if (questByQuestUnique != null)
                        {
                            QEUST_REWARD_ITEM qEUST_REWARD_ITEM = questByQuestUnique.GetQuestCommon().cQuestRewardItem[this.m_i32CurrentGrade - 1];
                            if (qEUST_REWARD_ITEM != null)
                            {
                                num  += qEUST_REWARD_ITEM.i64RewardMoney;
                                num2 += qEUST_REWARD_ITEM.i64RewardExp;
                                if (qEUST_REWARD_ITEM.i32RecruitGenCharKind > 0)
                                {
                                    NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(qEUST_REWARD_ITEM.i32RecruitGenCharKind);

                                    if (charKindInfo != null)
                                    {
                                        ListItem listItem = new ListItem();
                                        listItem.SetColumnGUIContent(0, charKindInfo.GetCharKind(), false);
                                        listItem.SetColumnGUIContent(1, NrTSingleton <CTextParser> .Instance.GetTextColor("202") + charKindInfo.GetName());
                                        this.m_Questreset_gradeinfo_recruitlist.Add(listItem);
                                        b += 1;
                                    }
                                }
                                if (qEUST_REWARD_ITEM.i32UpgradeGenCharKind > 0)
                                {
                                    NrCharKindInfo charKindInfo2 = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(qEUST_REWARD_ITEM.i32UpgradeGenCharKind);

                                    if (charKindInfo2 != null)
                                    {
                                        ListItem listItem2 = new ListItem();
                                        listItem2.SetColumnGUIContent(0, charKindInfo2.GetCharKind(), false);
                                        listItem2.SetColumnGUIContent(1, NrTSingleton <CTextParser> .Instance.GetTextColor("202") + charKindInfo2.GetName());
                                        this.m_Questreset_gradeinfo_upgradelist.Add(listItem2);
                                        b2 += 1;
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        this.m_Questreset_gradeinfo_recruitlist.RepositionItems();
        this.m_Questreset_gradeinfo_upgradelist.RepositionItems();
        CQuest firstQuest = this.m_CurrentGroup.GetFirstQuest();

        this.m_Questreset_gradeinfo_level.Text = "Lv.001";
        if (firstQuest != null)
        {
            short num3 = firstQuest.GetQuestCommon().i16RequireLevel[this.m_i32CurrentGrade - 1];
            this.m_Questreset_gradeinfo_level.Text = "Lv." + num3.ToString("00#");
        }
        this.m_Questreset_gradeinfo_exp.Text   = ANNUALIZED.Convert(num2);
        this.m_Questreset_gradeinfo_money.Text = ANNUALIZED.Convert(num);
    }