diff --git a/AxibugEmuOnline.Server/Manager/RoomManager.cs b/AxibugEmuOnline.Server/Manager/RoomManager.cs index 9719573..bb9cea9 100644 --- a/AxibugEmuOnline.Server/Manager/RoomManager.cs +++ b/AxibugEmuOnline.Server/Manager/RoomManager.cs @@ -2,10 +2,9 @@ using AxibugEmuOnline.Server.Manager; using AxibugEmuOnline.Server.NetWork; using AxibugProtobuf; -using System; using System.Net.Sockets; using System.Runtime.InteropServices; -using System.Xml; +using static System.Runtime.CompilerServices.RuntimeHelpers; namespace AxibugEmuOnline.Server { @@ -24,8 +23,9 @@ namespace AxibugEmuOnline.Server NetMsg.Instance.RegNetMsgEvent((int)CommandID.CmdRoomCreate, OnCmdRoomCreate); NetMsg.Instance.RegNetMsgEvent((int)CommandID.CmdRoomJoin, OnCmdRoomJoin); NetMsg.Instance.RegNetMsgEvent((int)CommandID.CmdRoomLeave, OnCmdRoomLeave); + NetMsg.Instance.RegNetMsgEvent((int)CommandID.CmdRoomHostPlayerUpdateStateRaw, OnHostPlayerUpdateStateRaw); + NetMsg.Instance.RegNetMsgEvent((int)CommandID.CmdRoomPlayerReady, OnRoomPlayerReady); NetMsg.Instance.RegNetMsgEvent((int)CommandID.CmdRoomSingelPlayerInput, OnSingelPlayerInput); - roomTickARE = AppSrv.g_Tick.AddNewARE(TickManager.TickType.Interval_16MS); threadRoomTick = new Thread(UpdateLoopTick); threadRoomTick.Start(); @@ -92,7 +92,6 @@ namespace AxibugEmuOnline.Server RoomID = room.RoomID, GameRomHash = room.RomHash, GameState = room.GameState, - PlayerState = room.PlayerState, ObsUserCount = 0,//TODO Player1UID = room.Player1_UID, Player2UID = room.Player2_UID, @@ -145,26 +144,22 @@ namespace AxibugEmuOnline.Server AppSrv.g_Log.Debug($"OnCmdRoomCreate "); ClientInfo _c = AppSrv.g_ClientMgr.GetClientForSocket(sk); Protobuf_Room_Create msg = ProtoBufHelper.DeSerizlize(reqData); + Protobuf_Room_Create_RESP resp = new Protobuf_Room_Create_RESP(); Data_RoomData newRoom = new Data_RoomData(); newRoom.Init(GetNewRoomID(), msg.GameRomID, msg.GameRomHash); AddRoom(newRoom); - - + ErrorCode joinErrcode = ErrorCode.ErrorOk; //加入 - if (!Join(newRoom.GameRomID, 0, _c, out ErrorCode joinErrcode)) + if (newRoom.Join(msg.JoinPlayerIdx, _c, out joinErrcode, out bool bHadRoomStateChange)) { - AppSrv.g_ClientMgr.ClientSend(_c, (int)CommandID.CmdRoomCreate, (int)joinErrcode, new byte[1]); - return; + //创建成功下行 + resp.RoomMiniInfo = GetProtoDataRoom(newRoom); } + AppSrv.g_ClientMgr.ClientSend(_c, (int)CommandID.CmdRoomCreate, (int)joinErrcode, ProtoBufHelper.Serizlize(resp)); - //创建成功下行 - Protobuf_Room_Create_RESP resp = new Protobuf_Room_Create_RESP() - { - RoomMiniInfo = GetProtoDataRoom(newRoom) - }; - AppSrv.g_ClientMgr.ClientSend(_c, (int)CommandID.CmdRoomCreate, (int)ErrorCode.ErrorOk, ProtoBufHelper.Serizlize(resp)); - + if (joinErrcode == ErrorCode.ErrorOk && bHadRoomStateChange) + SendRoomStateChange(newRoom); } public void OnCmdRoomJoin(Socket sk, byte[] reqData) @@ -172,47 +167,87 @@ namespace AxibugEmuOnline.Server AppSrv.g_Log.Debug($"OnCmdRoomJoin "); ClientInfo _c = AppSrv.g_ClientMgr.GetClientForSocket(sk); Protobuf_Room_Join msg = ProtoBufHelper.DeSerizlize(reqData); - - //加入 - if (!Join(msg.RoomID, msg.PlayerNum, _c, out ErrorCode joinErrcode)) + Protobuf_Room_Create_RESP resp = new Protobuf_Room_Create_RESP(); + ErrorCode joinErrcode; + Data_RoomData room = GetRoomData(_c.RoomState.RoomID); + bool bHadRoomStateChange = false; + if (room == null) + joinErrcode = ErrorCode.ErrorRoomNotFound; + else { - AppSrv.g_ClientMgr.ClientSend(_c, (int)CommandID.CmdRoomJoin, (int)joinErrcode, new byte[1]); - return; + //加入 + if (room.Join(msg.PlayerNum, _c, out joinErrcode, out bHadRoomStateChange)) + { + Data_RoomData roomData = GetRoomData(msg.RoomID); + resp.RoomMiniInfo = GetProtoDataRoom(roomData); + } } - Data_RoomData roomData = GetRoomData(msg.RoomID); - - //创建成功下行 - Protobuf_Room_Join_RESP resp = new Protobuf_Room_Join_RESP() - { - RoomMiniInfo = GetProtoDataRoom(roomData) - }; - - AppSrv.g_ClientMgr.ClientSend(_c, (int)CommandID.CmdRoomJoin, (int)ErrorCode.ErrorOk, ProtoBufHelper.Serizlize(resp)); + AppSrv.g_ClientMgr.ClientSend(_c, (int)CommandID.CmdRoomJoin, (int)joinErrcode, ProtoBufHelper.Serizlize(resp)); Protobuf_Room_MyRoom_State_Change(msg.RoomID); + + if (joinErrcode == ErrorCode.ErrorOk && bHadRoomStateChange) + SendRoomStateChange(room); } public void OnCmdRoomLeave(Socket sk, byte[] reqData) { AppSrv.g_Log.Debug($"OnCmdRoomJoin "); ClientInfo _c = AppSrv.g_ClientMgr.GetClientForSocket(sk); Protobuf_Room_Leave msg = ProtoBufHelper.DeSerizlize(reqData); - - //加入 - if (!Leave(msg.RoomID, _c, out ErrorCode joinErrcode)) - { - AppSrv.g_ClientMgr.ClientSend(_c, (int)CommandID.CmdRoomLeave, (int)joinErrcode, new byte[1]); - return; + Protobuf_Room_Leave_RESP resp = new Protobuf_Room_Leave_RESP(); + ErrorCode errcode; + Data_RoomData room = GetRoomData(_c.RoomState.RoomID); + bool bHadRoomStateChange = false; + if (room == null) + errcode = ErrorCode.ErrorRoomNotFound; + else + { + if (room.Leave(_c, out errcode, out bHadRoomStateChange)) + { + resp.RoomID = msg.RoomID; + } } - - //创建成功下行 - Protobuf_Room_Leave_RESP resp = new Protobuf_Room_Leave_RESP() - { - RoomID = msg.RoomID, - }; - - AppSrv.g_ClientMgr.ClientSend(_c, (int)CommandID.CmdRoomLeave, (int)ErrorCode.ErrorOk, ProtoBufHelper.Serizlize(resp)); + AppSrv.g_ClientMgr.ClientSend(_c, (int)CommandID.CmdRoomLeave, (int)errcode, ProtoBufHelper.Serizlize(resp)); Protobuf_Room_MyRoom_State_Change(msg.RoomID); + + if (errcode == ErrorCode.ErrorOk && bHadRoomStateChange) + SendRoomStateChange(room); } + + public void OnHostPlayerUpdateStateRaw(Socket sk, byte[] reqData) + { + ClientInfo _c = AppSrv.g_ClientMgr.GetClientForSocket(sk); + Protobuf_Room_HostPlayer_UpdateStateRaw msg = ProtoBufHelper.DeSerizlize(reqData); + Protobuf_Room_HostPlayer_UpdateStateRaw_RESP resp = new Protobuf_Room_HostPlayer_UpdateStateRaw_RESP(); + ErrorCode errcode = ErrorCode.ErrorOk; + Data_RoomData room = GetRoomData(_c.RoomState.RoomID); + if (room == null) + errcode = ErrorCode.ErrorRoomNotFound; + else if (room.GameState != RoomGameState.WaitRawUpdate) + errcode = ErrorCode.ErrorRoomCantDoCurrState; + + AppSrv.g_ClientMgr.ClientSend(_c, (int)CommandID.CmdRoomHostPlayerUpdateStateRaw, (int)errcode, ProtoBufHelper.Serizlize(resp)); + + if (errcode == ErrorCode.ErrorOk) + { + room.SetLoadRaw(msg.LoadStateRaw, out bool bHadRoomStateChange); + + if (bHadRoomStateChange) + SendRoomStateChange(room); + } + } + + public void OnRoomPlayerReady(Socket sk, byte[] reqData) + { + ClientInfo _c = AppSrv.g_ClientMgr.GetClientForSocket(sk); + Protobuf_Room_Player_Ready msg = ProtoBufHelper.DeSerizlize(reqData); + ErrorCode errcode = ErrorCode.ErrorOk; + Data_RoomData room = GetRoomData(_c.RoomState.RoomID); + if (room == null) + return; + + } + public void OnSingelPlayerInput(Socket sk, byte[] reqData) { ClientInfo _c = AppSrv.g_ClientMgr.GetClientForSocket(sk); @@ -247,84 +282,42 @@ namespace AxibugEmuOnline.Server } } - #region 房间内逻辑 - /// - /// 进入房间 - /// - /// - /// - /// - /// - /// - bool Join(int RoomID, int PlayerNum, ClientInfo _c, out ErrorCode errcode) + public void SendRoomStateChange(Data_RoomData room) { - Data_RoomData room = GetRoomData(RoomID); - if (room == null) + List roomClient = room.GetAllPlayerClientList(); + switch (room.GameState) { - errcode = ErrorCode.ErrorRoomNotFound; - return false; + case RoomGameState.WaitRawUpdate: + { + Protobuf_Room_WaitStep_RESP resp = new Protobuf_Room_WaitStep_RESP() + { + WaitStep = 0 + }; + AppSrv.g_ClientMgr.ClientSend(roomClient, (int)CommandID.CmdRoomWaitStep, (int)ErrorCode.ErrorOk, ProtoBufHelper.Serizlize(resp)); + } + break; + case RoomGameState.WaitReady: + { + Protobuf_Room_WaitStep_RESP resp = new Protobuf_Room_WaitStep_RESP() + { + WaitStep = 1, + LoadStateRaw = room.NextStateRaw + }; + AppSrv.g_ClientMgr.ClientSend(roomClient, (int)CommandID.CmdRoomWaitStep, (int)ErrorCode.ErrorOk, ProtoBufHelper.Serizlize(resp)); + } + break; + case RoomGameState.InOnlineGame: + { + Protobuf_Room_WaitStep_RESP resp = new Protobuf_Room_WaitStep_RESP() + { + WaitStep = 2, + }; + AppSrv.g_ClientMgr.ClientSend(roomClient, (int)CommandID.CmdRoomWaitStep, (int)ErrorCode.ErrorOk, ProtoBufHelper.Serizlize(resp)); + } + break; } - //玩家1 - if (PlayerNum == 0) - { - if (room.PlayerState != RoomPlayerState.NonePlayerState) - { - errcode = ErrorCode.ErrorRoomSlotReadlyHadPlayer; - return false; - } - room.SetPlayerUID(0,_c); - } - //其他玩家 - else - { - if (room.PlayerState != RoomPlayerState.OnlyP1) - { - errcode = ErrorCode.ErrorRoomSlotReadlyHadPlayer; - return false; - } - room.SetPlayerUID(1, _c); - } - - //广播房间 - SendRoomUpdateToAll(RoomID, 0); - errcode = ErrorCode.ErrorOk; - return true; } - /// - /// 离开房间 - /// - /// - /// - /// - /// - bool Leave(int RoomID, ClientInfo _c, out ErrorCode errcode) - { - Data_RoomData room = GetRoomData(RoomID); - if (room == null) - { - errcode = ErrorCode.ErrorRoomNotFound; - return false; - } - - room.RemovePlayer(_c); - - if (room.PlayerState == RoomPlayerState.NonePlayerState) - { - SendRoomUpdateToAll(RoomID, 1); - RemoveRoom(RoomID); - } - else - { - //广播房间变化 - SendRoomUpdateToAll(RoomID, 0); - } - errcode = ErrorCode.ErrorOk; - return true; - } - #endregion - - #region 房间帧循环 void UpdateLoopTick() { @@ -341,7 +334,7 @@ namespace AxibugEmuOnline.Server int roomid = mKeyRoomList[i]; if (!mDictRoom.TryGetValue(roomid,out Data_RoomData room)) continue; - if (room.GameState > RoomGameState.InGame) + if (room.GameState < RoomGameState.InOnlineGame) continue; //更新帧 room.TakeFrame(); @@ -357,22 +350,59 @@ namespace AxibugEmuOnline.Server public int RoomID { get; private set; } public int GameRomID { get; private set; } public string RomHash { get; private set; } - public bool bNeedLoadState { get; private set; } - public int LoadStateFrame { get; private set; } - public Google.Protobuf.ByteString LoadStateRaw { get; set; } public long Player1_UID { get; private set; } public long Player2_UID { get; private set; } public long Player3_UID { get; private set; } public long Player4_UID { get; private set; } + public Google.Protobuf.ByteString? NextStateRaw { get; private set; } public bool[] PlayerReadyState { get; private set; } + public List SynUIDs; - public RoomPlayerState PlayerState => getPlayerState(); - public RoomGameState GameState; + //public RoomPlayerState PlayerState => getPlayerState(); + private RoomGameState mGameState; public uint mCurrFrameId = 0; public ServerInputSnapShot mCurrInputData; public Queue<(uint, ServerInputSnapShot)> mInputQueue; //TODO public Dictionary> mDictPlayerIdx2SendQueue; + public RoomGameState GameState + { + get { return mGameState; } + set + { + if (mGameState != value) + { + mGameState = value; + switch (value) + { + case RoomGameState.WaitRawUpdate: + NextStateRaw = null; + break; + case RoomGameState.WaitReady: + Array.Fill(PlayerReadyState, false); + break; + } + } + } + } + + bool IsAllReady() + { + bool Ready = true; + if ( + (Player1_UID > 0 && !PlayerReadyState[0]) + || + (Player2_UID > 0 && !PlayerReadyState[1]) + || + (Player3_UID > 0 && !PlayerReadyState[2]) + || + (Player4_UID > 0 && !PlayerReadyState[3]) + ) + { + Ready = false; + } + return Ready; + } public void Init(int roomID, int gameRomID, string roomHash, bool bloadState = false) { @@ -383,10 +413,12 @@ namespace AxibugEmuOnline.Server Player2_UID = -1; Player3_UID = -1; Player4_UID = -1; + PlayerReadyState = new bool[4]; SynUIDs = new List();//广播角色列表 GameState = RoomGameState.NoneGameState; mCurrInputData = new ServerInputSnapShot(); mInputQueue = new Queue<(uint, ServerInputSnapShot)>(); + mDictPlayerIdx2SendQueue = new Dictionary>(); } public void SetPlayerUID(int PlayerIdx,ClientInfo _c) @@ -427,18 +459,28 @@ namespace AxibugEmuOnline.Server return -1; } - RoomPlayerState getPlayerState() + public bool GetPlayerUIDByIdx(int Idx, out long UID) { - if (Player1_UID < 0 && Player2_UID < 0) - return RoomPlayerState.NonePlayerState; + UID = -1; + switch (Idx) + { + case 0: UID = Player1_UID; break; + case 1: UID = Player2_UID; break; + case 2: UID = Player3_UID; break; + case 3: UID = Player4_UID; break; + } + return UID != 0; + } + public bool GetPlayerClientByIdx(int Idx, out ClientInfo _c) + { + _c = null; + if (!GetPlayerUIDByIdx(Idx, out long UID)) + return false; - if (Player1_UID < 0) - return RoomPlayerState.OnlyP2; + if (!AppSrv.g_ClientMgr.GetClientByUID(UID, out _c)) + return false; - if (Player2_UID < 0) - return RoomPlayerState.OnlyP1; - - return RoomPlayerState.BothOnline; + return true; } public List GetAllPlayerUIDs() @@ -488,6 +530,38 @@ namespace AxibugEmuOnline.Server } } + public int GetPlayerCount() + { + int count = 0; + if (Player1_UID > 0) count++; + if (Player2_UID > 0) count++; + if (Player3_UID > 0) count++; + if (Player4_UID > 0) count++; + return count; + } + + void StartNewTick() + { + mInputQueue.Clear(); + mDictPlayerIdx2SendQueue.Clear(); + + List playerlist = GetAllPlayerClientList(); + double maxNetDelay = 0; + for (int i = 0; i < playerlist.Count; i++) + { + ClientInfo player = playerlist[i]; + maxNetDelay = Math.Max(maxNetDelay, player.NetDelay); + } + mCurrFrameId = 0; + + int TaskFrameCount = (int)((maxNetDelay / 0.016f) + 5f); + + for (int i = 0; i < TaskFrameCount; i++) + { + TakeFrame(); + } + } + public void TakeFrame() { mInputQueue.Enqueue((mCurrFrameId, mCurrInputData)); @@ -502,14 +576,143 @@ namespace AxibugEmuOnline.Server while (mInputQueue.Count > 0) { (uint frameId, ServerInputSnapShot inputdata) data = mInputQueue.Dequeue(); - Protobuf_Room_Syn_RoomFrameAllInput resp = new Protobuf_Room_Syn_RoomFrameAllInput() + Protobuf_Room_Syn_RoomFrameAllInputData resp = new Protobuf_Room_Syn_RoomFrameAllInputData() { FrameID = data.frameId, InputData = data.inputdata.all }; - AppSrv.g_ClientMgr.ClientSendALL((int)CommandID.CmdRoomSyn, (int)ErrorCode.ErrorOk, ProtoBufHelper.Serizlize(resp)); + AppSrv.g_ClientMgr.ClientSend(SynUIDs,(int)CommandID.CmdRoomSynPlayerInput, (int)ErrorCode.ErrorOk, ProtoBufHelper.Serizlize(resp)); } } + + + #region 房间进出 + /// + /// 进入房间 + /// + /// + /// + /// + /// + /// + public bool Join(int PlayerNum, ClientInfo _c, out ErrorCode errcode,out bool bHadRoomStateChange) + { + bHadRoomStateChange = false; + int oldPlayerCount = GetPlayerCount(); + if (GetPlayerUIDByIdx(PlayerNum, out long hadUID)) + { + errcode = ErrorCode.ErrorRoomSlotReadlyHadPlayer; + return false; + } + SetPlayerUID(PlayerNum, _c); + int newPlayerCount = GetPlayerCount(); + errcode = ErrorCode.ErrorOk; + + bHadRoomStateChange = CheckRoomStateChange(oldPlayerCount, newPlayerCount); + return true; + } + + /// + /// 离开房间 + /// + /// + /// + /// + /// + public bool Leave(ClientInfo _c, out ErrorCode errcode, out bool bHadRoomStateChange) + { + int oldPlayerCount = GetPlayerCount(); + RemovePlayer(_c); + int newPlayerCount = GetPlayerCount(); + errcode = ErrorCode.ErrorOk; + bHadRoomStateChange = CheckRoomStateChange(oldPlayerCount, newPlayerCount); + return true; + } + #endregion + + bool CheckRoomStateChange(int oldPlayerCount, int newPlayerCount) + { + bool bChanged = false; + bool bNewToOnlyHost = (oldPlayerCount != 1 && newPlayerCount == 1); + bool bMorePlayer = (oldPlayerCount < 2 && newPlayerCount >= 2) || (newPlayerCount > oldPlayerCount); + switch (this.GameState) + { + case RoomGameState.NoneGameState: + if (bNewToOnlyHost) + { + this.GameState = RoomGameState.OnlyHost; + bChanged = true; + } + break; + case RoomGameState.OnlyHost: + if (bMorePlayer)//加入更多玩家 + { + this.GameState = RoomGameState.WaitRawUpdate; + bChanged = true; + break; + } + break; + case RoomGameState.WaitRawUpdate: + if (bMorePlayer)//加入更多玩家 + { + this.GameState = RoomGameState.WaitRawUpdate; + bChanged = true; + break; + } + if (NextStateRaw != null)//已经上传即时存档 + { + this.GameState = RoomGameState.WaitReady; + bChanged = true; + break; + } + break; + case RoomGameState.WaitReady: + if (bMorePlayer)//加入更多玩家 + { + this.GameState = RoomGameState.WaitRawUpdate; + bChanged = true; + break; + } + //没有为准备的 + bool bAllReady = IsAllReady(); + if (bAllReady) + { + //新开Tick + StartNewTick(); + + this.GameState = RoomGameState.InOnlineGame; + bChanged = true; + break; + } + break; + case RoomGameState.Pause: + if (bMorePlayer)//加入更多玩家 + { + this.GameState = RoomGameState.WaitRawUpdate; + bChanged = true; + break; + } + break; + case RoomGameState.InOnlineGame: + if (bMorePlayer)//加入更多玩家 + { + this.GameState = RoomGameState.WaitRawUpdate; + //TODO 服务器Tick提前跑帧 + bChanged = true; + break; + } + break; + } + return bChanged; + } + + public void SetLoadRaw(Google.Protobuf.ByteString NextStateRaw, out bool bHadRoomStateChange) + { + int oldPlayerCount = GetPlayerCount(); + this.NextStateRaw = NextStateRaw; + int newPlayerCount = GetPlayerCount(); + bHadRoomStateChange = CheckRoomStateChange(oldPlayerCount, newPlayerCount); + } } [StructLayout(LayoutKind.Explicit)] diff --git a/AxibugEmuOnline.Server/Protobuf/ProtobufAxibugEmuOnline.cs b/AxibugEmuOnline.Server/Protobuf/ProtobufAxibugEmuOnline.cs index 3bdffac..f7e1fc1 100644 --- a/AxibugEmuOnline.Server/Protobuf/ProtobufAxibugEmuOnline.cs +++ b/AxibugEmuOnline.Server/Protobuf/ProtobufAxibugEmuOnline.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= pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, - new pbr::GeneratedClrTypeInfo(new[] {typeof(global::AxibugProtobuf.CommandID), typeof(global::AxibugProtobuf.ErrorCode), typeof(global::AxibugProtobuf.LoginType), typeof(global::AxibugProtobuf.DeviceType), typeof(global::AxibugProtobuf.RoomPlayerState), typeof(global::AxibugProtobuf.RoomGameState), typeof(global::AxibugProtobuf.LoginResultStatus), }, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::AxibugProtobuf.CommandID), typeof(global::AxibugProtobuf.ErrorCode), typeof(global::AxibugProtobuf.LoginType), typeof(global::AxibugProtobuf.DeviceType), typeof(global::AxibugProtobuf.RoomGameState), typeof(global::AxibugProtobuf.LoginResultStatus), }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_ChatMsg), global::AxibugProtobuf.Protobuf_ChatMsg.Parser, new[]{ "ChatMsg" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_ChatMsg_RESP), global::AxibugProtobuf.Protobuf_ChatMsg_RESP.Parser, new[]{ "NickName", "ChatMsg", "Date" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Ping), global::AxibugProtobuf.Protobuf_Ping.Parser, new[]{ "Seed" }, null, null, null, null), @@ -99,20 +98,21 @@ namespace AxibugProtobuf { new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Login_RESP), global::AxibugProtobuf.Protobuf_Login_RESP.Parser, new[]{ "DeviceUUID", "Token", "LastLoginDate", "RegDate", "Status", "UID" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_List), global::AxibugProtobuf.Protobuf_Room_List.Parser, null, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_List_RESP), global::AxibugProtobuf.Protobuf_Room_List_RESP.Parser, new[]{ "RoomMiniInfoList" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_MiniInfo), global::AxibugProtobuf.Protobuf_Room_MiniInfo.Parser, new[]{ "RoomID", "GameRomID", "GameRomHash", "PlayerState", "GameState", "ObsUserCount", "Player1UID", "Player1NickName", "Player2UID", "Player2NickName" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_MiniInfo), global::AxibugProtobuf.Protobuf_Room_MiniInfo.Parser, new[]{ "RoomID", "GameRomID", "GameRomHash", "GameState", "ObsUserCount", "Player1UID", "Player1NickName", "Player2UID", "Player2NickName" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Update_RESP), global::AxibugProtobuf.Protobuf_Room_Update_RESP.Parser, new[]{ "UpdateType", "RoomMiniInfo" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Screnn_Frame), global::AxibugProtobuf.Protobuf_Screnn_Frame.Parser, new[]{ "RoomID", "FrameID", "RawBitmap" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_SinglePlayerInputData), global::AxibugProtobuf.Protobuf_Room_SinglePlayerInputData.Parser, new[]{ "FrameID", "InputData" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Syn_RoomFrameAllInput), global::AxibugProtobuf.Protobuf_Room_Syn_RoomFrameAllInput.Parser, new[]{ "FrameID", "InputData" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Create), global::AxibugProtobuf.Protobuf_Room_Create.Parser, new[]{ "GameRomID", "GameRomHash" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Syn_RoomFrameAllInputData), global::AxibugProtobuf.Protobuf_Room_Syn_RoomFrameAllInputData.Parser, new[]{ "FrameID", "InputData" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Create), global::AxibugProtobuf.Protobuf_Room_Create.Parser, new[]{ "GameRomID", "GameRomHash", "JoinPlayerIdx" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Create_RESP), global::AxibugProtobuf.Protobuf_Room_Create_RESP.Parser, new[]{ "RoomMiniInfo" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Join), global::AxibugProtobuf.Protobuf_Room_Join.Parser, new[]{ "RoomID", "PlayerNum" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Join_RESP), global::AxibugProtobuf.Protobuf_Room_Join_RESP.Parser, new[]{ "RoomMiniInfo" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Leave), global::AxibugProtobuf.Protobuf_Room_Leave.Parser, new[]{ "RoomID" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Leave_RESP), global::AxibugProtobuf.Protobuf_Room_Leave_RESP.Parser, new[]{ "RoomID" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_MyRoom_State_Change), global::AxibugProtobuf.Protobuf_Room_MyRoom_State_Change.Parser, new[]{ "RoomMiniInfo" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_WaitStep_RESP), global::AxibugProtobuf.Protobuf_Room_WaitStep_RESP.Parser, new[]{ "WaitStep" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_HostPlayer_UpdateStateRaw), global::AxibugProtobuf.Protobuf_Room_HostPlayer_UpdateStateRaw.Parser, new[]{ "ReadyFrame", "LoadStateRaw" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_WaitStep_RESP), global::AxibugProtobuf.Protobuf_Room_WaitStep_RESP.Parser, new[]{ "WaitStep", "LoadStateRaw" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_HostPlayer_UpdateStateRaw), global::AxibugProtobuf.Protobuf_Room_HostPlayer_UpdateStateRaw.Parser, new[]{ "LoadStateRaw" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_HostPlayer_UpdateStateRaw_RESP), global::AxibugProtobuf.Protobuf_Room_HostPlayer_UpdateStateRaw_RESP.Parser, null, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Player_Ready), global::AxibugProtobuf.Protobuf_Room_Player_Ready.Parser, null, null, null, null, null) })); } @@ -154,7 +154,7 @@ namespace AxibugProtobuf { /// [pbr::OriginalName("CMD_Room_Create")] CmdRoomCreate = 5101, /// - ///房间加入 对应 Protobuf_Room_Join | Protobuf_Room_Join_RESP + ///房间加入 对应 Protobuf_Room_Join | Protobuf_Room_Join_RESP //建议Join之前按照房间信息,提前下载并读取本地Rom /// [pbr::OriginalName("CMD_Room_Join")] CmdRoomJoin = 5105, /// @@ -188,7 +188,7 @@ namespace AxibugProtobuf { /// [pbr::OriginalName("CMD_Room_WaitStep")] CmdRoomWaitStep = 5201, /// - ///服务器房间准备和开始标识 下行 Protobuf_Room_HostPlayer_UpdateStateRaw + ///主机玩家上传即时存档 上行 | 下行 对应 Protobuf_Room_HostPlayer_UpdateStateRaw | Protobuf_Room_HostPlayer_UpdateStateRaw_RESP /// [pbr::OriginalName("CMD_Room_HostPlayer_UpdateStateRaw")] CmdRoomHostPlayerUpdateStateRaw = 5204, /// @@ -200,9 +200,9 @@ namespace AxibugProtobuf { /// [pbr::OriginalName("CMD_Room_Singel_PlayerInput")] CmdRoomSingelPlayerInput = 6010, /// - ///单个玩家操作同步上行 对应 Protobuf_Room_Syn_RoomFrameAllInput + ///单个玩家操作同步下行 对应 Protobuf_Room_Syn_RoomFrameAllInputData /// - [pbr::OriginalName("CMD_ROOM_SYN")] CmdRoomSyn = 6015, + [pbr::OriginalName("CMD_ROOM_SYN_PlayerInput")] CmdRoomSynPlayerInput = 6015, /// ///画面采集 /// @@ -226,6 +226,10 @@ namespace AxibugProtobuf { ///加入目标位置已经有人 /// [pbr::OriginalName("ERROR_ROOM_SLOT_READLY_HAD_PLAYER")] ErrorRoomSlotReadlyHadPlayer = 11, + /// + ///当前房间状态不允许本操作 + /// + [pbr::OriginalName("ERROR_ROOM_CANT_DO_CURR_STATE")] ErrorRoomCantDoCurrState = 50, } public enum LoginType { @@ -246,25 +250,6 @@ namespace AxibugProtobuf { [pbr::OriginalName("PSV")] Psv = 4, } - public enum RoomPlayerState { - /// - ///缺省 - /// - [pbr::OriginalName("None_PlayerState")] NonePlayerState = 0, - /// - ///仅P1 - /// - [pbr::OriginalName("OnlyP1")] OnlyP1 = 1, - /// - ///仅P2 - /// - [pbr::OriginalName("OnlyP2")] OnlyP2 = 2, - /// - ///玩家都在 - /// - [pbr::OriginalName("BothOnline")] BothOnline = 3, - } - public enum RoomGameState { /// ///缺省 @@ -275,25 +260,21 @@ namespace AxibugProtobuf { /// [pbr::OriginalName("OnlyHost")] OnlyHost = 1, /// - ///ReadyStep0 + ///等待即时存档 /// - [pbr::OriginalName("ReadyStep_0")] ReadyStep0 = 2, + [pbr::OriginalName("WaitRawUpdate")] WaitRawUpdate = 2, /// - ///ReadyStep1 + ///等待Ready /// - [pbr::OriginalName("ReadyStep_1")] ReadyStep1 = 3, - /// - ///ReadyStep2 - /// - [pbr::OriginalName("ReadyStep_2")] ReadyStep2 = 4, + [pbr::OriginalName("WaitReady")] WaitReady = 3, /// ///暂停 /// - [pbr::OriginalName("Pause")] Pause = 5, + [pbr::OriginalName("Pause")] Pause = 4, /// - ///游戏中 + ///联机中 /// - [pbr::OriginalName("InGame")] InGame = 6, + [pbr::OriginalName("InOnlineGame")] InOnlineGame = 5, } public enum LoginResultStatus { @@ -2089,7 +2070,6 @@ namespace AxibugProtobuf { roomID_ = other.roomID_; gameRomID_ = other.gameRomID_; gameRomHash_ = other.gameRomHash_; - playerState_ = other.playerState_; gameState_ = other.gameState_; obsUserCount_ = other.obsUserCount_; player1UID_ = other.player1UID_; @@ -2143,20 +2123,6 @@ namespace AxibugProtobuf { } } - /// Field number for the "PlayerState" field. - public const int PlayerStateFieldNumber = 4; - private global::AxibugProtobuf.RoomPlayerState playerState_ = global::AxibugProtobuf.RoomPlayerState.NonePlayerState; - /// - ///玩家加入状态 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::AxibugProtobuf.RoomPlayerState PlayerState { - get { return playerState_; } - set { - playerState_ = value; - } - } - /// Field number for the "GameState" field. public const int GameStateFieldNumber = 5; private global::AxibugProtobuf.RoomGameState gameState_ = global::AxibugProtobuf.RoomGameState.NoneGameState; @@ -2257,7 +2223,6 @@ namespace AxibugProtobuf { if (RoomID != other.RoomID) return false; if (GameRomID != other.GameRomID) return false; if (GameRomHash != other.GameRomHash) return false; - if (PlayerState != other.PlayerState) return false; if (GameState != other.GameState) return false; if (ObsUserCount != other.ObsUserCount) return false; if (Player1UID != other.Player1UID) return false; @@ -2273,7 +2238,6 @@ namespace AxibugProtobuf { if (RoomID != 0) hash ^= RoomID.GetHashCode(); if (GameRomID != 0) hash ^= GameRomID.GetHashCode(); if (GameRomHash.Length != 0) hash ^= GameRomHash.GetHashCode(); - if (PlayerState != global::AxibugProtobuf.RoomPlayerState.NonePlayerState) hash ^= PlayerState.GetHashCode(); if (GameState != global::AxibugProtobuf.RoomGameState.NoneGameState) hash ^= GameState.GetHashCode(); if (ObsUserCount != 0) hash ^= ObsUserCount.GetHashCode(); if (Player1UID != 0L) hash ^= Player1UID.GetHashCode(); @@ -2308,10 +2272,6 @@ namespace AxibugProtobuf { output.WriteRawTag(26); output.WriteString(GameRomHash); } - if (PlayerState != global::AxibugProtobuf.RoomPlayerState.NonePlayerState) { - output.WriteRawTag(32); - output.WriteEnum((int) PlayerState); - } if (GameState != global::AxibugProtobuf.RoomGameState.NoneGameState) { output.WriteRawTag(40); output.WriteEnum((int) GameState); @@ -2357,10 +2317,6 @@ namespace AxibugProtobuf { output.WriteRawTag(26); output.WriteString(GameRomHash); } - if (PlayerState != global::AxibugProtobuf.RoomPlayerState.NonePlayerState) { - output.WriteRawTag(32); - output.WriteEnum((int) PlayerState); - } if (GameState != global::AxibugProtobuf.RoomGameState.NoneGameState) { output.WriteRawTag(40); output.WriteEnum((int) GameState); @@ -2403,9 +2359,6 @@ namespace AxibugProtobuf { if (GameRomHash.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(GameRomHash); } - if (PlayerState != global::AxibugProtobuf.RoomPlayerState.NonePlayerState) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) PlayerState); - } if (GameState != global::AxibugProtobuf.RoomGameState.NoneGameState) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) GameState); } @@ -2444,9 +2397,6 @@ namespace AxibugProtobuf { if (other.GameRomHash.Length != 0) { GameRomHash = other.GameRomHash; } - if (other.PlayerState != global::AxibugProtobuf.RoomPlayerState.NonePlayerState) { - PlayerState = other.PlayerState; - } if (other.GameState != global::AxibugProtobuf.RoomGameState.NoneGameState) { GameState = other.GameState; } @@ -2491,10 +2441,6 @@ namespace AxibugProtobuf { GameRomHash = input.ReadString(); break; } - case 32: { - PlayerState = (global::AxibugProtobuf.RoomPlayerState) input.ReadEnum(); - break; - } case 40: { GameState = (global::AxibugProtobuf.RoomGameState) input.ReadEnum(); break; @@ -2545,10 +2491,6 @@ namespace AxibugProtobuf { GameRomHash = input.ReadString(); break; } - case 32: { - PlayerState = (global::AxibugProtobuf.RoomPlayerState) input.ReadEnum(); - break; - } case 40: { GameState = (global::AxibugProtobuf.RoomGameState) input.ReadEnum(); break; @@ -3270,15 +3212,15 @@ namespace AxibugProtobuf { } - public sealed partial class Protobuf_Room_Syn_RoomFrameAllInput : pb::IMessage + public sealed partial class Protobuf_Room_Syn_RoomFrameAllInputData : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage #endif { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Protobuf_Room_Syn_RoomFrameAllInput()); + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Protobuf_Room_Syn_RoomFrameAllInputData()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { @@ -3291,22 +3233,22 @@ namespace AxibugProtobuf { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public Protobuf_Room_Syn_RoomFrameAllInput() { + public Protobuf_Room_Syn_RoomFrameAllInputData() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public Protobuf_Room_Syn_RoomFrameAllInput(Protobuf_Room_Syn_RoomFrameAllInput other) : this() { + public Protobuf_Room_Syn_RoomFrameAllInputData(Protobuf_Room_Syn_RoomFrameAllInputData other) : this() { frameID_ = other.frameID_; inputData_ = other.inputData_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public Protobuf_Room_Syn_RoomFrameAllInput Clone() { - return new Protobuf_Room_Syn_RoomFrameAllInput(this); + public Protobuf_Room_Syn_RoomFrameAllInputData Clone() { + return new Protobuf_Room_Syn_RoomFrameAllInputData(this); } /// Field number for the "FrameID" field. @@ -3339,11 +3281,11 @@ namespace AxibugProtobuf { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { - return Equals(other as Protobuf_Room_Syn_RoomFrameAllInput); + return Equals(other as Protobuf_Room_Syn_RoomFrameAllInputData); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(Protobuf_Room_Syn_RoomFrameAllInput other) { + public bool Equals(Protobuf_Room_Syn_RoomFrameAllInputData other) { if (ReferenceEquals(other, null)) { return false; } @@ -3423,7 +3365,7 @@ namespace AxibugProtobuf { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(Protobuf_Room_Syn_RoomFrameAllInput other) { + public void MergeFrom(Protobuf_Room_Syn_RoomFrameAllInputData other) { if (other == null) { return; } @@ -3515,6 +3457,7 @@ namespace AxibugProtobuf { public Protobuf_Room_Create(Protobuf_Room_Create other) : this() { gameRomID_ = other.gameRomID_; gameRomHash_ = other.gameRomHash_; + joinPlayerIdx_ = other.joinPlayerIdx_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -3545,6 +3488,20 @@ namespace AxibugProtobuf { } } + /// Field number for the "JoinPlayerIdx" field. + public const int JoinPlayerIdxFieldNumber = 3; + private int joinPlayerIdx_; + /// + ///P1~P4[0~3] 以几号位玩家创建房间 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int JoinPlayerIdx { + get { return joinPlayerIdx_; } + set { + joinPlayerIdx_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as Protobuf_Room_Create); @@ -3560,6 +3517,7 @@ namespace AxibugProtobuf { } if (GameRomID != other.GameRomID) return false; if (GameRomHash != other.GameRomHash) return false; + if (JoinPlayerIdx != other.JoinPlayerIdx) return false; return Equals(_unknownFields, other._unknownFields); } @@ -3568,6 +3526,7 @@ namespace AxibugProtobuf { int hash = 1; if (GameRomID != 0) hash ^= GameRomID.GetHashCode(); if (GameRomHash.Length != 0) hash ^= GameRomHash.GetHashCode(); + if (JoinPlayerIdx != 0) hash ^= JoinPlayerIdx.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -3592,6 +3551,10 @@ namespace AxibugProtobuf { output.WriteRawTag(18); output.WriteString(GameRomHash); } + if (JoinPlayerIdx != 0) { + output.WriteRawTag(24); + output.WriteInt32(JoinPlayerIdx); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -3609,6 +3572,10 @@ namespace AxibugProtobuf { output.WriteRawTag(18); output.WriteString(GameRomHash); } + if (JoinPlayerIdx != 0) { + output.WriteRawTag(24); + output.WriteInt32(JoinPlayerIdx); + } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -3624,6 +3591,9 @@ namespace AxibugProtobuf { if (GameRomHash.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(GameRomHash); } + if (JoinPlayerIdx != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(JoinPlayerIdx); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -3641,6 +3611,9 @@ namespace AxibugProtobuf { if (other.GameRomHash.Length != 0) { GameRomHash = other.GameRomHash; } + if (other.JoinPlayerIdx != 0) { + JoinPlayerIdx = other.JoinPlayerIdx; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -3663,6 +3636,10 @@ namespace AxibugProtobuf { GameRomHash = input.ReadString(); break; } + case 24: { + JoinPlayerIdx = input.ReadInt32(); + break; + } } } #endif @@ -3685,6 +3662,10 @@ namespace AxibugProtobuf { GameRomHash = input.ReadString(); break; } + case 24: { + JoinPlayerIdx = input.ReadInt32(); + break; + } } } } @@ -4838,6 +4819,7 @@ namespace AxibugProtobuf { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public Protobuf_Room_WaitStep_RESP(Protobuf_Room_WaitStep_RESP other) : this() { waitStep_ = other.waitStep_; + loadStateRaw_ = other.loadStateRaw_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -4850,7 +4832,7 @@ namespace AxibugProtobuf { public const int WaitStepFieldNumber = 1; private int waitStep_; /// - ///状态 [0]等待主机上报即时存档 [1]要求准备 [2]开始(收到本状态时,立即开始跑模拟器核心) + ///状态 [0]等待主机上报即时存档 [1]要求客户端准备 [2]开始(收到本状态时,立即开始跑模拟器核心) /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int WaitStep { @@ -4860,6 +4842,20 @@ namespace AxibugProtobuf { } } + /// Field number for the "LoadStateRaw" field. + public const int LoadStateRawFieldNumber = 2; + private pb::ByteString loadStateRaw_ = pb::ByteString.Empty; + /// + ///如下是 WaitStep = 1 时,才有值。广播即时存档 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pb::ByteString LoadStateRaw { + get { return loadStateRaw_; } + set { + loadStateRaw_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as Protobuf_Room_WaitStep_RESP); @@ -4874,6 +4870,7 @@ namespace AxibugProtobuf { return true; } if (WaitStep != other.WaitStep) return false; + if (LoadStateRaw != other.LoadStateRaw) return false; return Equals(_unknownFields, other._unknownFields); } @@ -4881,6 +4878,7 @@ namespace AxibugProtobuf { public override int GetHashCode() { int hash = 1; if (WaitStep != 0) hash ^= WaitStep.GetHashCode(); + if (LoadStateRaw.Length != 0) hash ^= LoadStateRaw.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -4901,6 +4899,10 @@ namespace AxibugProtobuf { output.WriteRawTag(8); output.WriteInt32(WaitStep); } + if (LoadStateRaw.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(LoadStateRaw); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -4914,6 +4916,10 @@ namespace AxibugProtobuf { output.WriteRawTag(8); output.WriteInt32(WaitStep); } + if (LoadStateRaw.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(LoadStateRaw); + } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -4926,6 +4932,9 @@ namespace AxibugProtobuf { if (WaitStep != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(WaitStep); } + if (LoadStateRaw.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(LoadStateRaw); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -4940,6 +4949,9 @@ namespace AxibugProtobuf { if (other.WaitStep != 0) { WaitStep = other.WaitStep; } + if (other.LoadStateRaw.Length != 0) { + LoadStateRaw = other.LoadStateRaw; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -4958,6 +4970,10 @@ namespace AxibugProtobuf { WaitStep = input.ReadInt32(); break; } + case 18: { + LoadStateRaw = input.ReadBytes(); + break; + } } } #endif @@ -4976,6 +4992,10 @@ namespace AxibugProtobuf { WaitStep = input.ReadInt32(); break; } + case 18: { + LoadStateRaw = input.ReadBytes(); + break; + } } } } @@ -5012,7 +5032,6 @@ namespace AxibugProtobuf { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public Protobuf_Room_HostPlayer_UpdateStateRaw(Protobuf_Room_HostPlayer_UpdateStateRaw other) : this() { - readyFrame_ = other.readyFrame_; loadStateRaw_ = other.loadStateRaw_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -5022,22 +5041,8 @@ namespace AxibugProtobuf { return new Protobuf_Room_HostPlayer_UpdateStateRaw(this); } - /// Field number for the "ReadyFrame" field. - public const int ReadyFrameFieldNumber = 1; - private int readyFrame_; - /// - ///要求准备的帧数 (非即时存档则为0) - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int ReadyFrame { - get { return readyFrame_; } - set { - readyFrame_ = value; - } - } - /// Field number for the "LoadStateRaw" field. - public const int LoadStateRawFieldNumber = 2; + public const int LoadStateRawFieldNumber = 1; private pb::ByteString loadStateRaw_ = pb::ByteString.Empty; /// ///即时存档byte数据 @@ -5063,7 +5068,6 @@ namespace AxibugProtobuf { if (ReferenceEquals(other, this)) { return true; } - if (ReadyFrame != other.ReadyFrame) return false; if (LoadStateRaw != other.LoadStateRaw) return false; return Equals(_unknownFields, other._unknownFields); } @@ -5071,7 +5075,6 @@ namespace AxibugProtobuf { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; - if (ReadyFrame != 0) hash ^= ReadyFrame.GetHashCode(); if (LoadStateRaw.Length != 0) hash ^= LoadStateRaw.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); @@ -5089,12 +5092,8 @@ namespace AxibugProtobuf { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); #else - if (ReadyFrame != 0) { - output.WriteRawTag(8); - output.WriteInt32(ReadyFrame); - } if (LoadStateRaw.Length != 0) { - output.WriteRawTag(18); + output.WriteRawTag(10); output.WriteBytes(LoadStateRaw); } if (_unknownFields != null) { @@ -5106,12 +5105,8 @@ namespace AxibugProtobuf { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (ReadyFrame != 0) { - output.WriteRawTag(8); - output.WriteInt32(ReadyFrame); - } if (LoadStateRaw.Length != 0) { - output.WriteRawTag(18); + output.WriteRawTag(10); output.WriteBytes(LoadStateRaw); } if (_unknownFields != null) { @@ -5123,9 +5118,6 @@ namespace AxibugProtobuf { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; - if (ReadyFrame != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(ReadyFrame); - } if (LoadStateRaw.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeBytesSize(LoadStateRaw); } @@ -5140,9 +5132,6 @@ namespace AxibugProtobuf { if (other == null) { return; } - if (other.ReadyFrame != 0) { - ReadyFrame = other.ReadyFrame; - } if (other.LoadStateRaw.Length != 0) { LoadStateRaw = other.LoadStateRaw; } @@ -5160,11 +5149,7 @@ namespace AxibugProtobuf { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 8: { - ReadyFrame = input.ReadInt32(); - break; - } - case 18: { + case 10: { LoadStateRaw = input.ReadBytes(); break; } @@ -5182,11 +5167,7 @@ namespace AxibugProtobuf { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - case 8: { - ReadyFrame = input.ReadInt32(); - break; - } - case 18: { + case 10: { LoadStateRaw = input.ReadBytes(); break; } @@ -5197,6 +5178,142 @@ namespace AxibugProtobuf { } + public sealed partial class Protobuf_Room_HostPlayer_UpdateStateRaw_RESP : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Protobuf_Room_HostPlayer_UpdateStateRaw_RESP()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::AxibugProtobuf.ProtobufAxibugEmuOnlineReflection.Descriptor.MessageTypes[22]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Protobuf_Room_HostPlayer_UpdateStateRaw_RESP() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Protobuf_Room_HostPlayer_UpdateStateRaw_RESP(Protobuf_Room_HostPlayer_UpdateStateRaw_RESP other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Protobuf_Room_HostPlayer_UpdateStateRaw_RESP Clone() { + return new Protobuf_Room_HostPlayer_UpdateStateRaw_RESP(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as Protobuf_Room_HostPlayer_UpdateStateRaw_RESP); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(Protobuf_Room_HostPlayer_UpdateStateRaw_RESP other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(Protobuf_Room_HostPlayer_UpdateStateRaw_RESP other) { + if (other == null) { + return; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + } + } + } + #endif + + } + public sealed partial class Protobuf_Room_Player_Ready : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage @@ -5209,7 +5326,7 @@ namespace AxibugProtobuf { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { - get { return global::AxibugProtobuf.ProtobufAxibugEmuOnlineReflection.Descriptor.MessageTypes[22]; } + get { return global::AxibugProtobuf.ProtobufAxibugEmuOnlineReflection.Descriptor.MessageTypes[23]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] diff --git a/AxibugEmuOnline.Web/Controllers/ApiController.cs b/AxibugEmuOnline.Web/Controllers/ApiController.cs index b35c20f..a9c3b7c 100644 --- a/AxibugEmuOnline.Web/Controllers/ApiController.cs +++ b/AxibugEmuOnline.Web/Controllers/ApiController.cs @@ -66,10 +66,12 @@ namespace AxibugEmuOnline.Web.Controllers // ִвѯ using (var reader = command.ExecuteReader()) { + int orderIndex = Page * PageSize; while (reader.Read()) { resp.gameList.Add(new Resp_RomInfo() { + orderid = orderIndex++, id = reader.GetInt32(0), romName = !reader.IsDBNull(1) ? reader.GetString(1) : string.Empty, gType = !reader.IsDBNull(2) ? reader.GetString(2) : string.Empty, @@ -125,6 +127,7 @@ namespace AxibugEmuOnline.Web.Controllers public class Resp_RomInfo { + public int orderid { get; set; } public int id { get; set; } public string romName { get; set;} public string gType { get; set; } diff --git a/ProtobufCore/out/CS/ProtobufAxibugEmuOnline.cs b/ProtobufCore/out/CS/ProtobufAxibugEmuOnline.cs index 3bdffac..f7e1fc1 100644 --- a/ProtobufCore/out/CS/ProtobufAxibugEmuOnline.cs +++ b/ProtobufCore/out/CS/ProtobufAxibugEmuOnline.cs @@ -38,59 +38,58 @@ namespace AxibugProtobuf { "b3RvYnVmLkxvZ2luUmVzdWx0U3RhdHVzEgsKA1VJRBgGIAEoAyIUChJQcm90", "b2J1Zl9Sb29tX0xpc3QiWwoXUHJvdG9idWZfUm9vbV9MaXN0X1JFU1ASQAoQ", "Um9vbU1pbmlJbmZvTGlzdBgBIAMoCzImLkF4aWJ1Z1Byb3RvYnVmLlByb3Rv", - "YnVmX1Jvb21fTWluaUluZm8irAIKFlByb3RvYnVmX1Jvb21fTWluaUluZm8S", + "YnVmX1Jvb21fTWluaUluZm8i9gEKFlByb3RvYnVmX1Jvb21fTWluaUluZm8S", "DgoGUm9vbUlEGAEgASgFEhEKCUdhbWVSb21JRBgCIAEoBRITCgtHYW1lUm9t", - "SGFzaBgDIAEoCRI0CgtQbGF5ZXJTdGF0ZRgEIAEoDjIfLkF4aWJ1Z1Byb3Rv", - "YnVmLlJvb21QbGF5ZXJTdGF0ZRIwCglHYW1lU3RhdGUYBSABKA4yHS5BeGli", - "dWdQcm90b2J1Zi5Sb29tR2FtZVN0YXRlEhQKDE9ic1VzZXJDb3VudBgGIAEo", - "BRITCgtQbGF5ZXIxX1VJRBgHIAEoAxIYChBQbGF5ZXIxX05pY2tOYW1lGAgg", - "ASgJEhMKC1BsYXllcjJfVUlEGAkgASgDEhgKEFBsYXllcjJfTmlja05hbWUY", - "CiABKAkibQoZUHJvdG9idWZfUm9vbV9VcGRhdGVfUkVTUBISCgpVcGRhdGVU", - "eXBlGAEgASgFEjwKDFJvb21NaW5p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YKAlBD", - "EAESCwoHQW5kcm9pZBACEgcKA0lPUxADEgcKA1BTVhAEKk8KD1Jvb21QbGF5", - "ZXJTdGF0ZRIUChBOb25lX1BsYXllclN0YXRlEAASCgoGT25seVAxEAESCgoG", - "T25seVAyEAISDgoKQm90aE9ubGluZRADKnsKDVJvb21HYW1lU3RhdGUSEgoO", - "Tm9uZV9HYW1lU3RhdGUQABIMCghPbmx5SG9zdBABEg8KC1JlYWR5U3RlcF8w", - "EAISDwoLUmVhZHlTdGVwXzEQAxIPCgtSZWFkeVN0ZXBfMhAEEgkKBVBhdXNl", - "EAUSCgoGSW5HYW1lEAYqTgoRTG9naW5SZXN1bHRTdGF0dXMSIQodTG9naW5S", - "ZXN1bHRTdGF0dXNfQmFzZURlZmF1bHQQABIGCgJPSxABEg4KCkFjY291bnRF", - "cnIQAkICSAFiBnByb3RvMw==")); + "SGFzaBgDIAEoCRIwCglHYW1lU3RhdGUYBSABKA4yHS5BeGlidWdQcm90b2J1", + "Zi5Sb29tR2FtZVN0YXRlEhQKDE9ic1VzZXJDb3VudBgGIAEoBRITCgtQbGF5", + "ZXIxX1VJRBgHIAEoAxIYChBQbGF5ZXIxX05pY2tOYW1lGAggASgJEhMKC1Bs", + "YXllcjJfVUlEGAkgASgDEhgKEFBsYXllcjJfTmlja05hbWUYCiABKAkibQoZ", + "UHJvdG9idWZfUm9vbV9VcGRhdGVfUkVTUBISCgpVcGRhdGVUeXBlGAEgASgF", + "EjwKDFJvb21NaW5pSW5mbxgCIAEoCzImLkF4aWJ1Z1Byb3RvYnVmLlByb3Rv", + "YnVmX1Jvb21fTWluaUluZm8iSwoVUHJvdG9idWZfU2NyZW5uX0ZyYW1lEg4K", + "BlJvb21JRBgBIAEoBRIPCgdGcmFtZUlEGAIgASgFEhEKCVJhd0JpdG1hcBgD", + "IAEoDCJJCiNQcm90b2J1Zl9Sb29tX1NpbmdsZVBsYXllcklucHV0RGF0YRIP", + "CgdGcmFtZUlEGAEgASgNEhEKCUlucHV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ZRAAEgwKCE9ubHlIb3N0EAESEQoNV2FpdFJhd1VwZGF0ZRACEg0KCVdh", + "aXRSZWFkeRADEgkKBVBhdXNlEAQSEAoMSW5PbmxpbmVHYW1lEAUqTgoRTG9n", + "aW5SZXN1bHRTdGF0dXMSIQodTG9naW5SZXN1bHRTdGF0dXNfQmFzZURlZmF1", + "bHQQABIGCgJPSxABEg4KCkFjY291bnRFcnIQAkICSAFiBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, - new pbr::GeneratedClrTypeInfo(new[] {typeof(global::AxibugProtobuf.CommandID), typeof(global::AxibugProtobuf.ErrorCode), typeof(global::AxibugProtobuf.LoginType), typeof(global::AxibugProtobuf.DeviceType), typeof(global::AxibugProtobuf.RoomPlayerState), typeof(global::AxibugProtobuf.RoomGameState), typeof(global::AxibugProtobuf.LoginResultStatus), }, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::AxibugProtobuf.CommandID), typeof(global::AxibugProtobuf.ErrorCode), typeof(global::AxibugProtobuf.LoginType), typeof(global::AxibugProtobuf.DeviceType), typeof(global::AxibugProtobuf.RoomGameState), typeof(global::AxibugProtobuf.LoginResultStatus), }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_ChatMsg), global::AxibugProtobuf.Protobuf_ChatMsg.Parser, new[]{ "ChatMsg" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_ChatMsg_RESP), global::AxibugProtobuf.Protobuf_ChatMsg_RESP.Parser, new[]{ "NickName", "ChatMsg", "Date" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Ping), global::AxibugProtobuf.Protobuf_Ping.Parser, new[]{ "Seed" }, null, null, null, null), @@ -99,20 +98,21 @@ namespace AxibugProtobuf { new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Login_RESP), global::AxibugProtobuf.Protobuf_Login_RESP.Parser, new[]{ "DeviceUUID", "Token", "LastLoginDate", "RegDate", "Status", "UID" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_List), global::AxibugProtobuf.Protobuf_Room_List.Parser, null, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_List_RESP), global::AxibugProtobuf.Protobuf_Room_List_RESP.Parser, new[]{ "RoomMiniInfoList" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_MiniInfo), global::AxibugProtobuf.Protobuf_Room_MiniInfo.Parser, new[]{ "RoomID", "GameRomID", "GameRomHash", "PlayerState", "GameState", "ObsUserCount", "Player1UID", "Player1NickName", "Player2UID", "Player2NickName" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_MiniInfo), global::AxibugProtobuf.Protobuf_Room_MiniInfo.Parser, new[]{ "RoomID", "GameRomID", "GameRomHash", "GameState", "ObsUserCount", "Player1UID", "Player1NickName", "Player2UID", "Player2NickName" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Update_RESP), global::AxibugProtobuf.Protobuf_Room_Update_RESP.Parser, new[]{ "UpdateType", "RoomMiniInfo" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Screnn_Frame), global::AxibugProtobuf.Protobuf_Screnn_Frame.Parser, new[]{ "RoomID", "FrameID", "RawBitmap" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_SinglePlayerInputData), global::AxibugProtobuf.Protobuf_Room_SinglePlayerInputData.Parser, new[]{ "FrameID", "InputData" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Syn_RoomFrameAllInput), global::AxibugProtobuf.Protobuf_Room_Syn_RoomFrameAllInput.Parser, new[]{ "FrameID", "InputData" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Create), global::AxibugProtobuf.Protobuf_Room_Create.Parser, new[]{ "GameRomID", "GameRomHash" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Syn_RoomFrameAllInputData), global::AxibugProtobuf.Protobuf_Room_Syn_RoomFrameAllInputData.Parser, new[]{ "FrameID", "InputData" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Create), global::AxibugProtobuf.Protobuf_Room_Create.Parser, new[]{ "GameRomID", "GameRomHash", "JoinPlayerIdx" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Create_RESP), global::AxibugProtobuf.Protobuf_Room_Create_RESP.Parser, new[]{ "RoomMiniInfo" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Join), global::AxibugProtobuf.Protobuf_Room_Join.Parser, new[]{ "RoomID", "PlayerNum" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Join_RESP), global::AxibugProtobuf.Protobuf_Room_Join_RESP.Parser, new[]{ "RoomMiniInfo" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Leave), global::AxibugProtobuf.Protobuf_Room_Leave.Parser, new[]{ "RoomID" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Leave_RESP), global::AxibugProtobuf.Protobuf_Room_Leave_RESP.Parser, new[]{ "RoomID" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_MyRoom_State_Change), global::AxibugProtobuf.Protobuf_Room_MyRoom_State_Change.Parser, new[]{ "RoomMiniInfo" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_WaitStep_RESP), global::AxibugProtobuf.Protobuf_Room_WaitStep_RESP.Parser, new[]{ "WaitStep" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_HostPlayer_UpdateStateRaw), global::AxibugProtobuf.Protobuf_Room_HostPlayer_UpdateStateRaw.Parser, new[]{ "ReadyFrame", "LoadStateRaw" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_WaitStep_RESP), global::AxibugProtobuf.Protobuf_Room_WaitStep_RESP.Parser, new[]{ "WaitStep", "LoadStateRaw" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_HostPlayer_UpdateStateRaw), global::AxibugProtobuf.Protobuf_Room_HostPlayer_UpdateStateRaw.Parser, new[]{ "LoadStateRaw" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_HostPlayer_UpdateStateRaw_RESP), global::AxibugProtobuf.Protobuf_Room_HostPlayer_UpdateStateRaw_RESP.Parser, null, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Player_Ready), global::AxibugProtobuf.Protobuf_Room_Player_Ready.Parser, null, null, null, null, null) })); } @@ -154,7 +154,7 @@ namespace AxibugProtobuf { /// [pbr::OriginalName("CMD_Room_Create")] CmdRoomCreate = 5101, /// - ///房间加入 对应 Protobuf_Room_Join | Protobuf_Room_Join_RESP + ///房间加入 对应 Protobuf_Room_Join | Protobuf_Room_Join_RESP //建议Join之前按照房间信息,提前下载并读取本地Rom /// [pbr::OriginalName("CMD_Room_Join")] CmdRoomJoin = 5105, /// @@ -188,7 +188,7 @@ namespace AxibugProtobuf { /// [pbr::OriginalName("CMD_Room_WaitStep")] CmdRoomWaitStep = 5201, /// - ///服务器房间准备和开始标识 下行 Protobuf_Room_HostPlayer_UpdateStateRaw + ///主机玩家上传即时存档 上行 | 下行 对应 Protobuf_Room_HostPlayer_UpdateStateRaw | Protobuf_Room_HostPlayer_UpdateStateRaw_RESP /// [pbr::OriginalName("CMD_Room_HostPlayer_UpdateStateRaw")] CmdRoomHostPlayerUpdateStateRaw = 5204, /// @@ -200,9 +200,9 @@ namespace AxibugProtobuf { /// [pbr::OriginalName("CMD_Room_Singel_PlayerInput")] CmdRoomSingelPlayerInput = 6010, /// - ///单个玩家操作同步上行 对应 Protobuf_Room_Syn_RoomFrameAllInput + ///单个玩家操作同步下行 对应 Protobuf_Room_Syn_RoomFrameAllInputData /// - [pbr::OriginalName("CMD_ROOM_SYN")] CmdRoomSyn = 6015, + [pbr::OriginalName("CMD_ROOM_SYN_PlayerInput")] CmdRoomSynPlayerInput = 6015, /// ///画面采集 /// @@ -226,6 +226,10 @@ namespace AxibugProtobuf { ///加入目标位置已经有人 /// [pbr::OriginalName("ERROR_ROOM_SLOT_READLY_HAD_PLAYER")] ErrorRoomSlotReadlyHadPlayer = 11, + /// + ///当前房间状态不允许本操作 + /// + [pbr::OriginalName("ERROR_ROOM_CANT_DO_CURR_STATE")] ErrorRoomCantDoCurrState = 50, } public enum LoginType { @@ -246,25 +250,6 @@ namespace AxibugProtobuf { [pbr::OriginalName("PSV")] Psv = 4, } - public enum RoomPlayerState { - /// - ///缺省 - /// - [pbr::OriginalName("None_PlayerState")] NonePlayerState = 0, - /// - ///仅P1 - /// - [pbr::OriginalName("OnlyP1")] OnlyP1 = 1, - /// - ///仅P2 - /// - [pbr::OriginalName("OnlyP2")] OnlyP2 = 2, - /// - ///玩家都在 - /// - [pbr::OriginalName("BothOnline")] BothOnline = 3, - } - public enum RoomGameState { /// ///缺省 @@ -275,25 +260,21 @@ namespace AxibugProtobuf { /// [pbr::OriginalName("OnlyHost")] OnlyHost = 1, /// - ///ReadyStep0 + ///等待即时存档 /// - [pbr::OriginalName("ReadyStep_0")] ReadyStep0 = 2, + [pbr::OriginalName("WaitRawUpdate")] WaitRawUpdate = 2, /// - ///ReadyStep1 + ///等待Ready /// - [pbr::OriginalName("ReadyStep_1")] ReadyStep1 = 3, - /// - ///ReadyStep2 - /// - [pbr::OriginalName("ReadyStep_2")] ReadyStep2 = 4, + [pbr::OriginalName("WaitReady")] WaitReady = 3, /// ///暂停 /// - [pbr::OriginalName("Pause")] Pause = 5, + [pbr::OriginalName("Pause")] Pause = 4, /// - ///游戏中 + ///联机中 /// - [pbr::OriginalName("InGame")] InGame = 6, + [pbr::OriginalName("InOnlineGame")] InOnlineGame = 5, } public enum LoginResultStatus { @@ -2089,7 +2070,6 @@ namespace AxibugProtobuf { roomID_ = other.roomID_; gameRomID_ = other.gameRomID_; gameRomHash_ = other.gameRomHash_; - playerState_ = other.playerState_; gameState_ = other.gameState_; obsUserCount_ = other.obsUserCount_; player1UID_ = other.player1UID_; @@ -2143,20 +2123,6 @@ namespace AxibugProtobuf { } } - /// Field number for the "PlayerState" field. - public const int PlayerStateFieldNumber = 4; - private global::AxibugProtobuf.RoomPlayerState playerState_ = global::AxibugProtobuf.RoomPlayerState.NonePlayerState; - /// - ///玩家加入状态 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::AxibugProtobuf.RoomPlayerState PlayerState { - get { return playerState_; } - set { - playerState_ = value; - } - } - /// Field number for the "GameState" field. public const int GameStateFieldNumber = 5; private global::AxibugProtobuf.RoomGameState gameState_ = global::AxibugProtobuf.RoomGameState.NoneGameState; @@ -2257,7 +2223,6 @@ namespace AxibugProtobuf { if (RoomID != other.RoomID) return false; if (GameRomID != other.GameRomID) return false; if (GameRomHash != other.GameRomHash) return false; - if (PlayerState != other.PlayerState) return false; if (GameState != other.GameState) return false; if (ObsUserCount != other.ObsUserCount) return false; if (Player1UID != other.Player1UID) return false; @@ -2273,7 +2238,6 @@ namespace AxibugProtobuf { if (RoomID != 0) hash ^= RoomID.GetHashCode(); if (GameRomID != 0) hash ^= GameRomID.GetHashCode(); if (GameRomHash.Length != 0) hash ^= GameRomHash.GetHashCode(); - if (PlayerState != global::AxibugProtobuf.RoomPlayerState.NonePlayerState) hash ^= PlayerState.GetHashCode(); if (GameState != global::AxibugProtobuf.RoomGameState.NoneGameState) hash ^= GameState.GetHashCode(); if (ObsUserCount != 0) hash ^= ObsUserCount.GetHashCode(); if (Player1UID != 0L) hash ^= Player1UID.GetHashCode(); @@ -2308,10 +2272,6 @@ namespace AxibugProtobuf { output.WriteRawTag(26); output.WriteString(GameRomHash); } - if (PlayerState != global::AxibugProtobuf.RoomPlayerState.NonePlayerState) { - output.WriteRawTag(32); - output.WriteEnum((int) PlayerState); - } if (GameState != global::AxibugProtobuf.RoomGameState.NoneGameState) { output.WriteRawTag(40); output.WriteEnum((int) GameState); @@ -2357,10 +2317,6 @@ namespace AxibugProtobuf { output.WriteRawTag(26); output.WriteString(GameRomHash); } - if (PlayerState != global::AxibugProtobuf.RoomPlayerState.NonePlayerState) { - output.WriteRawTag(32); - output.WriteEnum((int) PlayerState); - } if (GameState != global::AxibugProtobuf.RoomGameState.NoneGameState) { output.WriteRawTag(40); output.WriteEnum((int) GameState); @@ -2403,9 +2359,6 @@ namespace AxibugProtobuf { if (GameRomHash.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(GameRomHash); } - if (PlayerState != global::AxibugProtobuf.RoomPlayerState.NonePlayerState) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) PlayerState); - } if (GameState != global::AxibugProtobuf.RoomGameState.NoneGameState) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) GameState); } @@ -2444,9 +2397,6 @@ namespace AxibugProtobuf { if (other.GameRomHash.Length != 0) { GameRomHash = other.GameRomHash; } - if (other.PlayerState != global::AxibugProtobuf.RoomPlayerState.NonePlayerState) { - PlayerState = other.PlayerState; - } if (other.GameState != global::AxibugProtobuf.RoomGameState.NoneGameState) { GameState = other.GameState; } @@ -2491,10 +2441,6 @@ namespace AxibugProtobuf { GameRomHash = input.ReadString(); break; } - case 32: { - PlayerState = (global::AxibugProtobuf.RoomPlayerState) input.ReadEnum(); - break; - } case 40: { GameState = (global::AxibugProtobuf.RoomGameState) input.ReadEnum(); break; @@ -2545,10 +2491,6 @@ namespace AxibugProtobuf { GameRomHash = input.ReadString(); break; } - case 32: { - PlayerState = (global::AxibugProtobuf.RoomPlayerState) input.ReadEnum(); - break; - } case 40: { GameState = (global::AxibugProtobuf.RoomGameState) input.ReadEnum(); break; @@ -3270,15 +3212,15 @@ namespace AxibugProtobuf { } - public sealed partial class Protobuf_Room_Syn_RoomFrameAllInput : pb::IMessage + public sealed partial class Protobuf_Room_Syn_RoomFrameAllInputData : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage #endif { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Protobuf_Room_Syn_RoomFrameAllInput()); + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Protobuf_Room_Syn_RoomFrameAllInputData()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { @@ -3291,22 +3233,22 @@ namespace AxibugProtobuf { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public Protobuf_Room_Syn_RoomFrameAllInput() { + public Protobuf_Room_Syn_RoomFrameAllInputData() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public Protobuf_Room_Syn_RoomFrameAllInput(Protobuf_Room_Syn_RoomFrameAllInput other) : this() { + public Protobuf_Room_Syn_RoomFrameAllInputData(Protobuf_Room_Syn_RoomFrameAllInputData other) : this() { frameID_ = other.frameID_; inputData_ = other.inputData_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public Protobuf_Room_Syn_RoomFrameAllInput Clone() { - return new Protobuf_Room_Syn_RoomFrameAllInput(this); + public Protobuf_Room_Syn_RoomFrameAllInputData Clone() { + return new Protobuf_Room_Syn_RoomFrameAllInputData(this); } /// Field number for the "FrameID" field. @@ -3339,11 +3281,11 @@ namespace AxibugProtobuf { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { - return Equals(other as Protobuf_Room_Syn_RoomFrameAllInput); + return Equals(other as Protobuf_Room_Syn_RoomFrameAllInputData); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(Protobuf_Room_Syn_RoomFrameAllInput other) { + public bool Equals(Protobuf_Room_Syn_RoomFrameAllInputData other) { if (ReferenceEquals(other, null)) { return false; } @@ -3423,7 +3365,7 @@ namespace AxibugProtobuf { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(Protobuf_Room_Syn_RoomFrameAllInput other) { + public void MergeFrom(Protobuf_Room_Syn_RoomFrameAllInputData other) { if (other == null) { return; } @@ -3515,6 +3457,7 @@ namespace AxibugProtobuf { public Protobuf_Room_Create(Protobuf_Room_Create other) : this() { gameRomID_ = other.gameRomID_; gameRomHash_ = other.gameRomHash_; + joinPlayerIdx_ = other.joinPlayerIdx_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -3545,6 +3488,20 @@ namespace AxibugProtobuf { } } + /// Field number for the "JoinPlayerIdx" field. + public const int JoinPlayerIdxFieldNumber = 3; + private int joinPlayerIdx_; + /// + ///P1~P4[0~3] 以几号位玩家创建房间 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int JoinPlayerIdx { + get { return joinPlayerIdx_; } + set { + joinPlayerIdx_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as Protobuf_Room_Create); @@ -3560,6 +3517,7 @@ namespace AxibugProtobuf { } if (GameRomID != other.GameRomID) return false; if (GameRomHash != other.GameRomHash) return false; + if (JoinPlayerIdx != other.JoinPlayerIdx) return false; return Equals(_unknownFields, other._unknownFields); } @@ -3568,6 +3526,7 @@ namespace AxibugProtobuf { int hash = 1; if (GameRomID != 0) hash ^= GameRomID.GetHashCode(); if (GameRomHash.Length != 0) hash ^= GameRomHash.GetHashCode(); + if (JoinPlayerIdx != 0) hash ^= JoinPlayerIdx.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -3592,6 +3551,10 @@ namespace AxibugProtobuf { output.WriteRawTag(18); output.WriteString(GameRomHash); } + if (JoinPlayerIdx != 0) { + output.WriteRawTag(24); + output.WriteInt32(JoinPlayerIdx); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -3609,6 +3572,10 @@ namespace AxibugProtobuf { output.WriteRawTag(18); output.WriteString(GameRomHash); } + if (JoinPlayerIdx != 0) { + output.WriteRawTag(24); + output.WriteInt32(JoinPlayerIdx); + } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -3624,6 +3591,9 @@ namespace AxibugProtobuf { if (GameRomHash.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(GameRomHash); } + if (JoinPlayerIdx != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(JoinPlayerIdx); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -3641,6 +3611,9 @@ namespace AxibugProtobuf { if (other.GameRomHash.Length != 0) { GameRomHash = other.GameRomHash; } + if (other.JoinPlayerIdx != 0) { + JoinPlayerIdx = other.JoinPlayerIdx; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -3663,6 +3636,10 @@ namespace AxibugProtobuf { GameRomHash = input.ReadString(); break; } + case 24: { + JoinPlayerIdx = input.ReadInt32(); + break; + } } } #endif @@ -3685,6 +3662,10 @@ namespace AxibugProtobuf { GameRomHash = input.ReadString(); break; } + case 24: { + JoinPlayerIdx = input.ReadInt32(); + break; + } } } } @@ -4838,6 +4819,7 @@ namespace AxibugProtobuf { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public Protobuf_Room_WaitStep_RESP(Protobuf_Room_WaitStep_RESP other) : this() { waitStep_ = other.waitStep_; + loadStateRaw_ = other.loadStateRaw_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -4850,7 +4832,7 @@ namespace AxibugProtobuf { public const int WaitStepFieldNumber = 1; private int waitStep_; /// - ///状态 [0]等待主机上报即时存档 [1]要求准备 [2]开始(收到本状态时,立即开始跑模拟器核心) + ///状态 [0]等待主机上报即时存档 [1]要求客户端准备 [2]开始(收到本状态时,立即开始跑模拟器核心) /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int WaitStep { @@ -4860,6 +4842,20 @@ namespace AxibugProtobuf { } } + /// Field number for the "LoadStateRaw" field. + public const int LoadStateRawFieldNumber = 2; + private pb::ByteString loadStateRaw_ = pb::ByteString.Empty; + /// + ///如下是 WaitStep = 1 时,才有值。广播即时存档 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pb::ByteString LoadStateRaw { + get { return loadStateRaw_; } + set { + loadStateRaw_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as Protobuf_Room_WaitStep_RESP); @@ -4874,6 +4870,7 @@ namespace AxibugProtobuf { return true; } if (WaitStep != other.WaitStep) return false; + if (LoadStateRaw != other.LoadStateRaw) return false; return Equals(_unknownFields, other._unknownFields); } @@ -4881,6 +4878,7 @@ namespace AxibugProtobuf { public override int GetHashCode() { int hash = 1; if (WaitStep != 0) hash ^= WaitStep.GetHashCode(); + if (LoadStateRaw.Length != 0) hash ^= LoadStateRaw.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -4901,6 +4899,10 @@ namespace AxibugProtobuf { output.WriteRawTag(8); output.WriteInt32(WaitStep); } + if (LoadStateRaw.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(LoadStateRaw); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -4914,6 +4916,10 @@ namespace AxibugProtobuf { output.WriteRawTag(8); output.WriteInt32(WaitStep); } + if (LoadStateRaw.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(LoadStateRaw); + } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -4926,6 +4932,9 @@ namespace AxibugProtobuf { if (WaitStep != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(WaitStep); } + if (LoadStateRaw.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(LoadStateRaw); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -4940,6 +4949,9 @@ namespace AxibugProtobuf { if (other.WaitStep != 0) { WaitStep = other.WaitStep; } + if (other.LoadStateRaw.Length != 0) { + LoadStateRaw = other.LoadStateRaw; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -4958,6 +4970,10 @@ namespace AxibugProtobuf { WaitStep = input.ReadInt32(); break; } + case 18: { + LoadStateRaw = input.ReadBytes(); + break; + } } } #endif @@ -4976,6 +4992,10 @@ namespace AxibugProtobuf { WaitStep = input.ReadInt32(); break; } + case 18: { + LoadStateRaw = input.ReadBytes(); + break; + } } } } @@ -5012,7 +5032,6 @@ namespace AxibugProtobuf { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public Protobuf_Room_HostPlayer_UpdateStateRaw(Protobuf_Room_HostPlayer_UpdateStateRaw other) : this() { - readyFrame_ = other.readyFrame_; loadStateRaw_ = other.loadStateRaw_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -5022,22 +5041,8 @@ namespace AxibugProtobuf { return new Protobuf_Room_HostPlayer_UpdateStateRaw(this); } - /// Field number for the "ReadyFrame" field. - public const int ReadyFrameFieldNumber = 1; - private int readyFrame_; - /// - ///要求准备的帧数 (非即时存档则为0) - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int ReadyFrame { - get { return readyFrame_; } - set { - readyFrame_ = value; - } - } - /// Field number for the "LoadStateRaw" field. - public const int LoadStateRawFieldNumber = 2; + public const int LoadStateRawFieldNumber = 1; private pb::ByteString loadStateRaw_ = pb::ByteString.Empty; /// ///即时存档byte数据 @@ -5063,7 +5068,6 @@ namespace AxibugProtobuf { if (ReferenceEquals(other, this)) { return true; } - if (ReadyFrame != other.ReadyFrame) return false; if (LoadStateRaw != other.LoadStateRaw) return false; return Equals(_unknownFields, other._unknownFields); } @@ -5071,7 +5075,6 @@ namespace AxibugProtobuf { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; - if (ReadyFrame != 0) hash ^= ReadyFrame.GetHashCode(); if (LoadStateRaw.Length != 0) hash ^= LoadStateRaw.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); @@ -5089,12 +5092,8 @@ namespace AxibugProtobuf { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); #else - if (ReadyFrame != 0) { - output.WriteRawTag(8); - output.WriteInt32(ReadyFrame); - } if (LoadStateRaw.Length != 0) { - output.WriteRawTag(18); + output.WriteRawTag(10); output.WriteBytes(LoadStateRaw); } if (_unknownFields != null) { @@ -5106,12 +5105,8 @@ namespace AxibugProtobuf { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (ReadyFrame != 0) { - output.WriteRawTag(8); - output.WriteInt32(ReadyFrame); - } if (LoadStateRaw.Length != 0) { - output.WriteRawTag(18); + output.WriteRawTag(10); output.WriteBytes(LoadStateRaw); } if (_unknownFields != null) { @@ -5123,9 +5118,6 @@ namespace AxibugProtobuf { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; - if (ReadyFrame != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(ReadyFrame); - } if (LoadStateRaw.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeBytesSize(LoadStateRaw); } @@ -5140,9 +5132,6 @@ namespace AxibugProtobuf { if (other == null) { return; } - if (other.ReadyFrame != 0) { - ReadyFrame = other.ReadyFrame; - } if (other.LoadStateRaw.Length != 0) { LoadStateRaw = other.LoadStateRaw; } @@ -5160,11 +5149,7 @@ namespace AxibugProtobuf { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 8: { - ReadyFrame = input.ReadInt32(); - break; - } - case 18: { + case 10: { LoadStateRaw = input.ReadBytes(); break; } @@ -5182,11 +5167,7 @@ namespace AxibugProtobuf { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - case 8: { - ReadyFrame = input.ReadInt32(); - break; - } - case 18: { + case 10: { LoadStateRaw = input.ReadBytes(); break; } @@ -5197,6 +5178,142 @@ namespace AxibugProtobuf { } + public sealed partial class Protobuf_Room_HostPlayer_UpdateStateRaw_RESP : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Protobuf_Room_HostPlayer_UpdateStateRaw_RESP()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::AxibugProtobuf.ProtobufAxibugEmuOnlineReflection.Descriptor.MessageTypes[22]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Protobuf_Room_HostPlayer_UpdateStateRaw_RESP() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Protobuf_Room_HostPlayer_UpdateStateRaw_RESP(Protobuf_Room_HostPlayer_UpdateStateRaw_RESP other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Protobuf_Room_HostPlayer_UpdateStateRaw_RESP Clone() { + return new Protobuf_Room_HostPlayer_UpdateStateRaw_RESP(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as Protobuf_Room_HostPlayer_UpdateStateRaw_RESP); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(Protobuf_Room_HostPlayer_UpdateStateRaw_RESP other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(Protobuf_Room_HostPlayer_UpdateStateRaw_RESP other) { + if (other == null) { + return; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + } + } + } + #endif + + } + public sealed partial class Protobuf_Room_Player_Ready : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage @@ -5209,7 +5326,7 @@ namespace AxibugProtobuf { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { - get { return global::AxibugProtobuf.ProtobufAxibugEmuOnlineReflection.Descriptor.MessageTypes[22]; } + get { return global::AxibugProtobuf.ProtobufAxibugEmuOnlineReflection.Descriptor.MessageTypes[23]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] diff --git a/ProtobufCore/proto/protobuf_AxibugEmuOnline.proto b/ProtobufCore/proto/protobuf_AxibugEmuOnline.proto index 726ac9e..2610c63 100644 --- a/ProtobufCore/proto/protobuf_AxibugEmuOnline.proto +++ b/ProtobufCore/proto/protobuf_AxibugEmuOnline.proto @@ -20,7 +20,7 @@ enum CommandID //房间内相关 CMD_Room_Create = 5101; //房间创建 对应 Protobuf_Room_Create | Protobuf_Room_Create_RESP - CMD_Room_Join = 5105; //房间加入 对应 Protobuf_Room_Join | Protobuf_Room_Join_RESP + CMD_Room_Join = 5105; //房间加入 对应 Protobuf_Room_Join | Protobuf_Room_Join_RESP //建议Join之前按照房间信息,提前下载并读取本地Rom CMD_Room_Leave = 5106; //房间离开 对应 Protobuf_Room_Leave | Protobuf_Room_Leave_RESP CMD_Room_MyRoom_State_Changed = 5110; //我所在的房间内状态发生变化 对应 Protobuf_Room_MyRoom_State_Change @@ -45,12 +45,12 @@ enum CommandID // 重新从Step1走流程 // CMD_Room_WaitStep = 5201; //服务器等待Step通知 下行 Protobuf_Room_WaitStep_RESP - CMD_Room_HostPlayer_UpdateStateRaw = 5204; //服务器房间准备和开始标识 下行 Protobuf_Room_HostPlayer_UpdateStateRaw + CMD_Room_HostPlayer_UpdateStateRaw = 5204; //主机玩家上传即时存档 上行 | 下行 对应 Protobuf_Room_HostPlayer_UpdateStateRaw | Protobuf_Room_HostPlayer_UpdateStateRaw_RESP CMD_Room_Player_Ready = 5208; //玩家准备完毕 上行 Protobuf_Room_Player_Ready //游戏同步 CMD_Room_Singel_PlayerInput = 6010; //单个玩家操作同步上行 对应 Protobuf_Room_SinglePlayerInputData - CMD_ROOM_SYN = 6015; //单个玩家操作同步上行 对应 Protobuf_Room_Syn_RoomFrameAllInput + CMD_ROOM_SYN_PlayerInput = 6015; //单个玩家操作同步下行 对应 Protobuf_Room_Syn_RoomFrameAllInputData //画面采集 CMD_Screen = 7001; //画面采集 | 同步广播 对应 Protobuf_Screnn_Frame @@ -63,6 +63,8 @@ enum ErrorCode ERROR_ROOM_NOT_FOUND = 10;//房间不存在 ERROR_ROOM_SLOT_READLY_HAD_PLAYER=11;//加入目标位置已经有人 + + ERROR_ROOM_CANT_DO_CURR_STATE =50;//当前房间状态不允许本操作 } enum LoginType @@ -79,23 +81,22 @@ enum DeviceType PSV = 4; } -enum RoomPlayerState -{ - None_PlayerState = 0;//缺省 - OnlyP1 = 1; //仅P1 - OnlyP2 = 2; //仅P2 - BothOnline = 3; //玩家都在 -} +//enum RoomPlayerState +//{ +// None_PlayerState = 0;//缺省 +// OnlyP1 = 1; //仅P1 +// OnlyP2 = 2; //仅P2 +// BothOnline = 3; //玩家都在 +//} enum RoomGameState { None_GameState = 0;//缺省 OnlyHost = 1;//仅主机,待加入 - ReadyStep_0 = 2;//ReadyStep0 - ReadyStep_1 = 3;//ReadyStep1 - ReadyStep_2 = 4;//ReadyStep2 - Pause = 5;//暂停 - InGame = 6;//游戏中 + WaitRawUpdate = 2;//等待即时存档 + WaitReady = 3;//等待Ready + Pause = 4;//暂停 + InOnlineGame = 5;//联机中 } @@ -165,7 +166,6 @@ message Protobuf_Room_MiniInfo int32 RoomID = 1;//房间ID int32 GameRomID = 2;//游戏ID string GameRomHash = 3; - RoomPlayerState PlayerState = 4;//玩家加入状态 RoomGameState GameState = 5;//游戏状态 int32 ObsUserCount = 6;//观战用户数量 int64 Player1_UID = 7;//玩家1 UID @@ -193,7 +193,7 @@ message Protobuf_Room_SinglePlayerInputData uint32 InputData = 2;//单个玩家操作位运算汇总 } -message Protobuf_Room_Syn_RoomFrameAllInput +message Protobuf_Room_Syn_RoomFrameAllInputData { uint32 FrameID = 1;//帧编号 uint64 InputData = 2;//所有玩家操作位运算汇总 @@ -203,6 +203,7 @@ message Protobuf_Room_Create { int32 GameRomID = 1; string GameRomHash = 2; + int32 JoinPlayerIdx = 3;//P1~P4[0~3] 以几号位玩家创建房间 } message Protobuf_Room_Create_RESP @@ -239,13 +240,19 @@ message Protobuf_Room_MyRoom_State_Change message Protobuf_Room_WaitStep_RESP { - int32 WaitStep = 1;//状态 [0]等待主机上报即时存档 [1]要求准备 [2]开始(收到本状态时,立即开始跑模拟器核心) + int32 WaitStep = 1;//状态 [0]等待主机上报即时存档 [1]要求客户端准备 [2]开始(收到本状态时,立即开始跑模拟器核心) + + //如下是 WaitStep = 1 时,才有值。广播即时存档 + bytes LoadStateRaw = 2;//即时存档byte数据 } message Protobuf_Room_HostPlayer_UpdateStateRaw { - int32 ReadyFrame = 1;//要求准备的帧数 (非即时存档则为0) - bytes LoadStateRaw = 2;//即时存档byte数据 + bytes LoadStateRaw = 1;//即时存档byte数据 +} + +message Protobuf_Room_HostPlayer_UpdateStateRaw_RESP +{ } message Protobuf_Room_Player_Ready diff --git a/README_WEBAPI.md b/README_WEBAPI.md index a0c9842..793c50a 100644 --- a/README_WEBAPI.md +++ b/README_WEBAPI.md @@ -24,6 +24,7 @@ Response: "resultAllCount": 6, "gameList": [ { + "orderid": 0, "id": 190, "romName": "热血物语", "gType": "ACT", @@ -34,6 +35,7 @@ Response: "stars": 0 }, { + "orderid": 1, "id": 460, "romName": "热血时代剧(热血道中记)", "gType": "ACT", @@ -44,6 +46,7 @@ Response: "stars": 0 }, { + "orderid": 2, "id": 585, "romName": "热血硬派", "gType": "ACT", @@ -54,6 +57,7 @@ Response: "stars": 0 }, { + "orderid": 3, "id": 674, "romName": "热血物语(美版)", "gType": "ACT", @@ -64,6 +68,7 @@ Response: "stars": 0 }, { + "orderid": 4, "id": 826, "romName": "热血时代剧美版(热血道中记美版)", "gType": "ACT", @@ -118,6 +123,7 @@ Response: public class Resp_RomInfo { + public int orderid { get; set; } public int id { get; set; } public string romName { get; set;} public string gType { get; set; }