Пример #1
0
    public void OnAutoMoveStop(object a_oObject)
    {
        NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

        if (@char != null && @char.IsCharKindATB(1L))
        {
            NrCharUser nrCharUser = (NrCharUser)@char;
            nrCharUser.SetFollowCharPersonID(0L, string.Empty);
            nrCharUser.m_kCharMove.MoveStop(true, false);
        }
    }
Пример #2
0
    private void BtnClickButton1(IUIObject obj)
    {
        NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

        if (@char.IsCharKindATB(1L))
        {
            NrCharUser nrCharUser = (NrCharUser)@char;
            nrCharUser.SetFollowCharPersonID(0L, string.Empty);
            nrCharUser.m_kCharMove.MoveStop(true, false);
        }
        this.Close();
    }
Пример #3
0
    public override void InitializeComponent()
    {
        UIBaseFileManager instance = NrTSingleton <UIBaseFileManager> .Instance;
        Form form = this;

        form.Scale = true;
        instance.LoadFile(ref form, "DLG_StopAutoMove", G_ID.DLG_STOPAUTOMOVE, true);
        instance.CreateControl(ref this.m_TitleLabel, "Label_title");
        instance.CreateControl(ref this.m_DrawTexture_background, "DrawTexture_background");
        instance.CreateControl(ref this.m_DrawTexture_DrawTexture8, "DrawTexture_DrawTexture8");
        instance.CreateControl(ref this.m_Label_Label9, "Label_text1");
        instance.CreateControl(ref this.m_Button_Button1, "Button_1");
        instance.CreateControl(ref this.m_Button_Button2, "Button_2");
        Button expr_95 = this.m_Button_Button1;

        expr_95.Click = (EZValueChangedDelegate)Delegate.Combine(expr_95.Click, new EZValueChangedDelegate(this.BtnClickButton1));
        Button expr_BC = this.m_Button_Button2;

        expr_BC.Click = (EZValueChangedDelegate)Delegate.Combine(expr_BC.Click, new EZValueChangedDelegate(this.BtnClickButton2));
        NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

        if (@char.IsCharKindATB(1L))
        {
            NrCharUser nrCharUser         = (NrCharUser)@char;
            string     textFromMessageBox = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("119");

            string empty = string.Empty;
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                textFromMessageBox,
                "username",
                nrCharUser.GetFollowCharName()
            });

            this.m_Label_Label9.SetText(empty);
        }
        base.SetScreenCenter();
    }
Пример #4
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();
    }
Пример #5
0
    public void MyCharMoveMouse()
    {
        NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

        if (@char == null)
        {
            return;
        }
        if (NkInputManager.GetMouseButton(0) && NkInputManager.GetMouseButton(1))
        {
            NrCharUser nrCharUser = (NrCharUser)@char;
            if (nrCharUser.GetFollowCharPersonID() > 0L)
            {
                if (!(NrTSingleton <FormsManager> .Instance.GetForm(G_ID.DLG_STOPAUTOMOVE) is StopAutoMove))
                {
                    NrTSingleton <FormsManager> .Instance.ShowForm(G_ID.DLG_STOPAUTOMOVE);
                }
                return;
            }
            if (!this.bMouseCharMove)
            {
                nrCharUser.m_kCharMove.MoveStop(true, false);
                nrCharUser.m_kCharMove.SetIncreaseMove();
            }
            nrCharUser.m_kCharMove.MouseMove();
            this.bMouseCharMove = true;
        }
        else if (NkInputManager.GetMouseButtonUp(0))
        {
            if (this.bMouseCharMove)
            {
                if (@char != null)
                {
                    @char.m_kCharMove.MoveStop(true, true);
                    @char.m_kCharMove.SendCharMovePacketForKeyBoardMove(true);
                }
                this.bMouseCharMove = false;
                this.SetSafeClickTime(-0.2f);
                return;
            }
            this.UpdateWalkEffect(false);
            if (NrTSingleton <FormsManager> .Instance.IsMouseOverForm())
            {
                return;
            }
            if (!NrTSingleton <NkClientLogic> .Instance.IsPickingEnable())
            {
                NrTSingleton <NkClientLogic> .Instance.SetPickingEnable(true);

                return;
            }
            if (!NrTSingleton <NkClientLogic> .Instance.IsMovable())
            {
                return;
            }
            if (this.fSafeClickTime > 0f && Time.time - this.fSafeClickTime < 0.5f)
            {
                return;
            }
            NrCharUser nrCharUser2 = (NrCharUser)@char;
            if (nrCharUser2.GetFollowCharPersonID() > 0L)
            {
                NrTSingleton <FormsManager> .Instance.ShowForm(G_ID.DLG_STOPAUTOMOVE);
            }
            else
            {
                NrCharBase pickChar = NrTSingleton <NkClientLogic> .Instance.GetPickChar();

                if (pickChar != null)
                {
                    if (NrTSingleton <NkClientLogic> .Instance.GetFocusChar() == null)
                    {
                        pickChar.CancelClickMe();
                        nrCharUser2.m_kCharMove.SetTargetChar(null);
                    }
                    else
                    {
                        pickChar.SetClickMe();
                        if (!pickChar.IsCharKindATB(32L))
                        {
                            nrCharUser2.m_kCharMove.SetTargetChar(pickChar);
                        }
                        else
                        {
                            nrCharUser2.m_kCharMove.SetTargetChar(null);
                        }
                    }
                }
                else
                {
                    NrCharBase targetChar = nrCharUser2.m_kCharMove.GetTargetChar();
                    if (targetChar != null)
                    {
                        targetChar.CancelClickMe();
                    }
                    nrCharUser2.m_kCharMove.SetTargetChar(null);
                }
                nrCharUser2.PickingMove();
            }
            Dlg_Collect dlg_Collect = (Dlg_Collect)NrTSingleton <FormsManager> .Instance.GetForm(G_ID.DLG_COLLECT);

            if (dlg_Collect != null)
            {
                dlg_Collect.OnClose();
            }
            this.fSafeClickTime = 0f;
        }
        else if (this.bMouseCharMove)
        {
            if (@char != null)
            {
                @char.m_kCharMove.MoveStop(true, true);
                @char.m_kCharMove.SendCharMovePacketForKeyBoardMove(true);
            }
            this.bMouseCharMove = false;
            this.SetSafeClickTime(-0.2f);
        }
    }
Пример #6
0
    public void TabCharMove()
    {
        if (!NrTSingleton <NkQuestManager> .Instance.IsCompletedFirstQuest())
        {
            return;
        }
        NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser;

        if (nrCharUser != null)
        {
            if (!NrTSingleton <NkClientLogic> .Instance.IsMovable())
            {
                nrCharUser.m_kCharMove.MoveStop(true, true);
                return;
            }
            if (this.bMouseCharMove)
            {
                nrCharUser.m_kCharMove.MoveStop(true, true);
                nrCharUser.m_kCharMove.SendCharMovePacketForKeyBoardMove(true);
                this.bMouseCharMove = false;
                this.SetSafeClickTime(-0.2f);
                return;
            }
        }
        this.UpdateWalkEffect(false);
        if (!NrTSingleton <NkClientLogic> .Instance.IsPickingEnable())
        {
            NrTSingleton <NkClientLogic> .Instance.SetPickingEnable(true);

            return;
        }
        if (!NrTSingleton <NkClientLogic> .Instance.IsMovable())
        {
            return;
        }
        if (this.fSafeClickTime > 0f && Time.time - this.fSafeClickTime < 0.5f)
        {
            return;
        }
        NrCharUser nrCharUser2 = nrCharUser;

        if (nrCharUser == null)
        {
            return;
        }
        if (nrCharUser2.GetFollowCharPersonID() > 0L)
        {
            NrTSingleton <FormsManager> .Instance.ShowForm(G_ID.DLG_STOPAUTOMOVE);
        }
        else
        {
            if (Launcher.Instance.LocalPatchLevel != Launcher.Instance.PatchLevelMax && NrTSingleton <NrAutoPath> .Instance.IsAutoMoving())
            {
                string textFromMessageBox = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("168");

                string textFromMessageBox2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("240");

                MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

                msgBoxUI.SetMsg(new YesDelegate(this.OnAutoMoveStop), null, textFromMessageBox, textFromMessageBox2, eMsgType.MB_OK_CANCEL, 2);
                msgBoxUI.SetButtonOKText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("320"));
                msgBoxUI.SetButtonCancelText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("321"));
                return;
            }
            NrCharBase pickChar = NrTSingleton <NkClientLogic> .Instance.GetPickChar();

            if (pickChar != null)
            {
                if (NrTSingleton <NkClientLogic> .Instance.GetFocusChar() == null)
                {
                    pickChar.CancelClickMe();
                    nrCharUser2.m_kCharMove.SetTargetChar(null);
                }
                else
                {
                    pickChar.SetClickMe();
                    if (!pickChar.IsCharKindATB(32L))
                    {
                        nrCharUser2.m_kCharMove.SetTargetChar(pickChar);
                    }
                    else
                    {
                        nrCharUser2.m_kCharMove.SetTargetChar(null);
                    }
                }
            }
            else
            {
                NrCharBase targetChar = nrCharUser2.m_kCharMove.GetTargetChar();
                if (targetChar != null)
                {
                    targetChar.CancelClickMe();
                }
                nrCharUser2.m_kCharMove.SetTargetChar(null);
            }
            nrCharUser2.PickingMove();
        }
        Dlg_Collect dlg_Collect = (Dlg_Collect)NrTSingleton <FormsManager> .Instance.GetForm(G_ID.DLG_COLLECT);

        if (dlg_Collect != null)
        {
            dlg_Collect.OnClose();
        }
        this.fSafeClickTime = 0f;
    }