Unofficial CardLife revival project, pronounced like "celery"
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- using System.Collections.Generic;
-
- namespace CLre_server.API.Synergy
- {
- public static class Clients
- {
- private static readonly List<int> clrePlayers = new List<int>();
- private static readonly List<int> players = new List<int>();
-
- internal static void RegisterCLreClient(int playerId)
- {
- clrePlayers.Add(playerId);
- }
-
- internal static void RegisterClient(int playerId)
- {
- players.Add(playerId);
- }
-
- internal static void RemoveClient(int playerId)
- {
- if (IsCLreClient(playerId))
- {
- clrePlayers.Remove(playerId);
- }
- players.Remove(playerId);
- }
-
- public static bool IsCLreClient(int playerId)
- {
- return clrePlayers.Contains(playerId);
- }
-
- public static bool IsConnected(int playerId)
- {
- return players.Contains(playerId);
- }
-
- public static IEnumerator<int> CLreClients()
- {
- return clrePlayers.GetEnumerator();
- }
- }
- }
|