Exemple #1
0
    public override void SetData(TsDataReader.Row row)
    {
        this.adventure = new Adventure();
        int num = 0;

        row.GetColumn(num++, out this.adventure.m_nAdventureUnique);
        row.GetColumn(num++, out this.adventure.m_szAdventureName);
        row.GetColumn(num++, out this.adventure.m_szBackImage);
        for (int i = 0; i < 10; i++)
        {
            int  num2   = -1;
            bool column = row.GetColumn(num++, out num2);
            if (!column || num2 == 0)
            {
                break;
            }
            Adventure.AdventureInfo adventureInfo = new Adventure.AdventureInfo();
            adventureInfo.questGroupUnique = num2;
            row.GetColumn(num++, out adventureInfo.monsterCode);
            string empty = string.Empty;
            row.GetColumn(num++, out empty);
            char[] separator = new char[]
            {
                '_'
            };
            string[] array = empty.Split(separator);
            adventureInfo.mapIndex = int.Parse(array[0]);
            adventureInfo.destX    = int.Parse(array[1]);
            adventureInfo.destY    = int.Parse(array[2]);
            this.adventure.m_kAdventureInfo.Add(adventureInfo);
        }
    }
Exemple #2
0
    private void ClickNpc(IUIObject obj)
    {
        UI_UIGuide uI_UIGuide = NrTSingleton <FormsManager> .Instance.GetForm((G_ID)this.m_nWinID) as UI_UIGuide;

        if (uI_UIGuide != null)
        {
            uI_UIGuide.CloseUI = true;
        }
        if ((double)this.oldZ != 0.0)
        {
            base.SetLocation(base.GetLocationX(), base.GetLocationY(), this.oldZ);
        }
        if (this.m_CurrentQuest == null)
        {
            return;
        }
        if (obj == null)
        {
            return;
        }
        int index = (int)obj.Data;

        Adventure.AdventureInfo adventureInfo = AdventureDlg.m_CurrentAdventure.GetAdventureInfo(index);
        if (adventureInfo == null)
        {
            return;
        }
        EpisodeCheckDlg episodeCheckDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.EPISODECHECK_DLG) as EpisodeCheckDlg;

        if (episodeCheckDlg != null)
        {
            episodeCheckDlg.SetEpisode(adventureInfo, this.m_CurrentQuest);
        }
    }
 public string GetMonsterKind(int index)
 {
     if (index >= this.m_kAdventureInfo.Count)
     {
         return(string.Empty);
     }
     Adventure.AdventureInfo adventureInfo = this.m_kAdventureInfo[index];
     if (adventureInfo == null)
     {
         return(string.Empty);
     }
     return(adventureInfo.monsterCode);
 }
 public int GetQuestGroupUnique(int index)
 {
     if (index >= this.m_kAdventureInfo.Count)
     {
         return(0);
     }
     Adventure.AdventureInfo adventureInfo = this.m_kAdventureInfo[index];
     if (adventureInfo == null)
     {
         return(0);
     }
     return(adventureInfo.questGroupUnique);
 }
    public void SetEpisode(Adventure.AdventureInfo adventureInfo, CQuest quest)
    {
        this.m_CurrentAdventureInfo = adventureInfo;
        this.m_CurrentQuest         = quest;
        if (this.m_CurrentAdventureInfo == null)
        {
            return;
        }
        CQuestGroup questGroupByGroupUnique = NrTSingleton <NkQuestManager> .Instance.GetQuestGroupByGroupUnique(this.m_CurrentAdventureInfo.questGroupUnique);

        string empty = string.Empty;

        if (questGroupByGroupUnique != null)
        {
            string text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("75");

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                text,
                "count",
                questGroupByGroupUnique.GetPage()
            });

            this.m_EpisodeNum.Text  = empty;
            this.m_EpisodeName.Text = questGroupByGroupUnique.GetGroupTitle();
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromQuest_Title(questGroupByGroupUnique.GetGroupUnique().ToString() + "_Group_Sum");

            if (text != null)
            {
                this.m_EpisodeSummary.Visible = true;
                this.m_EpisodeSummary.Text    = text;
            }
            else
            {
                this.m_EpisodeSummary.Visible = false;
            }
        }
        NrCharKindInfo nrCharKindInfo;

        if (this.m_CurrentQuest != null)
        {
            nrCharKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(this.m_CurrentQuest.GetQuestCommon().i32QuestCharKind);

            if (nrCharKindInfo == null)
            {
                return;
            }
            this.m_Image.SetTexture(eCharImageType.LARGE, nrCharKindInfo.GetCharKind(), -1, string.Empty);
        }
        else
        {
            nrCharKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfoFromCode(this.m_CurrentAdventureInfo.monsterCode);

            if (nrCharKindInfo == null)
            {
                return;
            }
            this.m_Image.SetTexture(eCharImageType.LARGE, nrCharKindInfo.GetCharKind(), -1, string.Empty);
        }
        empty = string.Empty;
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("93"),
            "targetname",
            nrCharKindInfo.GetName()
        });

        this.m_Start.Text = empty;
    }