public void StandUp() { CMD_GR_UserStandUp standUp = new CMD_GR_UserStandUp(); standUp.wTableID = (ushort)GlobalDataScript.Instance.myGameRoomInfo.tableId; standUp.wChairID = (ushort)GlobalDataScript.Instance.myGameRoomInfo.chairId; SocketEngine.Instance.SendScoketData((int)GameServer.MDM_GR_USER, (int)MDM_GR_USER.SUB_GR_USER_STANDUP, NetUtil.StructToBytes(standUp), Marshal.SizeOf(standUp)); MySceneManager.instance.BackToMain(); GlobalDataScript.Instance.ClearGameInfo(); }
public void SendUserUp(ushort table, ushort chair, bool force) { var standup = new CMD_GR_UserStandUp(); standup.wTableID = table; standup.wChairID = chair; standup.cbForceLeave = (byte)(force ? 1 : 0); byte[] dataBuffer = GameConvert.StructToByteArray(standup); GameApp.Network.SendToSvr(ConnectionID.Game, MainCommand.MDM_GR_USER, SubCommand.SUB_GR_USER_STANDUP, 0, dataBuffer); }
//麻将 public void SendStandUpPacket(int wTableID, int wChairID, byte cbForceLeave = 0) { CMD_GR_UserStandUp UserStandUp = new CMD_GR_UserStandUp { //构造数据 wTableID = (ushort)wTableID, wChairID = (ushort)wChairID, cbForceLeave = cbForceLeave }; //发送数据 SendData((int)GameServer.MDM_GR_USER, (int)MDM_GR_USER.SUB_GR_USER_STANDUP, NetUtil.StructToBytes(UserStandUp), Marshal.SizeOf(UserStandUp)); }