IW4M-Admin/SharedLibraryCore/Events/Game/ClientJoinTeamEvent.cs

21 lines
495 B
C#
Raw Normal View History

2023-02-11 22:03:35 -05:00
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;
}
}
}