IW4M-Admin/SharedLibraryCore/Events/Game/ClientJoinTeamEvent.cs
2023-02-11 21:03:35 -06:00

21 lines
495 B
C#

using System;
using SharedLibraryCore.Database.Models;
namespace SharedLibraryCore.Events.Game;
public class ClientJoinTeamEvent : ClientGameEvent
{
public string TeamName { get; init; }
public EFClient.TeamType? Team {
get
{
if (Enum.TryParse(typeof(EFClient.TeamType), TeamName, out var parsedTeam) && parsedTeam is not null)
{
return (EFClient.TeamType)parsedTeam;
}
return null;
}
}
}