-
Notifications
You must be signed in to change notification settings - Fork 0
/
ServerInfoPublic.cs
43 lines (39 loc) · 1.53 KB
/
ServerInfoPublic.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
using MyApp;
public class ServerInfoPublic
{
public int ID { get; private set; }
public bool Joinable { get; private set; }
public bool RecentlyWentJoinable { get; private set; }
public int PlayersIngame { get; private set; }
public int MaxPlayers { get; private set; }
public int Spectators { get; private set; }
public int MaxSpectators { get; private set; }
public string MMR { get; private set; }
public string MapName { get; private set; }
public string Hostname { get; private set; }
public int Port { get; private set; }
public string ServerName { get; private set; }
public int Ping { get; private set; }
public string? CountryCode { get; private set; }
public int Visibility { get; private set; }
public string Gametype { get; private set; }
public ServerInfoPublic(ServerRecord record)
{
ID = record.ID;
Joinable = record.IsJoinable();
RecentlyWentJoinable = record.RecentlyWentJoinable();
Hostname = record.Hostname;
Port = record.Port;
Ping = record.lastRequestPingTime;
CountryCode = record.CountryCode;
Visibility = record.info!.Visibility;
PlayersIngame = record.info.GetPlayersIngame();
MaxPlayers = record.info.MaxPlayers;
Spectators = record.info.GetSpectators();
MaxSpectators = record.info.GetMaxSpectators();
MMR = record.info.GetMMR();
Gametype = record.info.GetGameType();
MapName = record.info.Map;
ServerName = record.info.Name;
}
}