mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 15:20:48 -05:00
define new event types
This commit is contained in:
20
SharedLibraryCore/Events/Game/ClientJoinTeamEvent.cs
Normal file
20
SharedLibraryCore/Events/Game/ClientJoinTeamEvent.cs
Normal file
@ -0,0 +1,20 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user