48 lines
1003 B
C#
48 lines
1003 B
C#
using ProtoBuf;
|
|
|
|
namespace SeamlessClientPlugin.Messages;
|
|
|
|
[ProtoContract]
|
|
public class OnlinePlayersMessage
|
|
{
|
|
[ProtoMember(12)] public int CurrentServerId;
|
|
|
|
[ProtoMember(10)] public List<OnlineServer> OnlineServers = [];
|
|
}
|
|
|
|
[ProtoContract]
|
|
public class OnlineServer
|
|
{
|
|
[ProtoMember(2)] public List<OnlinePlayer> Players = [];
|
|
|
|
[ProtoMember(10)] public int ServerId;
|
|
|
|
[ProtoMember(11)] public string ServerName;
|
|
|
|
[ProtoMember(3)] public bool ServerRunning = false;
|
|
}
|
|
|
|
[ProtoContract]
|
|
public class OnlinePlayer
|
|
{
|
|
[ProtoMember(3)] public long IdentityId;
|
|
|
|
[ProtoMember(4)] public int OnServer;
|
|
|
|
[ProtoMember(1)] public string PlayerName;
|
|
|
|
[ProtoMember(2)] public ulong SteamId;
|
|
|
|
public OnlinePlayer(string playerName, ulong steamId, long identityId, int onServer)
|
|
{
|
|
this.PlayerName = playerName;
|
|
this.SteamId = steamId;
|
|
this.IdentityId = identityId;
|
|
this.OnServer = onServer;
|
|
}
|
|
|
|
|
|
public OnlinePlayer()
|
|
{
|
|
}
|
|
} |