This commit is contained in:
ALIENJACK\alien 2024-09-12 13:43:07 +08:00
commit d2f48a56e7
19 changed files with 916 additions and 181 deletions

View File

@ -0,0 +1,220 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &5568161260996910275
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5353336693430589123}
- component: {fileID: 8076460496124549573}
m_Layer: 5
m_Name: XMBTopGroup
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5353336693430589123
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5568161260996910275}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 4195056312044822544}
- {fileID: 1746243318642131728}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: -34.35266}
m_SizeDelta: {x: 0, y: 68.7053}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &8076460496124549573
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5568161260996910275}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 2
m_Right: 2
m_Top: 8
m_Bottom: 0
m_ChildAlignment: 2
m_Spacing: 20
m_ChildForceExpandWidth: 0
m_ChildForceExpandHeight: 0
m_ChildControlWidth: 0
m_ChildControlHeight: 0
m_ChildScaleWidth: 1
m_ChildScaleHeight: 1
m_ReverseArrangement: 0
--- !u!1 &5629957813601835122
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1746243318642131728}
- component: {fileID: 3344265524197250960}
- component: {fileID: 9044910433836903452}
m_Layer: 5
m_Name: imgPower
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1746243318642131728
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5629957813601835122}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 5353336693430589123}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 78.5143, y: 57.882812}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3344265524197250960
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5629957813601835122}
m_CullTransparentMesh: 1
--- !u!114 &9044910433836903452
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5629957813601835122}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 6be323d57f32fb642a9b6ab663140ef5, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &7995691286082973795
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4195056312044822544}
- component: {fileID: 2824301762730404849}
- component: {fileID: 8650011087057002385}
m_Layer: 5
m_Name: txtDateTime
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4195056312044822544
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7995691286082973795}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 5353336693430589123}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 254.3097, y: 53}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2824301762730404849
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7995691286082973795}
m_CullTransparentMesh: 1
--- !u!114 &8650011087057002385
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7995691286082973795}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 47
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 55
m_Alignment: 5
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: 9/12 22:42

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 3b211f31b55a35e44a8fa38666f63383
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -12,11 +12,11 @@ namespace AxibugEmuOnline.Client.ClientCore
public static string IP;
public static int Port;
public static LogManager log;
public static NetworkHelper networkHelper;
public static NetworkHelper network;
public static AppLogin login;
public static AppChat chat;
public static UserDataManager user;
public static AppNetGame netgame;
//public static AppNetGame netgame;
public static AppEmu emu;
public static RomLib nesRomLib;
public static HttpAPI httpAPI;
@ -33,12 +33,12 @@ namespace AxibugEmuOnline.Client.ClientCore
{
log = new LogManager();
LogManager.OnLog += OnNoSugarNetLog;
networkHelper = new NetworkHelper();
network = new NetworkHelper();
login = new AppLogin();
chat = new AppChat();
user = new UserDataManager();
emu = new AppEmu();
netgame = new AppNetGame();
//netgame = new AppNetGame();
httpAPI = new HttpAPI();
nesRomLib = new RomLib(EnumPlatform.NES);
CacheMgr = new CacheManager();
@ -78,7 +78,7 @@ namespace AxibugEmuOnline.Client.ClientCore
public static bool Connect(string IP, int port)
{
return networkHelper.Init(IP, port);
return network.Init(IP, port);
}
public static void Close()

View File

@ -19,7 +19,7 @@ namespace AxibugEmuOnline.Client.Manager
{
ChatMsg = ChatMsg,
};
App.networkHelper.SendToServer((int)CommandID.CmdChatmsg, ProtoBufHelper.Serizlize(msg));
App.network.SendToServer((int)CommandID.CmdChatmsg, ProtoBufHelper.Serizlize(msg));
}
public void RecvChatMsg(byte[] reqData)

View File

@ -26,7 +26,7 @@ namespace AxibugEmuOnline.Client.Manager
LoginType = 0,
Account = App.user.userdata.Account,
};
App.networkHelper.SendToServer((int)CommandID.CmdLogin, ProtoBufHelper.Serizlize(msg));
App.network.SendToServer((int)CommandID.CmdLogin, ProtoBufHelper.Serizlize(msg));
}
public void RecvLoginMsg(byte[] reqData)

View File

@ -24,7 +24,7 @@ namespace AxibugEmuOnline.Client.Manager
byte[] comData = Helper.CompressByteArray(RenderBuffer);
_Protobuf_Screnn_Frame.FrameID = 0;
_Protobuf_Screnn_Frame.RawBitmap = ByteString.CopyFrom(comData);
App.networkHelper.SendToServer((int)CommandID.CmdScreen, ProtoBufHelper.Serizlize(_Protobuf_Screnn_Frame));
App.network.SendToServer((int)CommandID.CmdScreen, ProtoBufHelper.Serizlize(_Protobuf_Screnn_Frame));
}
public void OnScreen(byte[] reqData)

View File

@ -130,7 +130,7 @@ namespace AxibugEmuOnline.Client.Manager
public void SendGetRoomList()
{
App.log.Info("拉取房间列表");
App.networkHelper.SendToServer((int)CommandID.CmdRoomList, ProtoBufHelper.Serizlize(_Protobuf_Room_List));
App.network.SendToServer((int)CommandID.CmdRoomList, ProtoBufHelper.Serizlize(_Protobuf_Room_List));
}
/// <summary>
@ -170,7 +170,7 @@ namespace AxibugEmuOnline.Client.Manager
_Protobuf_Room_Create.GameRomID = GameRomID;
_Protobuf_Room_Create.GameRomHash = GameRomHash;
App.log.Info($"创建房间");
App.networkHelper.SendToServer((int)CommandID.CmdRoomCreate, ProtoBufHelper.Serizlize(_Protobuf_Room_Create));
App.network.SendToServer((int)CommandID.CmdRoomCreate, ProtoBufHelper.Serizlize(_Protobuf_Room_Create));
}
/// <summary>
@ -195,7 +195,7 @@ namespace AxibugEmuOnline.Client.Manager
_Protobuf_Room_Join.RoomID = RoomID;
_Protobuf_Room_Join.PlayerNum = JoinPlayerIdx;
App.log.Info($"创建房间");
App.networkHelper.SendToServer((int)CommandID.CmdRoomJoin, ProtoBufHelper.Serizlize(_Protobuf_Room_Join));
App.network.SendToServer((int)CommandID.CmdRoomJoin, ProtoBufHelper.Serizlize(_Protobuf_Room_Join));
}
/// <summary>
@ -219,7 +219,7 @@ namespace AxibugEmuOnline.Client.Manager
{
_Protobuf_Room_Leave.RoomID = RoomID;
App.log.Info($"创建房间");
App.networkHelper.SendToServer((int)CommandID.CmdRoomLeave, ProtoBufHelper.Serizlize(_Protobuf_Room_Leave));
App.network.SendToServer((int)CommandID.CmdRoomLeave, ProtoBufHelper.Serizlize(_Protobuf_Room_Leave));
}
/// <summary>
@ -272,7 +272,7 @@ namespace AxibugEmuOnline.Client.Manager
LoadStateRaw = Google.Protobuf.ByteString.CopyFrom(compressRawData)
};
App.log.Info($"上报即时存档数据 原数据大小:{RawData.Length},压缩后;{compressRawData.Length}");
App.networkHelper.SendToServer((int)CommandID.CmdRoomHostPlayerUpdateStateRaw, ProtoBufHelper.Serizlize(msg));
App.network.SendToServer((int)CommandID.CmdRoomHostPlayerUpdateStateRaw, ProtoBufHelper.Serizlize(msg));
}
void RecvRoom_WaitStep(byte[] reqData)
@ -303,7 +303,7 @@ namespace AxibugEmuOnline.Client.Manager
public void SendRoomPlayerReady()
{
App.log.Debug("上报准备完毕");
App.networkHelper.SendToServer((int)CommandID.CmdRoomPlayerReady, ProtoBufHelper.Serizlize(_Protobuf_Room_Player_Ready));
App.network.SendToServer((int)CommandID.CmdRoomPlayerReady, ProtoBufHelper.Serizlize(_Protobuf_Room_Player_Ready));
}
/// <summary>
@ -313,7 +313,7 @@ namespace AxibugEmuOnline.Client.Manager
{
_Protobuf_Room_SinglePlayerInputData.FrameID = FrameID;
_Protobuf_Room_SinglePlayerInputData.InputData = InputData;
App.networkHelper.SendToServer((int)CommandID.CmdRoomSingelPlayerInput, ProtoBufHelper.Serizlize(_Protobuf_Room_SinglePlayerInputData));
App.network.SendToServer((int)CommandID.CmdRoomSingelPlayerInput, ProtoBufHelper.Serizlize(_Protobuf_Room_SinglePlayerInputData));
}

View File

@ -1,5 +1,4 @@
using AxibugEmuOnline.Client.ClientCore;
using Codice.Client.Common;
using System;
using System.Collections.Generic;
using System.IO;

View File

@ -18,7 +18,7 @@ namespace AxibugEmuOnline.Client.Manager
public UserDataManager()
{
//注册重连成功事件,以便后续自动登录
App.networkHelper.OnReConnected += OnReConnected;
App.network.OnReConnected += OnReConnected;
}
public MainUserDataBase userdata { get; private set; } = new MainUserDataBase();
public bool IsLoggedIn => userdata.IsLoggedIn;

View File

@ -1,6 +1,7 @@
using AxibugEmuOnline.Client.ClientCore;
using HaoYueNet.ClientNetworkNet.Standard2;
using System;
using System.Net.Sockets;
using System.Threading;
namespace AxibugEmuOnline.Client.Network
@ -26,6 +27,7 @@ namespace AxibugEmuOnline.Client.Network
/// 重连成功事件
/// </summary>
public event OnReConnectedHandler OnReConnected;
public bool isConnected => CheckIsConnectd();
/// <summary>
/// 是否自动重连
/// </summary>
@ -93,6 +95,7 @@ namespace AxibugEmuOnline.Client.Network
{
NetworkDeBugLog("OnConnectClose");
App.user.LoginOutData();
//自动重连开关
if (bAutoReConnect)
@ -127,5 +130,13 @@ namespace AxibugEmuOnline.Client.Network
} while (!bflagDone);
bInReConnecting = false;
}
bool CheckIsConnectd()
{
Socket socket = GetClientSocket();
if(socket == null)
return false;
return socket.Connected;
}
}
}

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_LastSelectedProfileId>G:\Sin365\AxibugEmuOnline\AxibugEmuOnline.Server\AxibugEmuOnline.Server\Properties\PublishProfiles\FolderProfile.pubxml</_LastSelectedProfileId>
<_LastSelectedProfileId>G:\Sin365\AxibugEmuOnline\AxibugEmuOnline.Server\Properties\PublishProfiles\FolderProfile.pubxml</_LastSelectedProfileId>
</PropertyGroup>
</Project>

View File

@ -14,7 +14,6 @@ namespace AxibugEmuOnline.Server
public static ChatManager g_Chat;
public static IOCPNetWork g_SocketMgr;
public static RoomManager g_Room;
public static GameManager g_Game;
public static void InitServer(int port)
{
@ -27,7 +26,6 @@ namespace AxibugEmuOnline.Server
//g_SocketMgr = new IOCPNetWork(1024, 1024);
g_SocketMgr = new IOCPNetWork(1024, 4096);
g_Room = new RoomManager();
g_Game = new GameManager();
g_SocketMgr.Init();
g_SocketMgr.Start(new IPEndPoint(IPAddress.Any.Address, port));

View File

@ -19,7 +19,11 @@ namespace AxibugEmuOnline.Server.Manager
public TimeSpan LastStartPingTime { get; set; }
public int LastPingSeed { get; set; }
public double NetDelay { get; set; }
public double AveNetDelay { get; set; }
public double MinNetDelay { get; set; }
public double MaxNetDelay { get; set; }
public List<double> NetDelays { get; set; } = new List<double>();
public const int NetAveDelayCount = 3;
}
public class UserRoomState
@ -31,7 +35,7 @@ namespace AxibugEmuOnline.Server.Manager
ClearRoomData();
}
public void SetRoomData(int roomID,int playerIdx)
public void SetRoomData(int roomID, int playerIdx)
{
RoomID = roomID;
PlayerIdx = playerIdx;
@ -280,7 +284,21 @@ namespace AxibugEmuOnline.Server.Manager
{
TimeSpan current = AppSrv.g_Tick.sw.Elapsed;
TimeSpan delta = current - _c.LastStartPingTime;
_c.NetDelay = delta.TotalSeconds;
_c.NetDelays.Add(delta.TotalSeconds);
while (_c.NetDelays.Count > ClientInfo.NetAveDelayCount)
_c.NetDelays.RemoveAt(0);
double tempMin = double.MaxValue;
double tempMax = double.MinValue;
for (int i = 0; i < _c.NetDelays.Count; i++)
{
tempMin = Math.Min(_c.NetDelays[i], tempMin);
tempMax = Math.Max(_c.NetDelays[i], tempMax);
}
_c.MinNetDelay = tempMin;
_c.MaxNetDelay = tempMax;
_c.AveNetDelay = _c.NetDelays.Average(w => w);
}
}
#endregion
@ -290,7 +308,7 @@ namespace AxibugEmuOnline.Server.Manager
ClientSend(ClientList, CMDID, ERRCODE, data, SkipUID);
}
public void ClientSend(List<long> UIDs,int CMDID, int ERRCODE, byte[] data, long SkipUID = -1)
public void ClientSend(List<long> UIDs, int CMDID, int ERRCODE, byte[] data, long SkipUID = -1)
{
for (int i = 0; i < UIDs.Count(); i++)
{
@ -307,14 +325,14 @@ namespace AxibugEmuOnline.Server.Manager
/// <param name="CMDID"></param>
/// <param name="ERRCODE"></param>
/// <param name="data"></param>
public void ClientSend(List<ClientInfo> _toclientlist, int CMDID, int ERRCODE, byte[] data,long SkipUID = -1)
public void ClientSend(List<ClientInfo> _toclientlist, int CMDID, int ERRCODE, byte[] data, long SkipUID = -1)
{
for (int i = 0; i < _toclientlist.Count(); i++)
{
if (_toclientlist[i] == null || _toclientlist[i].IsOffline)
continue;
if(SkipUID > -1 && _toclientlist[i].UID == SkipUID)
if (SkipUID > -1 && _toclientlist[i].UID == SkipUID)
continue;
AppSrv.g_SocketMgr.SendToSocket(_toclientlist[i]._socket, CMDID, ERRCODE, data);

View File

@ -1,36 +0,0 @@
using AxibugEmuOnline.Server.Common;
using AxibugEmuOnline.Server.Manager;
using AxibugEmuOnline.Server.NetWork;
using AxibugProtobuf;
using System.Net.Sockets;
namespace AxibugEmuOnline.Server
{
public class GameManager
{
public GameManager()
{
NetMsg.Instance.RegNetMsgEvent((int)CommandID.CmdScreen, OnCmdScreen);
}
public void OnCmdScreen(Socket sk, byte[] reqData)
{
AppSrv.g_Log.Debug($"OnCmdScreen lenght:{reqData.Length}");
ClientInfo _c = AppSrv.g_ClientMgr.GetClientForSocket(sk);
Protobuf_Screnn_Frame msg = ProtoBufHelper.DeSerizlize<Protobuf_Screnn_Frame>(reqData);
Data_RoomData room = AppSrv.g_Room.GetRoomData(msg.RoomID);
if (room == null)
{
AppSrv.g_ClientMgr.ClientSend(_c,(int)CommandID.CmdScreen, (int)ErrorCode.ErrorRoomNotFound, new byte[1]);
return;
}
List<ClientInfo> userlist = room.GetAllPlayerClientList();
AppSrv.g_ClientMgr.ClientSend(userlist, (int)CommandID.CmdScreen, (int)ErrorCode.ErrorOk, reqData, _c.UID);
}
}
}

View File

@ -26,6 +26,10 @@ namespace AxibugEmuOnline.Server
NetMsg.Instance.RegNetMsgEvent((int)CommandID.CmdRoomHostPlayerUpdateStateRaw, OnHostPlayerUpdateStateRaw);
NetMsg.Instance.RegNetMsgEvent((int)CommandID.CmdRoomPlayerReady, OnRoomPlayerReady);
NetMsg.Instance.RegNetMsgEvent((int)CommandID.CmdRoomSingelPlayerInput, OnSingelPlayerInput);
NetMsg.Instance.RegNetMsgEvent((int)CommandID.CmdScreen, OnCmdScreen);
roomTickARE = AppSrv.g_Tick.AddNewARE(TickManager.TickType.Interval_16MS);
threadRoomTick = new Thread(UpdateLoopTick);
threadRoomTick.Start();
@ -64,7 +68,7 @@ namespace AxibugEmuOnline.Server
public Data_RoomData GetRoomData(int RoomID)
{
if (!mDictRoom.TryGetValue(RoomID,out Data_RoomData data))
if (!mDictRoom.TryGetValue(RoomID, out Data_RoomData data))
return null;
return data;
}
@ -91,10 +95,14 @@ namespace AxibugEmuOnline.Server
GameRomID = room.GameRomID,
RoomID = room.RoomID,
GameRomHash = room.RomHash,
ScreenProviderUID = room.ScreenProviderUID,
HostPlayerUID = room.HostUID,
GameState = room.GameState,
ObsUserCount = 0,//TODO
Player1UID = room.Player1_UID,
Player2UID = room.Player2_UID,
Player3UID = room.Player3_UID,
Player4UID = room.Player4_UID,
};
if (result.Player1UID >= 0 && AppSrv.g_ClientMgr.GetClientByUID(result.Player1UID, out ClientInfo _c1))
@ -103,6 +111,12 @@ namespace AxibugEmuOnline.Server
if (result.Player2UID >= 0 && AppSrv.g_ClientMgr.GetClientByUID(result.Player2UID, out ClientInfo _c2))
result.Player2NickName = _c2.NickName;
if (result.Player3UID >= 0 && AppSrv.g_ClientMgr.GetClientByUID(result.Player1UID, out ClientInfo _c3))
result.Player3NickName = _c3.NickName;
if (result.Player4UID >= 0 && AppSrv.g_ClientMgr.GetClientByUID(result.Player2UID, out ClientInfo _c4))
result.Player4NickName = _c4.NickName;
return result;
}
@ -147,7 +161,7 @@ namespace AxibugEmuOnline.Server
Protobuf_Room_Create_RESP resp = new Protobuf_Room_Create_RESP();
Data_RoomData newRoom = new Data_RoomData();
newRoom.Init(GetNewRoomID(), msg.GameRomID, msg.GameRomHash);
newRoom.Init(GetNewRoomID(), msg.GameRomID, msg.GameRomHash, _c.UID);
AddRoom(newRoom);
ErrorCode joinErrcode = ErrorCode.ErrorOk;
//加入
@ -201,7 +215,7 @@ namespace AxibugEmuOnline.Server
if (room == null)
errcode = ErrorCode.ErrorRoomNotFound;
else
{
{
if (room.Leave(_c, out errcode, out bHadRoomStateChange))
{
resp.RoomID = msg.RoomID;
@ -259,6 +273,15 @@ namespace AxibugEmuOnline.Server
room.SetPlayerInput(_c.RoomState.PlayerIdx, msg.FrameID, (ushort)msg.InputData);
}
public void OnCmdScreen(Socket sk, byte[] reqData)
{
AppSrv.g_Log.Debug($"OnCmdScreen lenght:{reqData.Length}");
ClientInfo _c = AppSrv.g_ClientMgr.GetClientForSocket(sk);
Protobuf_Screnn_Frame msg = ProtoBufHelper.DeSerizlize<Protobuf_Screnn_Frame>(reqData);
Data_RoomData room = AppSrv.g_Room.GetRoomData(msg.RoomID);
room.InputScreenData(msg.RawBitmap);
}
/// <summary>
/// 广播房间状态变化
/// </summary>
@ -318,6 +341,8 @@ namespace AxibugEmuOnline.Server
}
}
#region
void UpdateLoopTick()
{
@ -332,7 +357,7 @@ namespace AxibugEmuOnline.Server
for (int i = 0; i < mKeyRoomList.Count; i++)
{
int roomid = mKeyRoomList[i];
if (!mDictRoom.TryGetValue(roomid,out Data_RoomData room))
if (!mDictRoom.TryGetValue(roomid, out Data_RoomData room))
continue;
if (room.GameState < RoomGameState.InOnlineGame)
continue;
@ -350,11 +375,14 @@ namespace AxibugEmuOnline.Server
public int RoomID { get; private set; }
public int GameRomID { get; private set; }
public string RomHash { get; private set; }
public long HostUID { get; private set; }
public long ScreenProviderUID { get; private 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 Google.Protobuf.ByteString? ScreenRaw { get; private set; }
public bool[] PlayerReadyState { get; private set; }
public List<long> SynUIDs;
@ -404,11 +432,13 @@ namespace AxibugEmuOnline.Server
return Ready;
}
public void Init(int roomID, int gameRomID, string roomHash, bool bloadState = false)
public void Init(int roomID, int gameRomID, string roomHash, long hostUId, bool bloadState = false)
{
RoomID = roomID;
GameRomID = gameRomID;
RomHash = roomHash;
HostUID = hostUId;
ScreenProviderUID = hostUId;
Player1_UID = -1;
Player2_UID = -1;
Player3_UID = -1;
@ -421,7 +451,7 @@ namespace AxibugEmuOnline.Server
mDictPlayerIdx2SendQueue = new Dictionary<int, Queue<byte[]>>();
}
public void SetPlayerUID(int PlayerIdx,ClientInfo _c)
public void SetPlayerUID(int PlayerIdx, ClientInfo _c)
{
long oldUID = -1;
switch (PlayerIdx)
@ -431,9 +461,9 @@ namespace AxibugEmuOnline.Server
case 2: oldUID = Player3_UID; Player3_UID = _c.UID; break;
case 3: oldUID = Player4_UID; Player4_UID = _c.UID; break;
}
if(oldUID <= 0)
if (oldUID <= 0)
SynUIDs.Remove(oldUID);
SynUIDs.Add(_c.UID);
SynUIDs.Add(_c.UID);
_c.RoomState.SetRoomData(this.RoomID, PlayerIdx);
}
@ -442,10 +472,10 @@ namespace AxibugEmuOnline.Server
int PlayerIdx = GetPlayerIdx(_c);
switch (PlayerIdx)
{
case 0: Player1_UID = -1; SynUIDs.Remove(_c.UID);break;
case 1: Player2_UID = -1; SynUIDs.Remove(_c.UID);break;
case 2: Player3_UID = -1; SynUIDs.Remove(_c.UID);break;
case 3: Player4_UID = -1; SynUIDs.Remove(_c.UID);break;
case 0: Player1_UID = -1; SynUIDs.Remove(_c.UID); break;
case 1: Player2_UID = -1; SynUIDs.Remove(_c.UID); break;
case 2: Player3_UID = -1; SynUIDs.Remove(_c.UID); break;
case 3: Player4_UID = -1; SynUIDs.Remove(_c.UID); break;
}
_c.RoomState.ClearRoomData();
}
@ -488,6 +518,8 @@ namespace AxibugEmuOnline.Server
List<long> list = new List<long>();
if (Player1_UID > 0) list.Add(Player1_UID);
if (Player2_UID > 0) list.Add(Player2_UID);
if (Player3_UID > 0) list.Add(Player3_UID);
if (Player4_UID > 0) list.Add(Player4_UID);
return list;
}
@ -508,7 +540,7 @@ namespace AxibugEmuOnline.Server
return list;
}
public void SetPlayerInput(int PlayerIdx,long mFrameID,ushort input)
public void SetPlayerInput(int PlayerIdx, long mFrameID, ushort input)
{
switch (PlayerIdx)
{
@ -550,7 +582,7 @@ namespace AxibugEmuOnline.Server
for (int i = 0; i < playerlist.Count; i++)
{
ClientInfo player = playerlist[i];
maxNetDelay = Math.Max(maxNetDelay, player.NetDelay);
maxNetDelay = Math.Max(maxNetDelay, player.AveNetDelay);
}
mCurrFrameId = 0;
@ -581,7 +613,7 @@ namespace AxibugEmuOnline.Server
FrameID = data.frameId,
InputData = data.inputdata.all
};
AppSrv.g_ClientMgr.ClientSend(SynUIDs,(int)CommandID.CmdRoomSynPlayerInput, (int)ErrorCode.ErrorOk, ProtoBufHelper.Serizlize(resp));
AppSrv.g_ClientMgr.ClientSend(SynUIDs, (int)CommandID.CmdRoomSynPlayerInput, (int)ErrorCode.ErrorOk, ProtoBufHelper.Serizlize(resp));
}
}
@ -595,7 +627,7 @@ namespace AxibugEmuOnline.Server
/// <param name="_c"></param>
/// <param name="errcode"></param>
/// <returns></returns>
public bool Join(int PlayerNum, ClientInfo _c, out ErrorCode errcode,out bool bHadRoomStateChange)
public bool Join(int PlayerNum, ClientInfo _c, out ErrorCode errcode, out bool bHadRoomStateChange)
{
bHadRoomStateChange = false;
int oldPlayerCount = GetPlayerCount();
@ -713,6 +745,11 @@ namespace AxibugEmuOnline.Server
int newPlayerCount = GetPlayerCount();
bHadRoomStateChange = CheckRoomStateChange(oldPlayerCount, newPlayerCount);
}
public void InputScreenData(Google.Protobuf.ByteString screenRaw)
{
this.ScreenRaw = NextStateRaw;
}
}
[StructLayout(LayoutKind.Explicit)]

View File

@ -4,7 +4,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<History>True|2024-06-28T08:25:59.3159172Z;True|2024-06-28T15:30:49.8257235+08:00;</History>
<History>True|2024-09-12T05:38:45.0141937Z||;False|2024-09-12T13:37:57.6131232+08:00||;True|2024-06-28T16:25:59.3159172+08:00||;True|2024-06-28T15:30:49.8257235+08:00||;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>

View File

@ -38,55 +38,59 @@ namespace AxibugProtobuf {
"b3RvYnVmLkxvZ2luUmVzdWx0U3RhdHVzEgsKA1VJRBgGIAEoAyIUChJQcm90",
"b2J1Zl9Sb29tX0xpc3QiWwoXUHJvdG9idWZfUm9vbV9MaXN0X1JFU1ASQAoQ",
"Um9vbU1pbmlJbmZvTGlzdBgBIAMoCzImLkF4aWJ1Z1Byb3RvYnVmLlByb3Rv",
"YnVmX1Jvb21fTWluaUluZm8i9gEKFlByb3RvYnVmX1Jvb21fTWluaUluZm8S",
"YnVmX1Jvb21fTWluaUluZm8ihgMKFlByb3RvYnVmX1Jvb21fTWluaUluZm8S",
"DgoGUm9vbUlEGAEgASgFEhEKCUdhbWVSb21JRBg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RQbGF5",
"ZXJfVXBkYXRlU3RhdGVSYXcQ1CgSGgoVQ01EX1Jvb21fUGxheWVyX1JlYWR5",
"ENgoEiAKG0NNRF9Sb29tX1NpbmdlbF9QbGF5ZXJJbnB1dBD6LhIdChhDTURf",
"Uk9PTV9TWU5fUGxheWVySW5wdXQQ/y4SDwoKQ01EX1NjcmVlbhDZNiqPAQoJ",
"RXJyb3JDb2RlEhAKDEVSUk9SX0RFRkFVTBAAEgwKCEVSUk9SX09LEAESGAoU",
"RVJST1JfUk9PTV9OT1RfRk9VTkQQChIlCiFFUlJPUl9ST09NX1NMT1RfUkVB",
"RExZX0hBRF9QTEFZRVIQCxIhCh1FUlJPUl9ST09NX0NBTlRfRE9fQ1VSUl9T",
"VEFURRAyKhwKCUxvZ2luVHlwZRIPCgtCYXNlRGVmYXVsdBAAKksKCkRldmlj",
"ZVR5cGUSFgoSRGV2aWNlVHlwZV9EZWZhdWx0EAASBgoCUEMQARILCgdBbmRy",
"b2lkEAISBwoDSU9TEAMSBwoDUFNWEAQqcAoNUm9vbUdhbWVTdGF0ZRISCg5O",
"b25lX0dhbWVTdGF0ZRAAEgwKCE9ubHlIb3N0EAESEQoNV2FpdFJhd1VwZGF0",
"ZRACEg0KCVdhaXRSZWFkeRADEgkKBVBhdXNlEAQSEAoMSW5PbmxpbmVHYW1l",
"EAUqTgoRTG9naW5SZXN1bHRTdGF0dXMSIQodTG9naW5SZXN1bHRTdGF0dXNf",
"QmFzZURlZmF1bHQQABIGCgJPSxABEg4KCkFjY291bnRFcnIQAkICSAFiBnBy",
"b3RvMw=="));
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.RoomGameState), typeof(global::AxibugProtobuf.LoginResultStatus), }, null, new pbr::GeneratedClrTypeInfo[] {
@ -98,7 +102,7 @@ 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", "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", "HostPlayerUID", "GameState", "ObsUserCount", "Player1UID", "Player1NickName", "Player2UID", "Player2NickName", "Player3UID", "Player3NickName", "Player4UID", "Player4NickName", "ScreenProviderUID" }, 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),
@ -200,7 +204,7 @@ namespace AxibugProtobuf {
/// </summary>
[pbr::OriginalName("CMD_Room_Singel_PlayerInput")] CmdRoomSingelPlayerInput = 6010,
/// <summary>
///单个玩家操作同步下行 对应 Protobuf_Room_Syn_RoomFrameAllInputData
///所有玩家操作同步下行 对应 Protobuf_Room_Syn_RoomFrameAllInputData
/// </summary>
[pbr::OriginalName("CMD_ROOM_SYN_PlayerInput")] CmdRoomSynPlayerInput = 6015,
/// <summary>
@ -2070,12 +2074,18 @@ namespace AxibugProtobuf {
roomID_ = other.roomID_;
gameRomID_ = other.gameRomID_;
gameRomHash_ = other.gameRomHash_;
hostPlayerUID_ = other.hostPlayerUID_;
gameState_ = other.gameState_;
obsUserCount_ = other.obsUserCount_;
player1UID_ = other.player1UID_;
player1NickName_ = other.player1NickName_;
player2UID_ = other.player2UID_;
player2NickName_ = other.player2NickName_;
player3UID_ = other.player3UID_;
player3NickName_ = other.player3NickName_;
player4UID_ = other.player4UID_;
player4NickName_ = other.player4NickName_;
screenProviderUID_ = other.screenProviderUID_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
@ -2123,6 +2133,20 @@ namespace AxibugProtobuf {
}
}
/// <summary>Field number for the "HostPlayerUID" field.</summary>
public const int HostPlayerUIDFieldNumber = 4;
private long hostPlayerUID_;
/// <summary>
///主机玩家ID
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public long HostPlayerUID {
get { return hostPlayerUID_; }
set {
hostPlayerUID_ = value;
}
}
/// <summary>Field number for the "GameState" field.</summary>
public const int GameStateFieldNumber = 5;
private global::AxibugProtobuf.RoomGameState gameState_ = global::AxibugProtobuf.RoomGameState.NoneGameState;
@ -2207,6 +2231,76 @@ namespace AxibugProtobuf {
}
}
/// <summary>Field number for the "Player3_UID" field.</summary>
public const int Player3UIDFieldNumber = 11;
private long player3UID_;
/// <summary>
///玩家3 UID
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public long Player3UID {
get { return player3UID_; }
set {
player3UID_ = value;
}
}
/// <summary>Field number for the "Player3_NickName" field.</summary>
public const int Player3NickNameFieldNumber = 12;
private string player3NickName_ = "";
/// <summary>
///玩家3 昵称
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Player3NickName {
get { return player3NickName_; }
set {
player3NickName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "Player4_UID" field.</summary>
public const int Player4UIDFieldNumber = 13;
private long player4UID_;
/// <summary>
///玩家4 UID
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public long Player4UID {
get { return player4UID_; }
set {
player4UID_ = value;
}
}
/// <summary>Field number for the "Player4_NickName" field.</summary>
public const int Player4NickNameFieldNumber = 14;
private string player4NickName_ = "";
/// <summary>
///玩家4 昵称
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Player4NickName {
get { return player4NickName_; }
set {
player4NickName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "ScreenProviderUID" field.</summary>
public const int ScreenProviderUIDFieldNumber = 15;
private long screenProviderUID_;
/// <summary>
///屏幕数据供应者
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public long ScreenProviderUID {
get { return screenProviderUID_; }
set {
screenProviderUID_ = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as Protobuf_Room_MiniInfo);
@ -2223,12 +2317,18 @@ namespace AxibugProtobuf {
if (RoomID != other.RoomID) return false;
if (GameRomID != other.GameRomID) return false;
if (GameRomHash != other.GameRomHash) return false;
if (HostPlayerUID != other.HostPlayerUID) return false;
if (GameState != other.GameState) return false;
if (ObsUserCount != other.ObsUserCount) return false;
if (Player1UID != other.Player1UID) return false;
if (Player1NickName != other.Player1NickName) return false;
if (Player2UID != other.Player2UID) return false;
if (Player2NickName != other.Player2NickName) return false;
if (Player3UID != other.Player3UID) return false;
if (Player3NickName != other.Player3NickName) return false;
if (Player4UID != other.Player4UID) return false;
if (Player4NickName != other.Player4NickName) return false;
if (ScreenProviderUID != other.ScreenProviderUID) return false;
return Equals(_unknownFields, other._unknownFields);
}
@ -2238,12 +2338,18 @@ namespace AxibugProtobuf {
if (RoomID != 0) hash ^= RoomID.GetHashCode();
if (GameRomID != 0) hash ^= GameRomID.GetHashCode();
if (GameRomHash.Length != 0) hash ^= GameRomHash.GetHashCode();
if (HostPlayerUID != 0L) hash ^= HostPlayerUID.GetHashCode();
if (GameState != global::AxibugProtobuf.RoomGameState.NoneGameState) hash ^= GameState.GetHashCode();
if (ObsUserCount != 0) hash ^= ObsUserCount.GetHashCode();
if (Player1UID != 0L) hash ^= Player1UID.GetHashCode();
if (Player1NickName.Length != 0) hash ^= Player1NickName.GetHashCode();
if (Player2UID != 0L) hash ^= Player2UID.GetHashCode();
if (Player2NickName.Length != 0) hash ^= Player2NickName.GetHashCode();
if (Player3UID != 0L) hash ^= Player3UID.GetHashCode();
if (Player3NickName.Length != 0) hash ^= Player3NickName.GetHashCode();
if (Player4UID != 0L) hash ^= Player4UID.GetHashCode();
if (Player4NickName.Length != 0) hash ^= Player4NickName.GetHashCode();
if (ScreenProviderUID != 0L) hash ^= ScreenProviderUID.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
@ -2272,6 +2378,10 @@ namespace AxibugProtobuf {
output.WriteRawTag(26);
output.WriteString(GameRomHash);
}
if (HostPlayerUID != 0L) {
output.WriteRawTag(32);
output.WriteInt64(HostPlayerUID);
}
if (GameState != global::AxibugProtobuf.RoomGameState.NoneGameState) {
output.WriteRawTag(40);
output.WriteEnum((int) GameState);
@ -2296,6 +2406,26 @@ namespace AxibugProtobuf {
output.WriteRawTag(82);
output.WriteString(Player2NickName);
}
if (Player3UID != 0L) {
output.WriteRawTag(88);
output.WriteInt64(Player3UID);
}
if (Player3NickName.Length != 0) {
output.WriteRawTag(98);
output.WriteString(Player3NickName);
}
if (Player4UID != 0L) {
output.WriteRawTag(104);
output.WriteInt64(Player4UID);
}
if (Player4NickName.Length != 0) {
output.WriteRawTag(114);
output.WriteString(Player4NickName);
}
if (ScreenProviderUID != 0L) {
output.WriteRawTag(120);
output.WriteInt64(ScreenProviderUID);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
@ -2317,6 +2447,10 @@ namespace AxibugProtobuf {
output.WriteRawTag(26);
output.WriteString(GameRomHash);
}
if (HostPlayerUID != 0L) {
output.WriteRawTag(32);
output.WriteInt64(HostPlayerUID);
}
if (GameState != global::AxibugProtobuf.RoomGameState.NoneGameState) {
output.WriteRawTag(40);
output.WriteEnum((int) GameState);
@ -2341,6 +2475,26 @@ namespace AxibugProtobuf {
output.WriteRawTag(82);
output.WriteString(Player2NickName);
}
if (Player3UID != 0L) {
output.WriteRawTag(88);
output.WriteInt64(Player3UID);
}
if (Player3NickName.Length != 0) {
output.WriteRawTag(98);
output.WriteString(Player3NickName);
}
if (Player4UID != 0L) {
output.WriteRawTag(104);
output.WriteInt64(Player4UID);
}
if (Player4NickName.Length != 0) {
output.WriteRawTag(114);
output.WriteString(Player4NickName);
}
if (ScreenProviderUID != 0L) {
output.WriteRawTag(120);
output.WriteInt64(ScreenProviderUID);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
@ -2359,6 +2513,9 @@ namespace AxibugProtobuf {
if (GameRomHash.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(GameRomHash);
}
if (HostPlayerUID != 0L) {
size += 1 + pb::CodedOutputStream.ComputeInt64Size(HostPlayerUID);
}
if (GameState != global::AxibugProtobuf.RoomGameState.NoneGameState) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) GameState);
}
@ -2377,6 +2534,21 @@ namespace AxibugProtobuf {
if (Player2NickName.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Player2NickName);
}
if (Player3UID != 0L) {
size += 1 + pb::CodedOutputStream.ComputeInt64Size(Player3UID);
}
if (Player3NickName.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Player3NickName);
}
if (Player4UID != 0L) {
size += 1 + pb::CodedOutputStream.ComputeInt64Size(Player4UID);
}
if (Player4NickName.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Player4NickName);
}
if (ScreenProviderUID != 0L) {
size += 1 + pb::CodedOutputStream.ComputeInt64Size(ScreenProviderUID);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
@ -2397,6 +2569,9 @@ namespace AxibugProtobuf {
if (other.GameRomHash.Length != 0) {
GameRomHash = other.GameRomHash;
}
if (other.HostPlayerUID != 0L) {
HostPlayerUID = other.HostPlayerUID;
}
if (other.GameState != global::AxibugProtobuf.RoomGameState.NoneGameState) {
GameState = other.GameState;
}
@ -2415,6 +2590,21 @@ namespace AxibugProtobuf {
if (other.Player2NickName.Length != 0) {
Player2NickName = other.Player2NickName;
}
if (other.Player3UID != 0L) {
Player3UID = other.Player3UID;
}
if (other.Player3NickName.Length != 0) {
Player3NickName = other.Player3NickName;
}
if (other.Player4UID != 0L) {
Player4UID = other.Player4UID;
}
if (other.Player4NickName.Length != 0) {
Player4NickName = other.Player4NickName;
}
if (other.ScreenProviderUID != 0L) {
ScreenProviderUID = other.ScreenProviderUID;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
@ -2441,6 +2631,10 @@ namespace AxibugProtobuf {
GameRomHash = input.ReadString();
break;
}
case 32: {
HostPlayerUID = input.ReadInt64();
break;
}
case 40: {
GameState = (global::AxibugProtobuf.RoomGameState) input.ReadEnum();
break;
@ -2465,6 +2659,26 @@ namespace AxibugProtobuf {
Player2NickName = input.ReadString();
break;
}
case 88: {
Player3UID = input.ReadInt64();
break;
}
case 98: {
Player3NickName = input.ReadString();
break;
}
case 104: {
Player4UID = input.ReadInt64();
break;
}
case 114: {
Player4NickName = input.ReadString();
break;
}
case 120: {
ScreenProviderUID = input.ReadInt64();
break;
}
}
}
#endif
@ -2491,6 +2705,10 @@ namespace AxibugProtobuf {
GameRomHash = input.ReadString();
break;
}
case 32: {
HostPlayerUID = input.ReadInt64();
break;
}
case 40: {
GameState = (global::AxibugProtobuf.RoomGameState) input.ReadEnum();
break;
@ -2515,6 +2733,26 @@ namespace AxibugProtobuf {
Player2NickName = input.ReadString();
break;
}
case 88: {
Player3UID = input.ReadInt64();
break;
}
case 98: {
Player3NickName = input.ReadString();
break;
}
case 104: {
Player4UID = input.ReadInt64();
break;
}
case 114: {
Player4NickName = input.ReadString();
break;
}
case 120: {
ScreenProviderUID = input.ReadInt64();
break;
}
}
}
}

View File

@ -38,55 +38,59 @@ namespace AxibugProtobuf {
"b3RvYnVmLkxvZ2luUmVzdWx0U3RhdHVzEgsKA1VJRBgGIAEoAyIUChJQcm90",
"b2J1Zl9Sb29tX0xpc3QiWwoXUHJvdG9idWZfUm9vbV9MaXN0X1JFU1ASQAoQ",
"Um9vbU1pbmlJbmZvTGlzdBgBIAMoCzImLkF4aWJ1Z1Byb3RvYnVmLlByb3Rv",
"YnVmX1Jvb21fTWluaUluZm8i9gEKFlByb3RvYnVmX1Jvb21fTWluaUluZm8S",
"YnVmX1Jvb21fTWluaUluZm8ihgMKFlByb3RvYnVmX1Jvb21fTWluaUluZm8S",
"DgoGUm9vbUlEGAEgASgFEhEKCUdhbWVSb21JRBgCIAEoBRITCgtHYW1lUm9t",
"SGFzaBgDIAEoCRIwCglHYW1lU3RhdGUYBSABKA4yHS5BeGlidWdQcm90b2J1",
"Zi5Sb29tR2FtZVN0YXRlEhQKDE9ic1VzZXJDb3VudBgGIAEoBRITCgtQbGF5",
"ZXIxX1VJRBgHIAEoAxIYChBQbGF5ZXIxX05pY2tOYW1lGAggASgJEhMKC1Bs",
"YXllcjJfVUlEGAkgASgDEhgKEFBs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BAAEgwKCEVSUk9SX09LEAESGAoU",
"RVJST1JfUk9PTV9OT1RfRk9VTkQQChIlCiFFUlJPUl9ST09NX1NMT1RfUkVB",
"RExZX0hBRF9QTEFZRVIQCxIhCh1FUlJPUl9ST09NX0NBTlRfRE9fQ1VSUl9T",
"VEFURRAyKhwKCUxvZ2luVHlwZRIPCgtCYXNlRGVmYXVsdBAAKksKCkRldmlj",
"ZVR5cGUSFgoSRGV2aWNlVHlwZV9EZWZhdWx0EAASBgoCUEMQARILCgdBbmRy",
"b2lkEAISBwoDSU9TEAMSBwoDUFNWEAQqcAoNUm9vbUdhbWVTdGF0ZRISCg5O",
"b25lX0dhbWVTdGF0ZRAAEgwKCE9ubHlIb3N0EAESEQoNV2FpdFJhd1VwZGF0",
"ZRACEg0KCVdhaXRSZWFkeRADEgkKBVBhdXNlEAQSEAoMSW5PbmxpbmVHYW1l",
"EAUqTgoRTG9naW5SZXN1bHRTdGF0dXMSIQodTG9naW5SZXN1bHRTdGF0dXNf",
"QmFzZURlZmF1bHQQABIGCgJPSxABEg4KCkFjY291bnRFcnIQAkICSAFiBnBy",
"b3RvMw=="));
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.RoomGameState), typeof(global::AxibugProtobuf.LoginResultStatus), }, null, new pbr::GeneratedClrTypeInfo[] {
@ -98,7 +102,7 @@ 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", "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", "HostPlayerUID", "GameState", "ObsUserCount", "Player1UID", "Player1NickName", "Player2UID", "Player2NickName", "Player3UID", "Player3NickName", "Player4UID", "Player4NickName", "ScreenProviderUID" }, 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),
@ -200,7 +204,7 @@ namespace AxibugProtobuf {
/// </summary>
[pbr::OriginalName("CMD_Room_Singel_PlayerInput")] CmdRoomSingelPlayerInput = 6010,
/// <summary>
///单个玩家操作同步下行 对应 Protobuf_Room_Syn_RoomFrameAllInputData
///所有玩家操作同步下行 对应 Protobuf_Room_Syn_RoomFrameAllInputData
/// </summary>
[pbr::OriginalName("CMD_ROOM_SYN_PlayerInput")] CmdRoomSynPlayerInput = 6015,
/// <summary>
@ -2070,12 +2074,18 @@ namespace AxibugProtobuf {
roomID_ = other.roomID_;
gameRomID_ = other.gameRomID_;
gameRomHash_ = other.gameRomHash_;
hostPlayerUID_ = other.hostPlayerUID_;
gameState_ = other.gameState_;
obsUserCount_ = other.obsUserCount_;
player1UID_ = other.player1UID_;
player1NickName_ = other.player1NickName_;
player2UID_ = other.player2UID_;
player2NickName_ = other.player2NickName_;
player3UID_ = other.player3UID_;
player3NickName_ = other.player3NickName_;
player4UID_ = other.player4UID_;
player4NickName_ = other.player4NickName_;
screenProviderUID_ = other.screenProviderUID_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
@ -2123,6 +2133,20 @@ namespace AxibugProtobuf {
}
}
/// <summary>Field number for the "HostPlayerUID" field.</summary>
public const int HostPlayerUIDFieldNumber = 4;
private long hostPlayerUID_;
/// <summary>
///主机玩家ID
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public long HostPlayerUID {
get { return hostPlayerUID_; }
set {
hostPlayerUID_ = value;
}
}
/// <summary>Field number for the "GameState" field.</summary>
public const int GameStateFieldNumber = 5;
private global::AxibugProtobuf.RoomGameState gameState_ = global::AxibugProtobuf.RoomGameState.NoneGameState;
@ -2207,6 +2231,76 @@ namespace AxibugProtobuf {
}
}
/// <summary>Field number for the "Player3_UID" field.</summary>
public const int Player3UIDFieldNumber = 11;
private long player3UID_;
/// <summary>
///玩家3 UID
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public long Player3UID {
get { return player3UID_; }
set {
player3UID_ = value;
}
}
/// <summary>Field number for the "Player3_NickName" field.</summary>
public const int Player3NickNameFieldNumber = 12;
private string player3NickName_ = "";
/// <summary>
///玩家3 昵称
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Player3NickName {
get { return player3NickName_; }
set {
player3NickName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "Player4_UID" field.</summary>
public const int Player4UIDFieldNumber = 13;
private long player4UID_;
/// <summary>
///玩家4 UID
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public long Player4UID {
get { return player4UID_; }
set {
player4UID_ = value;
}
}
/// <summary>Field number for the "Player4_NickName" field.</summary>
public const int Player4NickNameFieldNumber = 14;
private string player4NickName_ = "";
/// <summary>
///玩家4 昵称
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Player4NickName {
get { return player4NickName_; }
set {
player4NickName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "ScreenProviderUID" field.</summary>
public const int ScreenProviderUIDFieldNumber = 15;
private long screenProviderUID_;
/// <summary>
///屏幕数据供应者
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public long ScreenProviderUID {
get { return screenProviderUID_; }
set {
screenProviderUID_ = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as Protobuf_Room_MiniInfo);
@ -2223,12 +2317,18 @@ namespace AxibugProtobuf {
if (RoomID != other.RoomID) return false;
if (GameRomID != other.GameRomID) return false;
if (GameRomHash != other.GameRomHash) return false;
if (HostPlayerUID != other.HostPlayerUID) return false;
if (GameState != other.GameState) return false;
if (ObsUserCount != other.ObsUserCount) return false;
if (Player1UID != other.Player1UID) return false;
if (Player1NickName != other.Player1NickName) return false;
if (Player2UID != other.Player2UID) return false;
if (Player2NickName != other.Player2NickName) return false;
if (Player3UID != other.Player3UID) return false;
if (Player3NickName != other.Player3NickName) return false;
if (Player4UID != other.Player4UID) return false;
if (Player4NickName != other.Player4NickName) return false;
if (ScreenProviderUID != other.ScreenProviderUID) return false;
return Equals(_unknownFields, other._unknownFields);
}
@ -2238,12 +2338,18 @@ namespace AxibugProtobuf {
if (RoomID != 0) hash ^= RoomID.GetHashCode();
if (GameRomID != 0) hash ^= GameRomID.GetHashCode();
if (GameRomHash.Length != 0) hash ^= GameRomHash.GetHashCode();
if (HostPlayerUID != 0L) hash ^= HostPlayerUID.GetHashCode();
if (GameState != global::AxibugProtobuf.RoomGameState.NoneGameState) hash ^= GameState.GetHashCode();
if (ObsUserCount != 0) hash ^= ObsUserCount.GetHashCode();
if (Player1UID != 0L) hash ^= Player1UID.GetHashCode();
if (Player1NickName.Length != 0) hash ^= Player1NickName.GetHashCode();
if (Player2UID != 0L) hash ^= Player2UID.GetHashCode();
if (Player2NickName.Length != 0) hash ^= Player2NickName.GetHashCode();
if (Player3UID != 0L) hash ^= Player3UID.GetHashCode();
if (Player3NickName.Length != 0) hash ^= Player3NickName.GetHashCode();
if (Player4UID != 0L) hash ^= Player4UID.GetHashCode();
if (Player4NickName.Length != 0) hash ^= Player4NickName.GetHashCode();
if (ScreenProviderUID != 0L) hash ^= ScreenProviderUID.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
@ -2272,6 +2378,10 @@ namespace AxibugProtobuf {
output.WriteRawTag(26);
output.WriteString(GameRomHash);
}
if (HostPlayerUID != 0L) {
output.WriteRawTag(32);
output.WriteInt64(HostPlayerUID);
}
if (GameState != global::AxibugProtobuf.RoomGameState.NoneGameState) {
output.WriteRawTag(40);
output.WriteEnum((int) GameState);
@ -2296,6 +2406,26 @@ namespace AxibugProtobuf {
output.WriteRawTag(82);
output.WriteString(Player2NickName);
}
if (Player3UID != 0L) {
output.WriteRawTag(88);
output.WriteInt64(Player3UID);
}
if (Player3NickName.Length != 0) {
output.WriteRawTag(98);
output.WriteString(Player3NickName);
}
if (Player4UID != 0L) {
output.WriteRawTag(104);
output.WriteInt64(Player4UID);
}
if (Player4NickName.Length != 0) {
output.WriteRawTag(114);
output.WriteString(Player4NickName);
}
if (ScreenProviderUID != 0L) {
output.WriteRawTag(120);
output.WriteInt64(ScreenProviderUID);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
@ -2317,6 +2447,10 @@ namespace AxibugProtobuf {
output.WriteRawTag(26);
output.WriteString(GameRomHash);
}
if (HostPlayerUID != 0L) {
output.WriteRawTag(32);
output.WriteInt64(HostPlayerUID);
}
if (GameState != global::AxibugProtobuf.RoomGameState.NoneGameState) {
output.WriteRawTag(40);
output.WriteEnum((int) GameState);
@ -2341,6 +2475,26 @@ namespace AxibugProtobuf {
output.WriteRawTag(82);
output.WriteString(Player2NickName);
}
if (Player3UID != 0L) {
output.WriteRawTag(88);
output.WriteInt64(Player3UID);
}
if (Player3NickName.Length != 0) {
output.WriteRawTag(98);
output.WriteString(Player3NickName);
}
if (Player4UID != 0L) {
output.WriteRawTag(104);
output.WriteInt64(Player4UID);
}
if (Player4NickName.Length != 0) {
output.WriteRawTag(114);
output.WriteString(Player4NickName);
}
if (ScreenProviderUID != 0L) {
output.WriteRawTag(120);
output.WriteInt64(ScreenProviderUID);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
@ -2359,6 +2513,9 @@ namespace AxibugProtobuf {
if (GameRomHash.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(GameRomHash);
}
if (HostPlayerUID != 0L) {
size += 1 + pb::CodedOutputStream.ComputeInt64Size(HostPlayerUID);
}
if (GameState != global::AxibugProtobuf.RoomGameState.NoneGameState) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) GameState);
}
@ -2377,6 +2534,21 @@ namespace AxibugProtobuf {
if (Player2NickName.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Player2NickName);
}
if (Player3UID != 0L) {
size += 1 + pb::CodedOutputStream.ComputeInt64Size(Player3UID);
}
if (Player3NickName.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Player3NickName);
}
if (Player4UID != 0L) {
size += 1 + pb::CodedOutputStream.ComputeInt64Size(Player4UID);
}
if (Player4NickName.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Player4NickName);
}
if (ScreenProviderUID != 0L) {
size += 1 + pb::CodedOutputStream.ComputeInt64Size(ScreenProviderUID);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
@ -2397,6 +2569,9 @@ namespace AxibugProtobuf {
if (other.GameRomHash.Length != 0) {
GameRomHash = other.GameRomHash;
}
if (other.HostPlayerUID != 0L) {
HostPlayerUID = other.HostPlayerUID;
}
if (other.GameState != global::AxibugProtobuf.RoomGameState.NoneGameState) {
GameState = other.GameState;
}
@ -2415,6 +2590,21 @@ namespace AxibugProtobuf {
if (other.Player2NickName.Length != 0) {
Player2NickName = other.Player2NickName;
}
if (other.Player3UID != 0L) {
Player3UID = other.Player3UID;
}
if (other.Player3NickName.Length != 0) {
Player3NickName = other.Player3NickName;
}
if (other.Player4UID != 0L) {
Player4UID = other.Player4UID;
}
if (other.Player4NickName.Length != 0) {
Player4NickName = other.Player4NickName;
}
if (other.ScreenProviderUID != 0L) {
ScreenProviderUID = other.ScreenProviderUID;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
@ -2441,6 +2631,10 @@ namespace AxibugProtobuf {
GameRomHash = input.ReadString();
break;
}
case 32: {
HostPlayerUID = input.ReadInt64();
break;
}
case 40: {
GameState = (global::AxibugProtobuf.RoomGameState) input.ReadEnum();
break;
@ -2465,6 +2659,26 @@ namespace AxibugProtobuf {
Player2NickName = input.ReadString();
break;
}
case 88: {
Player3UID = input.ReadInt64();
break;
}
case 98: {
Player3NickName = input.ReadString();
break;
}
case 104: {
Player4UID = input.ReadInt64();
break;
}
case 114: {
Player4NickName = input.ReadString();
break;
}
case 120: {
ScreenProviderUID = input.ReadInt64();
break;
}
}
}
#endif
@ -2491,6 +2705,10 @@ namespace AxibugProtobuf {
GameRomHash = input.ReadString();
break;
}
case 32: {
HostPlayerUID = input.ReadInt64();
break;
}
case 40: {
GameState = (global::AxibugProtobuf.RoomGameState) input.ReadEnum();
break;
@ -2515,6 +2733,26 @@ namespace AxibugProtobuf {
Player2NickName = input.ReadString();
break;
}
case 88: {
Player3UID = input.ReadInt64();
break;
}
case 98: {
Player3NickName = input.ReadString();
break;
}
case 104: {
Player4UID = input.ReadInt64();
break;
}
case 114: {
Player4NickName = input.ReadString();
break;
}
case 120: {
ScreenProviderUID = input.ReadInt64();
break;
}
}
}
}

View File

@ -50,7 +50,7 @@ enum CommandID
//
CMD_Room_Singel_PlayerInput = 6010; // Protobuf_Room_SinglePlayerInputData
CMD_ROOM_SYN_PlayerInput = 6015; // Protobuf_Room_Syn_RoomFrameAllInputData
CMD_ROOM_SYN_PlayerInput = 6015; // Protobuf_Room_Syn_RoomFrameAllInputData
//
CMD_Screen = 7001; // | 广 Protobuf_Screnn_Frame
@ -166,12 +166,18 @@ message Protobuf_Room_MiniInfo
int32 RoomID = 1;//ID
int32 GameRomID = 2;//ID
string GameRomHash = 3;
int64 HostPlayerUID = 4;//ID
RoomGameState GameState = 5;//
int32 ObsUserCount = 6;//
int64 Player1_UID = 7;//1 UID
string Player1_NickName = 8;//1
int64 Player2_UID = 9;//2 UID
string Player2_NickName = 10;//2
int64 Player3_UID = 11;//3 UID
string Player3_NickName = 12;//3
int64 Player4_UID = 13;//4 UID
string Player4_NickName = 14;//4
int64 ScreenProviderUID = 15;//
}
message Protobuf_Room_Update_RESP
@ -237,7 +243,6 @@ message Protobuf_Room_MyRoom_State_Change
Protobuf_Room_MiniInfo RoomMiniInfo = 1;//
}
message Protobuf_Room_WaitStep_RESP
{
int32 WaitStep = 1;// [0] [1] [2]