/// <summary> /// 发送礼物表情消息 /// </summary> /// <param name="str">礼物字符串标注("int(语音号),int(发送方位)")</param> public void SendProp(string str) { string[] strs = str.Split(','); //GameObject go = Instantiate(Resources.Load<GameObject>("Game_GYMJ/Prefabs/prop/" + strs[0]), GameUIGO.transform.Find("Fixed_UI/Heads")) as GameObject; // go.GetComponent<RectTransform>().localPosition = GetHeadPos((int)(GameInfo.GetFW(GameInfo.FW))); //go.GetComponent<RectTransform>().localScale = Vector3.one; //go.GetComponent<Image>().SetNativeSize(); // go.GetComponent<RectTransform>().DOLocalMove(GetHeadPos(int.Parse(strs[1])), 2); //StartCoroutine(PropMove(go)); //SendVoice sendGameOperation = SendVoice.CreateBuilder() // .SetOpenid(GameInfo.OpenID) // .SetRoomID(GameInfo.room_id) // .SetVoiceNumber(int.Parse(strs[0])) // .SetFWT(GetTrueFw(int.Parse(strs[1]))) // .Build(); //byte[] body = sendGameOperation.ToByteArray(); SendVoice sendGameOperation = new SendVoice(); sendGameOperation.openid = GameInfo.OpenID; sendGameOperation.RoomID = GameInfo.room_id; sendGameOperation.VoiceNumber = int.Parse(strs[0]); sendGameOperation.FWT = GetTrueFw(int.Parse(strs[1])); byte[] body = ProtobufUtility.GetByteFromProtoBuf(sendGameOperation); byte[] data = CreateHead.CreateMessage(CreateHead.CSXYNUM + 8002, body.Length, 0, body); Debug.Log(data); GameInfo.cs.Send(data); }
//账号密码输入界面-登录按钮监听方法 void ZhanghaoDenglu() { if (!agreementTge.isOn) { FICWaringPanel._instance.Show("请阅读并同意用户协议!"); return; } //定位 GPSManager.instance.StartCrt(); //SendLoginPW来自于谷歌插件 SendLoginPW sendLoginPW = new SendLoginPW(); sendLoginPW.UserAccount = inputUserName.text; sendLoginPW.pwd = inputPasword.text; //省份 sendLoginPW.province = GameInfo.province; //城市 sendLoginPW.city = GameInfo.city; //维度 sendLoginPW.Latitude = GameInfo.Latitude; byte[] body = ProtobufUtility.GetByteFromProtoBuf(sendLoginPW); byte[] data = CreateHead.CreateMessage(CreateHead.CSXYNUM + 1003, body.Length, 0, body); GameInfo.cs.Send(data); HideZhanghaoPanel(); GameInfo.loginType = LoginType.longbao; }
//龙宝登录按钮监听方法 void LongbaoDenglu() { if (!agreementTge.isOn) { FICWaringPanel._instance.Show("请阅读并同意用户协议!"); return; } //定位 GPSManager.instance.StartCrt(); //如果证书不为空 if (!string.IsNullOrEmpty(GameInfo.certificate)) { SendLoginPW sendLoginPW = new SendLoginPW(); sendLoginPW.province = GameInfo.province; sendLoginPW.city = GameInfo.city; sendLoginPW.Latitude = GameInfo.Latitude; sendLoginPW.Certificate = GameInfo.certificate; byte[] body = ProtobufUtility.GetByteFromProtoBuf(sendLoginPW); byte[] data = CreateHead.CreateMessage(CreateHead.CSXYNUM + 1003, body.Length, 0, body); GameInfo.cs.Send(data); DisableLoginButtons(); GameInfo.loginType = LoginType.longbao; } else { HideLoginButtons(); ShowZhanghaoPanel(); } }
/* * public void OnEnterRoomLoaded() * { * roomID = int.Parse(roomidStr); * SendAddRoom addRoom = SendAddRoom.CreateBuilder() * .SetRoomID(roomID) * .SetOpenid(GameInfo.OpenID) * .Build(); * byte[] body = addRoom.ToByteArray(); * byte[] data = CreateHead.CreateMessage(CreateHead.CSXYNUM + 2003, body.Length, 0, body); * Debug.Log("jiaru" + roomID + ",id:" + GameInfo.OpenID); * GameInfo.cs.Send(data); * * GameInfo.MJplayers.Clear();//加入房间时,清空字典,以免加入别的房间,数据不对 * roomidStr = null; * }*/ //message SendAddRoomOne{ //required string openid = 1;//用户OPENID //required int32 RoomID=2;//房间号} /// <summary> /// /// </summary> /// <param name="i"></param> public void OnEnterRoomClick() { if (GameInfo.isScoketClose) { GameInfo.cs.Closed(); } GameInfo.cs.serverType = ServerType.ListServer; roomID = int.Parse(roomidStr); GameInfo.room_id = roomID; //2017.8.2添加劉磊 開始 GameInfo.operation = 2; //SendGameOperation sendGameOperation = SendGameOperation.CreateBuilder() // .SetOpenid(GameInfo.OpenID) // .SetUnionid(GameInfo.unionid) // .SetOperation(GameInfo.operation) // .SetRoomID(GameInfo.room_id.ToString()) // .Build(); //byte[] body = sendGameOperation.ToByteArray(); SendGameOperation sendGameOperation = new SendGameOperation(); sendGameOperation.openid = GameInfo.OpenID; sendGameOperation.unionid = GameInfo.unionid; sendGameOperation.Operation = GameInfo.operation; sendGameOperation.RoomID = GameInfo.room_id.ToString(); sendGameOperation.GroupID = (int)GameInfo.GroupID; byte[] body = ProtobufUtility.GetByteFromProtoBuf(sendGameOperation); byte[] data = CreateHead.CreateMessage(CreateHead.CSXYNUM + 1020, body.Length, 0, body); GameInfo.cs.Send(data); GameInfo.isScoketClose = true; DebugLog(body); //結束 }
/// <summary> /// 发送创建房间信息 /// </summary> public void OnCreatRoomClick() { if (GameInfo.isScoketClose) { GameInfo.cs.Closed(); } GameInfo.cs.serverType = ServerType.ListServer; GameInfo.room_peo = room_peo; GameInfo.gameCount = count; GameInfo.operation = 1; //SendGameOperation sendGameOperation = SendGameOperation.CreateBuilder() // .SetOpenid(GameInfo.OpenID) // .SetUnionid(GameInfo.unionid) // .SetOperation(GameInfo.operation) // .SetRoomID(GameInfo.room_id.ToString()) // .Build(); //byte[] body = sendGameOperation.ToByteArray(); SendGameOperation sendGameOperation = new SendGameOperation(); sendGameOperation.openid = GameInfo.OpenID; sendGameOperation.unionid = GameInfo.unionid; sendGameOperation.Operation = GameInfo.operation; sendGameOperation.RoomID = GameInfo.room_id.ToString(); sendGameOperation.GroupID = (int)GameInfo.GroupID; byte[] body = ProtobufUtility.GetByteFromProtoBuf(sendGameOperation); byte[] data = CreateHead.CreateMessage(CreateHead.CSXYNUM + 1020, body.Length, 0, body); GameInfo.cs.Send(data); GameInfo.isScoketClose = true; createRoomButton.enabled = false; }
/// <summary> /// 赋值每局信息 /// </summary> /// <param name="index"></param> public void InitFrameDetails(int index) { Newss_Pel_timeTxt = Info_FrameDetails.transform.Find("Time").GetComponent <Text>(); for (int i = 0; i < 4; i++) { Newss_Pel_headIge[i] = Info_FrameDetails.transform.Find("hard" + (i + 1) + "/head").GetComponent <Image>(); Newss_Pel_scoreTxt[i] = Info_FrameDetails.transform.Find("hard" + (i + 1) + "/score").GetComponent <Text>(); zhuang[i] = Info_FrameDetails.transform.Find("hard" + (i + 1) + "/zhuang").gameObject; } playbacks_Btn = Info_FrameDetails.transform.Find("playback_Btn").GetComponent <Button>(); Newss_Pel_timeTxt.text = index + 1 + "/" + GameOperationProcesss.Count; zhuang[GameOperationProcesss[index].gameOperationInfo[0].OperationFW - 1].SetActive(true); var jsInfo = ProtobufUtility.DeserializeProtobuf <ReturnJS>(GameOperationProcesss[index].JieSuanInfo); for (int i = 0; i < userRecords[keyTemp].recordUserInfo.Count; i++) { Newss_Pel_headIge[i].transform.parent.gameObject.SetActive(true); LoadImage.Instance.LoadPicture(userRecords[keyTemp].recordUserInfo[i].headimg, Newss_Pel_headIge[i]); Newss_Pel_scoreTxt[i].text = jsInfo.js[i].FS.ToString(); } var time = TimeToLong.ConvertIntDateTime(userRecords[keyTemp].CreateDate); timeTxt.text = time.Year + "-" + time.Month + "-" + time.Day + "\n" + time.Hour.ToString().PadLeft(2, '0') + ":" + time.Minute.ToString().PadLeft(2, '0'); rule.text = hall.RoomInfo(userRecords[keyTemp].RoomMsg); playbacks_Btn.onClick.AddListener(delegate { GamePlayback(GameOperationProcesss[index]); }); }
public static int UserHearbeat = 0;//记录心跳异常次数 /// <summary> /// 心跳包 /// </summary> /// <returns></returns> public static int Xintiao() { var hear = new MaintainHeartbeat(); hear.state = 1; hear.openid = GameInfo.OpenID; hear.userID = userID; hear.Latitude = GameInfo.Latitude; if (cs.serverType == ServerType.GameServer) { hear.RoomID = room_id.ToString(); } byte[] body = ProtobufUtility.GetByteFromProtoBuf(hear); byte[] data = CreateHead.CreateMessage(CreateHead.CSXYNUM + 1, body.Length, 0, body); try { GameInfo.cs.Send(data); UserHearbeat++; return(UserHearbeat); } catch (Exception ex) { UserHearbeat++; return(UserHearbeat); } }
void SendLobbyInfo(long groupID) { SendLobbyInfo sendLobbyInfo = new SendLobbyInfo(); sendLobbyInfo.GroupID = groupID; byte[] body = ProtobufUtility.GetByteFromProtoBuf(sendLobbyInfo); byte[] data = CreateHead.CreateMessage(CreateHead.CSXYNUM + 1080, body.Length, 0, body); GameInfo.cs.Send(data); }
private void DebugLog(byte[] body) { SendGameOperation ope = ProtobufUtility.DeserializeProtobuf <SendGameOperation>(body); Debug.Log("加入房间,游戏openid" + ope.openid); Debug.Log("加入房间,游戏unionid" + ope.unionid); Debug.Log("加入房间,游戏operation" + ope.Operation); Debug.Log("加入房间,游戏roomid" + ope.RoomID); }
void AddServer() { SendAddServer sendAddServer = new SendAddServer(); sendAddServer.openid = GameInfo.OpenID; sendAddServer.unionid = GameInfo.unionid; byte[] body = ProtobufUtility.GetByteFromProtoBuf(sendAddServer); byte[] data = CreateHead.CreateMessage(CreateHead.CSXYNUM + 1011, body.Length, 0, body); GameInfo.cs.Send(data); }
void SendQuitGroup() { SendQuitGroup sendQuitGroup = new SendQuitGroup(); sendQuitGroup.GroupID = (int)groupInfo.GroupID; sendQuitGroup.UserID = GameInfo.userID; byte[] body = ProtobufUtility.GetByteFromProtoBuf(sendQuitGroup); byte[] data = CreateHead.CreateMessage(CreateHead.CSXYNUM + 1090, body.Length, 0, body); GameInfo.cs.Send(data); }
/// <summary> /// 获取朋友圈信息 /// </summary> void SendGroupInfo() { SendGroupInfo sendGroupInfo = new SendGroupInfo(); sendGroupInfo.openid = GameInfo.OpenID; sendGroupInfo.unionid = GameInfo.unionid; byte[] body = ProtobufUtility.GetByteFromProtoBuf(sendGroupInfo); byte[] data = CreateHead.CreateMessage(CreateHead.CSXYNUM + 1030, body.Length, 0, body); GameInfo.cs.Send(data); }
/// <summary> /// 根据牌桌信息ID请求牌局信息 /// </summary> public void OnSendGetUserGamePlayback(string str) { Newss_Pel.SetActive(true); keyTemp = str; SendGetUserGamePlayback sendGetUserGamePlayback = new SendGetUserGamePlayback(); sendGetUserGamePlayback.RoomInfoID = str; byte[] body = ProtobufUtility.GetByteFromProtoBuf(sendGetUserGamePlayback); byte[] data = CreateHead.CreateMessage(CreateHead.CSXYNUM + 9003, body.Length, 0, body); GameInfo.cs.Send(data); }
/// <summary> /// 发送请求开始游戏 /// </summary> public void SendStart() { ddzSendStart sendStart = new ddzSendStart(); sendStart.roomid = DDZData.room_id; sendStart.openid = GameInfo.OpenID; sendStart.UserID = GameInfo.userID; byte[] body = ProtobufUtility.GetByteFromProtoBuf(sendStart); byte[] data = CreateHead.CreateMessage(CreateHead.CSXYNUMD + 2007, body.Length, 0, body); GameInfo.cs.Send(data); }
/// <summary> /// 发送加入房间 /// </summary> /// <param name="roomId">房间ID</param> public void SendAddRoom(int roomId) { ddzSendAddRoom sendAddRoom = new ddzSendAddRoom(); sendAddRoom.roomID = roomId; sendAddRoom.openid = GameInfo.OpenID; sendAddRoom.Latitude = GameInfo.Latitude; byte[] body = ProtobufUtility.GetByteFromProtoBuf(sendAddRoom); byte[] data = CreateHead.CreateMessage(CreateHead.CSXYNUMD + 2003, body.Length, 0, body); GameInfo.cs.Send(data); }
/// <summary> /// 请求加入圈子 /// </summary> void SendApplyToJoin(int groupID) { SendApplyToJoin sendApplyToJoin = new SendApplyToJoin(); sendApplyToJoin.GroupID = groupID; sendApplyToJoin.openid = GameInfo.OpenID; sendApplyToJoin.unionid = GameInfo.unionid; byte[] body = ProtobufUtility.GetByteFromProtoBuf(sendApplyToJoin); byte[] data = CreateHead.CreateMessage(CreateHead.CSXYNUM + 1040, body.Length, 0, body); GameInfo.cs.Send(data); }
void SendGetRoomCard() { SendGetRoomCard sendGetRoomCard = new SendGetRoomCard(); sendGetRoomCard.UserID = GameInfo.userID; sendGetRoomCard.openid = GameInfo.OpenID; sendGetRoomCard.unionid = GameInfo.unionid; byte[] body = ProtobufUtility.GetByteFromProtoBuf(sendGetRoomCard); byte[] data = CreateHead.CreateMessage(CreateHead.CSXYNUM + 1022, body.Length, 0, body); GameInfo.cs.Send(data); }
/// <summary> /// 查看申请记录 /// </summary> void SendApplyRecord(long groupID = 0) { record = groupID == 0 ? false : true; SendApplyRecord sendApplyRecord = new SendApplyRecord(); sendApplyRecord.UserID = (int)GameInfo.userID; sendApplyRecord.GroupID = groupID; byte[] body = ProtobufUtility.GetByteFromProtoBuf(sendApplyRecord); byte[] data = CreateHead.CreateMessage(CreateHead.CSXYNUM + 1060, body.Length, 0, body); GameInfo.cs.Send(data); }
/// <summary> /// 发送出牌信息 /// </summary> /// <param name="cardsStr">//牌ID集合 中间以,分隔 比如 103,104,105 不传为过牌</param> public void SendOutCard(string cardsStr) { ddzSendOutCard sendOutCard = new ddzSendOutCard(); sendOutCard.openid = GameInfo.OpenID; sendOutCard.UserID = GameInfo.userID; sendOutCard.FW = DDZData.fw; sendOutCard.cardsStr = cardsStr; byte[] body = ProtobufUtility.GetByteFromProtoBuf(sendOutCard); byte[] data = CreateHead.CreateMessage(CreateHead.CSXYNUMD + 2011, body.Length, 0, body); GameInfo.cs.Send(data); }
public void ReconServer() { GameInfo.cs.Closed(); SendAddServer sendAddServer = new SendAddServer(); sendAddServer.openid = GameInfo.OpenID; sendAddServer.unionid = GameInfo.unionid; byte[] body = ProtobufUtility.GetByteFromProtoBuf(sendAddServer); byte[] data = CreateHead.CreateMessage(CreateHead.CSXYNUM + 1011, body.Length, 0, body); GameInfo.cs.Send(data); ficSGame.isRecon = true; }
private void DDZNew(int news, byte[] body) { switch (news) { case CreateHead.CSXYNUMD + 2002: DDZData.returnCreateRoom = ProtobufUtility.DeserializeProtobuf <ddzReturnCreateRoom>(body); Debug.Log("22002:" + DDZData.returnCreateRoom); OutLog.log("22002:服务端返回房间信息"); break; case CreateHead.CSXYNUMD + 2004: DDZData.returnAddRoom = ProtobufUtility.DeserializeProtobuf <ddzReturnAddRoom>(body); Debug.Log("22004:" + DDZData.returnAddRoom); OutLog.log("22004:服务端返回加入信息"); break; case CreateHead.CSXYNUMD + 2005: DDZData.returnUserInfo = ProtobufUtility.DeserializeProtobuf <ddzReturnUserInfo>(body); Debug.Log("22005:" + DDZData.returnUserInfo); OutLog.log("22005:服务端主动推送加入玩家信息"); break; case CreateHead.CSXYNUMD + 2006: DDZData.returnStartGame = ProtobufUtility.DeserializeProtobuf <ddzReturnStartGame>(body); Debug.Log("22006:" + DDZData.returnStartGame); OutLog.log("22006:服务端返回主动推送游戏开始信息"); break; case CreateHead.CSXYNUMD + 2008: DDZData.returnStart = ProtobufUtility.DeserializeProtobuf <ddzReturnStart>(body); Debug.Log("22008:" + DDZData.returnStart); OutLog.log("22008:开始游戏"); break; case CreateHead.CSXYNUMD + 2010: DDZData.returnCallLandlord = ProtobufUtility.DeserializeProtobuf <ddzReturnCallLandlord>(body); Debug.Log("22010:" + DDZData.returnCallLandlord); OutLog.log("22010:服务器广播叫地主信息"); break; case CreateHead.CSXYNUMD + 2013: DDZData.returnOutCard = ProtobufUtility.DeserializeProtobuf <ddzReturnOutCard>(body); Debug.Log("22013:" + DDZData.returnOutCard); OutLog.log("22013:出牌返回信息"); break; case CreateHead.CSXYNUMD + 2014: DDZData.returnOutCardAll = ProtobufUtility.DeserializeProtobuf <ddzReturnOutCardAll>(body); Debug.Log("22014:" + DDZData.returnOutCardAll); OutLog.log("22014:广播出牌信息"); break; } }
/// <summary> /// 发送申请状态 /// </summary> /// <param name="status">申请状态,0申请中,1申请通过,2申请拒绝</param> void SendChangeApplyStatus(int status, long userID) { SendChangeApplyStatus sendChangeApplyStatus = new SendChangeApplyStatus(); sendChangeApplyStatus.UserID = userID; sendChangeApplyStatus.GroupID = groupID; sendChangeApplyStatus.ApplyStatus = status; sendChangeApplyStatus.OperationUserID = GameInfo.userID; byte[] body = ProtobufUtility.GetByteFromProtoBuf(sendChangeApplyStatus); byte[] data = CreateHead.CreateMessage(CreateHead.CSXYNUM + 1070, body.Length, 0, body); GameInfo.cs.Send(data); }
void SendGroupUserInfoByGroupID() { SendGroupUserInfoByGroupID sendGroupUserInfoByGroupID = new SendGroupUserInfoByGroupID(); sendGroupUserInfoByGroupID.openid = GameInfo.OpenID; sendGroupUserInfoByGroupID.GroupID = (int)groupInfo.GroupID; sendGroupUserInfoByGroupID.unionid = GameInfo.unionid; Debug.Log(groupInfo.GroupID); byte[] body = ProtobufUtility.GetByteFromProtoBuf(sendGroupUserInfoByGroupID); byte[] data = CreateHead.CreateMessage(CreateHead.CSXYNUM + 1034, body.Length, 0, body); GameInfo.cs.Send(data); }
/// <summary> /// 发送叫地主 /// </summary> /// <param name="type">叫牌类型</param> /// <param name="value">叫牌值</param> public void SendCallLandlord(int type, int value) { ddzSendCallLandlord sendCallLandlord = new ddzSendCallLandlord(); sendCallLandlord.FW = DDZData.fw; sendCallLandlord.openid = GameInfo.OpenID; sendCallLandlord.UserID = GameInfo.userID; sendCallLandlord.CallType = type; sendCallLandlord.value = value; byte[] body = ProtobufUtility.GetByteFromProtoBuf(sendCallLandlord); byte[] data = CreateHead.CreateMessage(CreateHead.CSXYNUMD + 2009, body.Length, 0, body); GameInfo.cs.Send(data); }
private void Deseriliz(byte[] body) { SendLogin login = ProtobufUtility.DeserializeProtobuf <SendLogin>(body); Debug.Log("login.city" + login.city); Debug.Log("login.headimg" + login.headimg); Debug.Log("login.Latitude" + login.Latitude); Debug.Log("login.nickname" + login.nickname); Debug.Log("login.openid" + login.openid); Debug.Log("login.province" + login.province); Debug.Log("login.sex" + login.sex); Debug.Log("login.unionid" + login.unionid); }
/// <summary> /// 发送播放选择的快捷语音 /// </summary> public void SendQuickVoice(int voiceNum) { SendVoice sencGameOperation = new SendVoice(); sencGameOperation.openid = GameInfo.OpenID; sencGameOperation.RoomID = GameInfo.room_id; sencGameOperation.VoiceNumber = voiceNum; byte[] body = ProtobufUtility.GetByteFromProtoBuf(sencGameOperation); byte[] data = CreateHead.CreateMessage(CreateHead.CSXYNUM + 8002, body.Length, 0, body); Debug.Log(data); GameInfo.cs.Send(data); GameInfo.isScoketClose = true; }
/// <summary> /// 请求获取玩家战绩 /// </summary> public void OnSendGetUserRecord() { News_Pel.SetActive(true); SendGetUserRecord sendGetUserRecord = new SendGetUserRecord(); sendGetUserRecord.UserID = GameInfo.userID; sendGetUserRecord.openid = GameInfo.OpenID; sendGetUserRecord.unionid = GameInfo.unionid; Debug.Log("请求战绩"); byte[] body = ProtobufUtility.GetByteFromProtoBuf(sendGetUserRecord); byte[] data = CreateHead.CreateMessage(CreateHead.CSXYNUM + 9001, body.Length, 0, body); GameInfo.cs.Send(data); }
void SendQueYiMenMessage(GameInfo.QueType queType) { //发送缺一门消息给服务器 //var qym = SendQYM.CreateBuilder().SetType((int)queType).SetOpenid(GameInfo.OpenID).Build(); //byte[] body = qym.ToByteArray(); var qym = new SendQYM(); qym.type = (int)queType; qym.openid = GameInfo.OpenID; byte[] body = ProtobufUtility.GetByteFromProtoBuf(qym); byte[] data = CreateHead.CreateMessage(CreateHead.CSXYNUM + 5011, body.Length, 0, body); GameInfo.cs.Send(data); }
/// <summary> /// 请求获取圈子玩家战绩 /// </summary> public void SendGetUserRecord() { GameInfo.isPYQExploits = true; SendGetUserRecord sendGetUserRecord = new SendGetUserRecord(); sendGetUserRecord.UserID = GameInfo.userID; sendGetUserRecord.openid = GameInfo.OpenID; sendGetUserRecord.unionid = GameInfo.unionid; sendGetUserRecord.GroupID = (int)groupInfo.GroupID; Debug.Log("请求圈子战绩" + groupInfo.GroupID); byte[] body = ProtobufUtility.GetByteFromProtoBuf(sendGetUserRecord); byte[] data = CreateHead.CreateMessage(CreateHead.CSXYNUM + 9001, body.Length, 0, body); GameInfo.cs.Send(data); }
/// <summary> /// 发送创建房间 /// </summary> public void SendDZCreateRoom() { ddzSendDZCreateRoom sendDZCreateRoom = new ddzSendDZCreateRoom(); sendDZCreateRoom.openid = GameInfo.OpenID; sendDZCreateRoom.roomNumber = DDZData.roomInfo.inningNum; sendDZCreateRoom.roomtype = DDZData.roomInfo.playType; sendDZCreateRoom.multiple = DDZData.roomInfo.multiple; sendDZCreateRoom.Latitude = GameInfo.Latitude; sendDZCreateRoom.GroupID = (int)GameInfo.GroupID; byte[] body = ProtobufUtility.GetByteFromProtoBuf(sendDZCreateRoom); byte[] data = CreateHead.CreateMessage(CreateHead.CSXYNUMD + 2001, body.Length, 0, body); GameInfo.cs.Send(data); }