diff --git a/Giants.DataContract/Contracts/V1/ServerInfo.cs b/Giants.DataContract/Contracts/V1/ServerInfo.cs index d2a9528..bc1b437 100644 --- a/Giants.DataContract/Contracts/V1/ServerInfo.cs +++ b/Giants.DataContract/Contracts/V1/ServerInfo.cs @@ -32,6 +32,9 @@ [Required] public int NumPlayers { get; set; } + [Required] + public int MaxPlayers { get; set; } + [Required] [StringLength(100)] public string GameState { get; set; } @@ -61,6 +64,7 @@ this.MapName == info.MapName && this.GameType == info.GameType && this.NumPlayers == info.NumPlayers && + this.MaxPlayers == info.MaxPlayers && this.GameState == info.GameState && this.TimeLimit == info.TimeLimit && this.FragLimit == info.FragLimit && @@ -79,6 +83,7 @@ hash.Add(this.MapName); hash.Add(this.GameType); hash.Add(this.NumPlayers); + hash.Add(this.MaxPlayers); hash.Add(this.GameState); hash.Add(this.TimeLimit); hash.Add(this.FragLimit); diff --git a/Giants.WebApi.Clients/Clients.cs b/Giants.WebApi.Clients/Clients.cs index ce53ca4..3ccae81 100644 --- a/Giants.WebApi.Clients/Clients.cs +++ b/Giants.WebApi.Clients/Clients.cs @@ -790,6 +790,9 @@ namespace Giants.WebApi.Clients [Newtonsoft.Json.JsonProperty("numPlayers", Required = Newtonsoft.Json.Required.Always)] public int NumPlayers { get; set; } + + [Newtonsoft.Json.JsonProperty("maxPlayers", Required = Newtonsoft.Json.Required.Always)] + public int MaxPlayers { get; set; } [Newtonsoft.Json.JsonProperty("gameState", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] @@ -927,4 +930,4 @@ namespace Giants.WebApi.Clients #pragma warning restore 1573 #pragma warning restore 472 #pragma warning restore 114 -#pragma warning restore 108 \ No newline at end of file +#pragma warning restore 108 diff --git a/Giants.WebApi.Clients/swagger.json b/Giants.WebApi.Clients/swagger.json index 57efe45..0a59deb 100644 --- a/Giants.WebApi.Clients/swagger.json +++ b/Giants.WebApi.Clients/swagger.json @@ -192,6 +192,10 @@ "type": "integer", "format": "int32" }, + "maxPlayers": { + "type": "integer", + "format": "int32" + }, "gameState": { "type": "string", "maxLength": 100, @@ -320,4 +324,4 @@ } } } -} \ No newline at end of file +} diff --git a/Sdk/Include/MasterServer/ServerInfoResponse.h b/Sdk/Include/MasterServer/ServerInfoResponse.h index 6ed9302..6924833 100644 --- a/Sdk/Include/MasterServer/ServerInfoResponse.h +++ b/Sdk/Include/MasterServer/ServerInfoResponse.h @@ -22,6 +22,7 @@ struct ServerInfoResponse mapName = serverInfoResponse["mapName"]; gameType = serverInfoResponse["gameType"]; numPlayers = serverInfoResponse["numPlayers"]; + maxPlayers = serverInfoResponse["maxPlayers"]; gameState = serverInfoResponse["gameState"]; timeLimit = serverInfoResponse["timeLimit"]; fragLimit = serverInfoResponse["fragLimit"]; @@ -42,6 +43,7 @@ struct ServerInfoResponse std::string mapName; std::string gameType; int numPlayers = 0; + int maxPlayers = 0; std::string gameState; int timeLimit = 0; int fragLimit = 0;