Example #1
0
    public void ChangeNameAck(long nResult)
    {
        if (nResult == 0L)
        {
            TsLog.Log("이름 변경 성공", new object[0]);
            NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser;

            NrPersonInfoBase personInfo = nrCharUser.GetPersonInfo();
            personInfo.SetCharName(this.m_newName);
            NrTSingleton <NrMainSystem> .Instance.SetLatestPersonID(personInfo.GetPersonID().ToString());

            MsgHandler.Handle("Req_CONNECT_GAMESERVER_REQ", new object[]
            {
                personInfo.GetPersonID()
            });
            FacadeHandler.MoveStage(Scene.Type.PREPAREGAME);
            NrTSingleton <NkQuestManager> .Instance.SortingQuestInGroup();

            NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.CHANGENAME_DLG);
        }
        else if (nResult == -20L)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("90"));
            this.m_btOk.SetEnabled(true);
        }
        else
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("91"));
            this.m_btOk.SetEnabled(true);
        }
    }
Example #2
0
    private void _onOK(object arg)
    {
        NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser;

        NrPersonInfoBase        personInfo = nrCharUser.GetPersonInfo();
        WS_CHANGE_CHAR_NAME_REQ wS_CHANGE_CHAR_NAME_REQ = new WS_CHANGE_CHAR_NAME_REQ();

        TKString.StringChar(this.m_originName, ref wS_CHANGE_CHAR_NAME_REQ.szCharName);
        TKString.StringChar(this.m_newName, ref wS_CHANGE_CHAR_NAME_REQ.szChangeName);
        wS_CHANGE_CHAR_NAME_REQ.nPersonID = personInfo.GetPersonID();
        SendPacket.GetInstance().SendObject(16777258, wS_CHANGE_CHAR_NAME_REQ);
        this.m_btOk.SetEnabled(false);
    }