48 lines
1.7 KiB
C#
48 lines
1.7 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace LobbyServerDto
|
|
{
|
|
/// <summary>
|
|
/// Create a lobby in the lobby list. The lobby will stay until either closed by the host or the host disconnects
|
|
/// </summary>
|
|
/// <remarks>A host can always have only one open lobby, if another lobby is already opened by the client it will be closed</remarks>
|
|
[LobbyMessage]
|
|
public partial class LobbyCreate
|
|
{
|
|
/// <summary>
|
|
/// Game Id for which game this lobby is for
|
|
/// </summary>
|
|
public Guid GameId { get; set; }
|
|
/// <summary>
|
|
/// Display name of the lobby
|
|
/// </summary>
|
|
[MaxLength(64)]
|
|
public string Name { get; set; } = string.Empty;
|
|
/// <summary>
|
|
/// Game mode of lobby
|
|
/// </summary>
|
|
public int GameMode { get; set; }
|
|
/// <summary>
|
|
/// How many players are in the lobby
|
|
/// </summary>
|
|
public int PlayerCount { get; set; }
|
|
/// <summary>
|
|
/// Maximum players allowed in the lobby
|
|
/// </summary>
|
|
public int MaxPlayerCount { get; set; }
|
|
/// <summary>
|
|
/// The hash of a password to protect the lobby. Only users with the password can request host information/nat punch.
|
|
/// </summary>
|
|
[MaxLength(26)]
|
|
public byte[]? PasswordHash { get; set; }
|
|
/// <summary>
|
|
/// The hosts ip. Used the the host information send to clients on their request.
|
|
/// </summary>
|
|
[MaxLength(32)]
|
|
public string? HostIp { get; set; }
|
|
/// <summary>
|
|
/// The hosts port. Used the the host information send to clients on their request.
|
|
/// </summary>
|
|
public int HostPort { get; set; }
|
|
}
|
|
} |