// 请求消息 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); }
// 请求消息 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); }
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); }
// 请求消息 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); }
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); }