示例#1
0
    public override void AfterAutoPath()
    {
        if (NrTSingleton <FormsManager> .Instance.IsShow(G_ID.NPCTALK_DLG))
        {
            return;
        }
        QuestAutoPathInfo autoPathInfo = NrTSingleton <NkQuestManager> .Instance.GetAutoPathInfo();

        if (autoPathInfo != null)
        {
            NrCharNPC nrCharNPC = (NrCharNPC)NrTSingleton <NkCharManager> .Instance.GetCharByCharKind(autoPathInfo.m_nCharKind);

            if (nrCharNPC != null && autoPathInfo.m_nCharKind > 0 && nrCharNPC != null)
            {
                NrCharKindInfo charKindInfo = nrCharNPC.GetCharKindInfo();
                if (charKindInfo != null)
                {
                    NpcTalkUI_DLG npcTalkUI_DLG = (NpcTalkUI_DLG)NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.NPCTALK_DLG);

                    npcTalkUI_DLG.SetNpcID(charKindInfo.GetCharKind(), nrCharNPC.GetCharUnique());
                    npcTalkUI_DLG.Show();
                }
            }
        }
    }
    public override void AfterAutoPath()
    {
        QuestAutoPathInfo autoPathInfo = NrTSingleton <NkQuestManager> .Instance.GetAutoPathInfo();

        if (autoPathInfo != null)
        {
            NrCharNPC nrCharNPC = (NrCharNPC)NrTSingleton <NkCharManager> .Instance.GetCharByCharKind(autoPathInfo.m_nCharKind);

            if (nrCharNPC != null && autoPathInfo.m_nCharKind > 0 && nrCharNPC != null)
            {
                NrCharKindInfo charKindInfo = nrCharNPC.GetCharKindInfo();
                if (charKindInfo != null)
                {
                    NpcTalkUI_DLG npcTalkUI_DLG = (NpcTalkUI_DLG)NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.NPCTALK_DLG);

                    npcTalkUI_DLG.SetNpcID(charKindInfo.GetCharKind(), nrCharNPC.GetCharUnique());
                    npcTalkUI_DLG.Show();
                    CHARKIND_NPCINFO cHARKIND_NPCINFO = charKindInfo.GetCHARKIND_NPCINFO();
                    if (cHARKIND_NPCINFO != null && !string.IsNullOrEmpty(cHARKIND_NPCINFO.SOUND_GREETING))
                    {
                        TsAudioManager.Instance.AudioContainer.RequestAudioClip("NPC", cHARKIND_NPCINFO.SOUND_GREETING, "GREETING", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay));
                    }
                }
            }
        }
    }
示例#3
0
    public override void OpenUI(int nSelect)
    {
        if (0 > nSelect || 6 <= nSelect)
        {
            return;
        }
        if (G_ID.NONE < this.m_nUI[nSelect])
        {
            NpcTalkUI_DLG npcTalkUI_DLG = (NpcTalkUI_DLG)NrTSingleton <FormsManager> .Instance.GetForm(G_ID.NPCTALK_DLG);

            if (npcTalkUI_DLG != null)
            {
                npcTalkUI_DLG.Clear();
                npcTalkUI_DLG.Close();
            }
            Form form = NrTSingleton <FormsManager> .Instance.LoadForm(this.m_nUI[nSelect]);

            form.p_nCharKind = this.m_i32CharKind;
            if (nSelect == 1)
            {
                form.InitData();
                form.Show();
            }
            else
            {
                form.Show();
            }
        }
    }
示例#4
0
    public void AudioPlay(string strMute)
    {
        UnityEngine.Debug.LogWarning("AutoPlay SET: " + strMute);
        bool bMute = strMute == "1";

        CommonTasks.MuteAudioOnOff(bMute);
        if (strMute == "0")
        {
            if (Scene.CurScene <= Scene.Type.LOGIN)
            {
                NmMainFrameWork.AddBGM();
                NrTSingleton <NrMainSystem> .Instance.m_bIsShowBI = true;
                NrTSingleton <PreloadDataTableMgr> .Instance.StopPreLoadTable();
            }
            else if (Scene.CurScene == Scene.Type.BATTLE)
            {
                Battle_ResultTutorialDlg battle_ResultTutorialDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.BATTLE_RESULT_TUTORIAL_DLG) as Battle_ResultTutorialDlg;

                if (battle_ResultTutorialDlg != null)
                {
                    if (!battle_ResultTutorialDlg.Visible)
                    {
                        battle_ResultTutorialDlg.Show();
                    }
                    battle_ResultTutorialDlg.OpenTime       = 0f;
                    battle_ResultTutorialDlg.PlayMovie      = false;
                    battle_ResultTutorialDlg.m_bUpdateCheck = true;
                    battle_ResultTutorialDlg.MovieTime      = 0f;
                }
                if (Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_MYTHRAID)
                {
                    Battle_Control_Dlg battle_Control_Dlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.BATTLE_CONTROL_DLG) as Battle_Control_Dlg;

                    if (battle_Control_Dlg != null)
                    {
                        battle_Control_Dlg.MovieEnd();
                    }
                }
            }
            else if (NrTSingleton <NkQuestManager> .Instance.bPlayMovie)
            {
                NpcTalkUI_DLG npcTalkUI_DLG = (NpcTalkUI_DLG)NrTSingleton <FormsManager> .Instance.GetForm(G_ID.NPCTALK_DLG);

                if (npcTalkUI_DLG != null)
                {
                    npcTalkUI_DLG.Show();
                }
                NrTSingleton <NkQuestManager> .Instance.bPlayMovie = false;
            }
            NmMainFrameWork.m_bMoviePlay = false;
        }
        else
        {
            this.m_fBITime = Time.time + 15f;
        }
    }
示例#5
0
    public override void OpenUI(int nSelect)
    {
        NpcTalkUI_DLG npcTalkUI_DLG = (NpcTalkUI_DLG)NrTSingleton <FormsManager> .Instance.GetForm(G_ID.NPCTALK_DLG);

        if (npcTalkUI_DLG != null)
        {
            npcTalkUI_DLG.Clear();
            npcTalkUI_DLG.Close();
        }
        NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.GUILD_LIST_DLG);
    }
示例#6
0
    public bool CheckAutoMoveKind()
    {
        QuestAutoPathInfo autoPathInfo = NrTSingleton <NkQuestManager> .Instance.GetAutoPathInfo();

        if (autoPathInfo != null)
        {
            if (!autoPathInfo.m_bComplete)
            {
                autoPathInfo.m_kQuest.AfterAutoPath();
            }
            else if (autoPathInfo.m_nCharKind > 0)
            {
                NrCharBase charByCharKind = NrTSingleton <NkCharManager> .Instance.GetCharByCharKind(autoPathInfo.m_nCharKind);

                if (charByCharKind != null)
                {
                    if (!this.m_pkChar.IsCloseToTalkNPC(ref charByCharKind, 2f))
                    {
                        return(false);
                    }
                    NrCharKindInfo charKindInfo = charByCharKind.GetCharKindInfo();
                    if (charKindInfo != null)
                    {
                        NpcTalkUI_DLG npcTalkUI_DLG = (NpcTalkUI_DLG)NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.NPCTALK_DLG);

                        if (npcTalkUI_DLG != null)
                        {
                            npcTalkUI_DLG.SetNpcID(charKindInfo.GetCharKind(), charByCharKind.GetCharUnique());
                            npcTalkUI_DLG.Show();
                        }
                        CHARKIND_NPCINFO cHARKIND_NPCINFO = charKindInfo.GetCHARKIND_NPCINFO();
                        if (cHARKIND_NPCINFO != null && !string.IsNullOrEmpty(cHARKIND_NPCINFO.SOUND_GREETING))
                        {
                            TsAudioManager.Instance.AudioContainer.RequestAudioClip("NPC", cHARKIND_NPCINFO.SOUND_GREETING, "GREETING", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay));
                        }
                    }
                    if (charByCharKind.GetCharObject() != null)
                    {
                        Vector3 position = charByCharKind.GetCharObject().transform.position;
                        this.m_pkChar.m_k3DChar.RequestLookAt(position.x, position.z);
                    }
                    return(true);
                }
                else
                {
                    Debug.Log("null == npc");
                }
            }
            NrTSingleton <NkQuestManager> .Instance.SetAutoPathInfo(null);
        }
        return(false);
    }
示例#7
0
    private void BtnOk(IUIObject obj)
    {
        if (0 < this.m_i32SelGrade && this.m_i32CurGrade + 1 >= this.m_i32SelGrade)
        {
            NpcTalkUI_DLG npcTalkUI_DLG = (NpcTalkUI_DLG)NrTSingleton <FormsManager> .Instance.GetForm(G_ID.NPCTALK_DLG);

            if (npcTalkUI_DLG != null)
            {
                npcTalkUI_DLG.SetGrade(this.m_i32SelGrade);
                this.Hide();
            }
        }
    }
示例#8
0
    public void ClickGiveItem(IUIObject obj)
    {
        if (this.m_State.eState == QUEST_CONST.eQUESTSTATE.QUESTSTATE_COMPLETE)
        {
            NrTSingleton <NkQuestManager> .Instance.SetCompleteItem(this.m_ItemUISet[0].m_Item, this.m_ItemUISet[1].m_Item, this.m_ItemUISet[2].m_Item);
        }
        NpcTalkUI_DLG npcTalkUI_DLG = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.NPCTALK_DLG) as NpcTalkUI_DLG;

        if (npcTalkUI_DLG != null)
        {
            npcTalkUI_DLG.SetStep(E_NPC_TALK_STEP.E_NPC_TALK_STEP_TALK);
        }
        this.Close();
    }
示例#9
0
    public override void OpenUI(int nSelect)
    {
        short         nNpcCharUnique = 0;
        NpcTalkUI_DLG npcTalkUI_DLG  = (NpcTalkUI_DLG)NrTSingleton <FormsManager> .Instance.GetForm(G_ID.NPCTALK_DLG);

        if (npcTalkUI_DLG != null)
        {
            nNpcCharUnique = npcTalkUI_DLG.NPCCharUnique;
            npcTalkUI_DLG.Clear();
            npcTalkUI_DLG.Close();
        }
        IndunEnterScenario_DLG indunEnterScenario_DLG = (IndunEnterScenario_DLG)NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.INDUN_ENTER_SCENARIO_DLG);

        indunEnterScenario_DLG.Set(this.m_nIndunIDX[nSelect], nNpcCharUnique);
    }
示例#10
0
    public override void OpenUI(int nSelect)
    {
        if (this.m_nUI[nSelect] == G_ID.SOLAWAKENING_DLG)
        {
            GS_SOLAWAKENING_INFO_REQ obj = new GS_SOLAWAKENING_INFO_REQ();
            SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_SOLAWAKENING_INFO_REQ, obj);
            NpcTalkUI_DLG npcTalkUI_DLG = (NpcTalkUI_DLG)NrTSingleton <FormsManager> .Instance.GetForm(G_ID.NPCTALK_DLG);

            if (npcTalkUI_DLG != null)
            {
                npcTalkUI_DLG.Clear();
                npcTalkUI_DLG.Close();
            }
        }
        else
        {
            base.OpenUI(nSelect);
        }
    }
示例#11
0
    public void NpcClick(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;
        }
        NrCharBase charByCharUnique = NrTSingleton <NkCharManager> .Instance.GetCharByCharUnique(this.m_i16CharUnique);

        if (charByCharUnique == null)
        {
            return;
        }
        NrCharKindInfo charKindInfo = charByCharUnique.GetCharKindInfo();

        if (charKindInfo == null)
        {
            return;
        }
        if (!charByCharUnique.IsCharKindATB(16L))
        {
            if (charByCharUnique.IsCharKindATB(8L))
            {
                if (NrTSingleton <NkClientLogic> .Instance.IsNPCTalkState())
                {
                    return;
                }
                if (charByCharUnique.IsCharKindATB(562949953421312L))
                {
                    GS_TREASUREBOX_CLICK_REQ gS_TREASUREBOX_CLICK_REQ = new GS_TREASUREBOX_CLICK_REQ();
                    gS_TREASUREBOX_CLICK_REQ.i32CharUnique = (int)charByCharUnique.GetCharUnique();
                    SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_TREASUREBOX_CLICK_REQ, gS_TREASUREBOX_CLICK_REQ);
                    return;
                }
                if (charByCharUnique.IsCharKindATB(1125899906842624L))
                {
                    if (!NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.IsBountyHunt())
                    {
                        return;
                    }
                    GS_BABELTOWER_GOLOBBY_REQ gS_BABELTOWER_GOLOBBY_REQ = new GS_BABELTOWER_GOLOBBY_REQ();
                    gS_BABELTOWER_GOLOBBY_REQ.mode                = 0;
                    gS_BABELTOWER_GOLOBBY_REQ.babel_floor         = 0;
                    gS_BABELTOWER_GOLOBBY_REQ.babel_subfloor      = 0;
                    gS_BABELTOWER_GOLOBBY_REQ.nPersonID           = 0L;
                    gS_BABELTOWER_GOLOBBY_REQ.i16BountyHuntUnique = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.BountyHuntUnique;
                    SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_BABELTOWER_GOLOBBY_REQ, gS_BABELTOWER_GOLOBBY_REQ);
                    return;
                }
                else
                {
                    NrTSingleton <NkQuestManager> .Instance.IncreaseQuestParamVal(30, (long)charKindInfo.GetCharKind(), 1L);

                    NrTSingleton <NkQuestManager> .Instance.IncreaseQuestParamVal(8, (long)charKindInfo.GetCharKind(), 1L);

                    NrTSingleton <NkQuestManager> .Instance.IncreaseQuestParamVal(99, (long)charKindInfo.GetCharKind(), 1L);

                    NrTSingleton <NkQuestManager> .Instance.IncreaseQuestParamVal(48, (long)charKindInfo.GetCharKind(), 1L);

                    if (charByCharUnique.GetCharUnique() >= 31300 && charByCharUnique.GetCharUnique() <= 31400)
                    {
                        string text = NrTSingleton <NkQuestManager> .Instance.IsCheckCodeANDParam(QUEST_CONST.eQUESTCODE.QUESTCODE_TAKECHAR, (long)charKindInfo.GetCharKind());

                        if (text != string.Empty)
                        {
                            TakeTalk_DLG takeTalk_DLG = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.TAKETALK_DLG) as TakeTalk_DLG;

                            if (takeTalk_DLG != null)
                            {
                                takeTalk_DLG.SetNpc(charKindInfo.GetCharKind(), charByCharUnique.GetCharUnique(), text);
                                takeTalk_DLG.Show();
                            }
                            return;
                        }
                    }
                    if (charByCharUnique.GetCharUnique() >= 31005 && charByCharUnique.GetCharUnique() <= 31200)
                    {
                        return;
                    }
                    NpcTalkUI_DLG npcTalkUI_DLG = (NpcTalkUI_DLG)NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.NPCTALK_DLG);

                    npcTalkUI_DLG.SetNpcID(charKindInfo.GetCharKind(), charByCharUnique.GetCharUnique());
                    npcTalkUI_DLG.Show();
                }
            }
            else if (charByCharUnique.IsCharKindATB(4L))
            {
                NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

                if (@char == null)
                {
                    return;
                }
                @char.MoveTo(charByCharUnique.GetCharObject().transform.position);
                NrTSingleton <NkClientLogic> .Instance.SetPickChar(charByCharUnique);

                if (charKindInfo.GetCHARKIND_MONSTERINFO() != null)
                {
                    NrTSingleton <GameGuideManager> .Instance.MonsterLevel = (int)charKindInfo.GetCHARKIND_MONSTERINFO().MINLEVEL;
                }
                else
                {
                    NrTSingleton <GameGuideManager> .Instance.MonsterLevel = 0;
                }
                this.Close();
                return;
            }
            return;
        }
        if (charByCharUnique.IsCharKindATB(268435456L))
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("39"), SYSTEM_MESSAGE_TYPE.NORMAL_SYSTEM_MESSAGE);
            return;
        }
        NrCharBase char2 = NrTSingleton <NkCharManager> .Instance.GetChar(1);

        if (char2 == null)
        {
            return;
        }
        char2.MoveTo(charByCharUnique.GetCharObject().transform.position);
        NrTSingleton <NkClientLogic> .Instance.SetPickChar(charByCharUnique);

        this.Close();
    }