Inheritance: global::ProtoBuf.IExtensible
コード例 #1
0
    public void LoginPB(string strAccount, string strPassword, string strSessionKey)
    {
        if (NFStart.Instance.bDebugMode)
        {
            xNet.mPlayerState = NFNet.PLAYER_STATE.E_HAS_PLAYER_ROLELIST;
            //NFCRenderInterface.Instance.LoadScene("SelectScene");
        }
        else
        {
            NFMsg.ReqAccountLogin xData = new NFMsg.ReqAccountLogin();
            xData.account = System.Text.Encoding.Default.GetBytes(strAccount);
            xData.password = System.Text.Encoding.Default.GetBytes(strPassword);
            xData.security_code = System.Text.Encoding.Default.GetBytes(strSessionKey);
            xData.signBuff = System.Text.Encoding.Default.GetBytes("");
            xData.clientVersion = 1;
            xData.loginMode = 0;
            xData.clientIP = 0;
            xData.clientMAC = 0;
            xData.device_info = System.Text.Encoding.Default.GetBytes("");
            xData.extra_info = System.Text.Encoding.Default.GetBytes("");

            MemoryStream stream = new MemoryStream();
            Serializer.Serialize<NFMsg.ReqAccountLogin>(stream, xData);

            SendMsg(new NFCoreEx.NFIDENTID(), NFMsg.EGameMsgID.EGMI_REQ_LOGIN, stream);
        }
    }
コード例 #2
0
    public void LoginPB(string strAccount, string strPassword, string strSessionKey)
    {
        if (NFStart.Instance.bDebugMode)
        {
            xNet.mPlayerState = NFNet.PLAYER_STATE.E_HAS_PLAYER_ROLELIST;
            //NFCRenderInterface.Instance.LoadScene("SelectScene");
        }
        else
        {
            NFMsg.ReqAccountLogin xData = new NFMsg.ReqAccountLogin();
            xData.account       = System.Text.Encoding.Default.GetBytes(strAccount);
            xData.password      = System.Text.Encoding.Default.GetBytes(strPassword);
            xData.security_code = System.Text.Encoding.Default.GetBytes(strSessionKey);
            xData.signBuff      = System.Text.Encoding.Default.GetBytes("");
            xData.clientVersion = 1;
            xData.loginMode     = 0;
            xData.clientIP      = 0;
            xData.clientMAC     = 0;
            xData.device_info   = System.Text.Encoding.Default.GetBytes("");
            xData.extra_info    = System.Text.Encoding.Default.GetBytes("");

            MemoryStream stream = new MemoryStream();
            Serializer.Serialize <NFMsg.ReqAccountLogin>(stream, xData);

            SendMsg(new NFrame.NFGUID(), NFMsg.EGameMsgID.EGMI_REQ_LOGIN, stream);
        }
    }
コード例 #3
0
ファイル: NFLoginModule.cs プロジェクト: yanmf/NFClient
        // 请求消息
        public void LoginPB(string strAccount, string strPwd, string strKey)
        {
            NFMsg.ReqAccountLogin xData = new NFMsg.ReqAccountLogin();
            xData.account       = ByteString.CopyFromUtf8(strAccount);
            xData.password      = ByteString.CopyFromUtf8(strPwd);
            xData.security_code = ByteString.CopyFromUtf8(strKey);
            xData.signBuff      = ByteString.CopyFromUtf8("");
            xData.clientVersion = 1;
            xData.loginMode     = NFMsg.ELoginMode.ELM_AUTO_REGISTER_LOGIN;
            xData.clientIP      = 0;
            xData.clientMAC     = 0;
            xData.device_info   = ByteString.CopyFromUtf8("");
            xData.extra_info    = ByteString.CopyFromUtf8("");

            mAccount = strAccount;

            /*
             * MemoryStream stream = new MemoryStream();
             * xData.WriteTo(stream);
             * mNetModule.SendMsg(NFMsg.EGameMsgID.EGMI_REQ_LOGIN, stream);
             */
            mxBody.SetLength(0);
            xData.WriteTo(mxBody);

            mNetModule.SendMsg(NFMsg.EGameMsgID.EGMI_REQ_LOGIN, mxBody);
        }
コード例 #4
0
        // 请求消息
        public void LoginPB(string strAccount, string strPwd, string strKey)
        {
            NFMsg.ReqAccountLogin xData = new NFMsg.ReqAccountLogin();
            xData.Account       = ByteString.CopyFromUtf8(strAccount);
            xData.Password      = ByteString.CopyFromUtf8(strPwd);
            xData.SecurityCode  = ByteString.CopyFromUtf8(strKey);
            xData.SignBuff      = ByteString.CopyFromUtf8("");
            xData.ClientVersion = 1;
            xData.LoginMode     = NFMsg.ELoginMode.ElmAutoRegisterLogin;
            xData.ClientIP      = 0;
            xData.ClientMAC     = 0;
            xData.DeviceInfo    = ByteString.CopyFromUtf8("");
            xData.ExtraInfo     = ByteString.CopyFromUtf8("");

            mAccount = strAccount;

            /*
             * MemoryStream stream = new MemoryStream();
             * xData.WriteTo(stream);
             * mNetModule.SendMsg(NFMsg.EGameMsgID.EGMI_REQ_LOGIN, stream);
             */
            mxBody.SetLength(0);
            xData.WriteTo(mxBody);

            mNetModule.SendMsg((int)NFMsg.EGameMsgID.ReqLogin, mxBody);
        }
コード例 #5
0
        public void RequireVerifyWorldKey(string strAccount, string strKey)
        {
            NFMsg.ReqAccountLogin xData = new NFMsg.ReqAccountLogin();
            xData.account       = System.Text.Encoding.Default.GetBytes(strAccount);
            xData.password      = System.Text.Encoding.Default.GetBytes("");
            xData.security_code = System.Text.Encoding.Default.GetBytes(strKey);
            xData.signBuff      = System.Text.Encoding.Default.GetBytes("");
            xData.clientVersion = 1;
            xData.loginMode     = 0;
            xData.clientIP      = 0;
            xData.clientMAC     = 0;
            xData.device_info   = System.Text.Encoding.Default.GetBytes("");
            xData.extra_info    = System.Text.Encoding.Default.GetBytes("");

            mxBody.SetLength(0);
            mxSerializer.Serialize(mxBody, xData);

            SendMsg(new NFrame.NFGUID(), NFMsg.EGameMsgID.EGMI_REQ_CONNECT_KEY, mxBody);
        }
コード例 #6
0
ファイル: NFLoginModule.cs プロジェクト: yanmf/NFClient
        public void RequireVerifyWorldKey(string strAccount, string strKey)
        {
            NFMsg.ReqAccountLogin xData = new NFMsg.ReqAccountLogin();
            xData.account       = ByteString.CopyFromUtf8(strAccount);
            xData.password      = ByteString.CopyFromUtf8("");
            xData.security_code = ByteString.CopyFromUtf8(strKey);
            xData.signBuff      = ByteString.CopyFromUtf8("");
            xData.clientVersion = 1;
            xData.loginMode     = 0;
            xData.clientIP      = 0;
            xData.clientMAC     = 0;
            xData.device_info   = ByteString.CopyFromUtf8("");
            xData.extra_info    = ByteString.CopyFromUtf8("");

            mxBody.SetLength(0);
            xData.WriteTo(mxBody);

            mNetModule.SendMsg(NFMsg.EGameMsgID.EGMI_REQ_CONNECT_KEY, mxBody);
        }
コード例 #7
0
        public void RequireVerifyWorldKey(string strAccount, string strKey)
        {
            NFMsg.ReqAccountLogin xData = new NFMsg.ReqAccountLogin();
            xData.account       = System.Text.Encoding.Default.GetBytes(strAccount);
            xData.password      = System.Text.Encoding.Default.GetBytes("");
            xData.security_code = System.Text.Encoding.Default.GetBytes(strKey);
            xData.signBuff      = System.Text.Encoding.Default.GetBytes("");
            xData.clientVersion = 1;
            xData.loginMode     = 0;
            xData.clientIP      = 0;
            xData.clientMAC     = 0;
            xData.device_info   = System.Text.Encoding.Default.GetBytes("");
            xData.extra_info    = System.Text.Encoding.Default.GetBytes("");

            MemoryStream stream = new MemoryStream();

            Serializer.Serialize <NFMsg.ReqAccountLogin>(stream, xData);

            mNetModule.SendToServerByPB(NFMsg.EGameMsgID.EGMI_REQ_CONNECT_KEY, stream);
        }
コード例 #8
0
        // 请求消息
        public void LoginPB(string strAccount, string strPwd, string strKey)
        {
            Debug.Log("LoginPB:" + strAccount);
            NFMsg.ReqAccountLogin xData = new NFMsg.ReqAccountLogin();
            xData.account       = ByteString.CopyFromUtf8(strAccount);
            xData.password      = ByteString.CopyFromUtf8(strPwd);
            xData.security_code = ByteString.CopyFromUtf8(strKey);
            xData.signBuff      = ByteString.CopyFromUtf8("");
            xData.clientVersion = 1;
            xData.loginMode     = 0;
            xData.clientIP      = 0;
            xData.clientMAC     = 0;
            xData.device_info   = ByteString.CopyFromUtf8("");
            xData.extra_info    = ByteString.CopyFromUtf8("");

            mAccount = strAccount;

            MemoryStream stream = new MemoryStream();

            xData.WriteTo(stream);

            mNetModule.SendToServerByPB(NFMsg.EGameMsgID.EGMI_REQ_LOGIN, stream);
        }
コード例 #9
0
        // 请求消息
        public void LoginPB(string strAccount, string strPwd, string strKey)
        {
            Debug.Log("LoginPB:" + strAccount);
            NFMsg.ReqAccountLogin xData = new NFMsg.ReqAccountLogin();
            xData.account       = System.Text.Encoding.Default.GetBytes(strAccount);
            xData.password      = System.Text.Encoding.Default.GetBytes(strPwd);
            xData.security_code = System.Text.Encoding.Default.GetBytes(strKey);
            xData.signBuff      = System.Text.Encoding.Default.GetBytes("");
            xData.clientVersion = 1;
            xData.loginMode     = 0;
            xData.clientIP      = 0;
            xData.clientMAC     = 0;
            xData.device_info   = System.Text.Encoding.Default.GetBytes("");
            xData.extra_info    = System.Text.Encoding.Default.GetBytes("");

            mAccount = strAccount;

            MemoryStream stream = new MemoryStream();

            Serializer.Serialize <NFMsg.ReqAccountLogin>(stream, xData);

            mNetModule.SendToServerByPB(NFMsg.EGameMsgID.EGMI_REQ_LOGIN, stream);
        }
コード例 #10
0
        public void RequireVerifyWorldKey(string strAccount, string strKey)
        {
            NFMsg.ReqAccountLogin xData = new NFMsg.ReqAccountLogin();
            xData.Account       = ByteString.CopyFromUtf8(strAccount);
            xData.Password      = ByteString.CopyFromUtf8("");
            xData.SecurityCode  = ByteString.CopyFromUtf8(strKey);
            xData.SignBuff      = ByteString.CopyFromUtf8("");
            xData.ClientVersion = 1;
            xData.LoginMode     = 0;
            xData.ClientIP      = 0;
            xData.ClientMAC     = 0;
            xData.DeviceInfo    = ByteString.CopyFromUtf8("");
            xData.ExtraInfo     = ByteString.CopyFromUtf8("");

            mxBody.SetLength(0);
            xData.WriteTo(mxBody);

            mAccount = strAccount;
            mKey     = strKey;


            mNetModule.SendMsg((int)NFMsg.EGameMsgID.ReqConnectKey, mxBody);
        }
コード例 #11
0
    public void RequireVerifyWorldKey(string strAccount, string strKey)
    {
        NFMsg.ReqAccountLogin xData = new NFMsg.ReqAccountLogin();
        xData.account = System.Text.Encoding.Default.GetBytes(strAccount);
        xData.password = System.Text.Encoding.Default.GetBytes("");
        xData.security_code = System.Text.Encoding.Default.GetBytes(strKey);
        xData.signBuff = System.Text.Encoding.Default.GetBytes("");
        xData.clientVersion = 1;
        xData.loginMode = 0;
        xData.clientIP = 0;
        xData.clientMAC = 0;
        xData.device_info = System.Text.Encoding.Default.GetBytes("");
        xData.extra_info = System.Text.Encoding.Default.GetBytes("");

        MemoryStream stream = new MemoryStream();
        Serializer.Serialize<NFMsg.ReqAccountLogin>(stream, xData);

        SendMsg(new NFCoreEx.NFIDENTID(), NFMsg.EGameMsgID.EGMI_REQ_CONNECT_KEY, stream);
    }