Пример #1
0
 private void LoadPlayerGJ(P3DPlayer client)
 {
     if (client != null)
     {
         var obj = new ClientGJTable(client.Id, (int) client.GameJoltId);
         if (!Server.DatabaseFind<ClientGJTable>(obj.ClientId))
             Server.DatabaseSet(obj);
         else
             Server.DatabaseUpdate(obj);
     }
 }
Пример #2
0
        private bool IsGameJoltIdUsed(P3DPlayer client)
        {
            if (!client.IsGameJoltPlayer)
                return false;

            for (var i = Clients.Count - 1; i >= 0; i--)
            {
                var player = (P3DPlayer) Clients[i];
                if (player != client && player.IsGameJoltPlayer && client.GameJoltId == player.GameJoltId)
                    return true;
            }

            return false;
        }