Beispiel #1
0
        public static SteamFriend CreateFromClient(UInt32 ID)
        {
            SteamFriend NewFriend = new SteamFriend();

            lock (SteamServer.Clients)
            {
                NewFriend.Status = SteamServer.Clients[ID].SocialStatus;
                NewFriend.XUID   = SteamServer.Clients[ID].XUID;

                NewFriend.Username = new Byte[SteamServer.Clients[ID].Username.Length];
                Array.Copy(SteamServer.Clients[ID].Username, NewFriend.Username, SteamServer.Clients[ID].Username.Length);
            }

            return(NewFriend);
        }
        public static SteamFriend CreateFromClient(UInt32 ID)
        {
            SteamFriend NewFriend = new SteamFriend();

            lock (SteamServer.Clients)
            {
                NewFriend.Status = SteamServer.Clients[ID].SocialStatus;
                NewFriend.XUID = SteamServer.Clients[ID].XUID;

                NewFriend.Username = new Byte[SteamServer.Clients[ID].Username.Length];
                Array.Copy(SteamServer.Clients[ID].Username, NewFriend.Username, SteamServer.Clients[ID].Username.Length);
            }

            return NewFriend;
        }
Beispiel #3
0
        void UpdateFriendslistFromClients()
        {
            lock (SteamServer.Clients)
            {
                FriendsList.Clear();

                foreach (UInt32 ClientKey in SteamServer.Clients.Keys)
                {
                    if (ClientID != ClientKey)
                    {
                        FriendsList.Add(SteamFriend.CreateFromClient(ClientKey));
                    }
                }

                // Debug
                SteamFriend NewFriend = new SteamFriend();
                NewFriend.XUID     = 0x1100001DEADC0DE;
                NewFriend.Username = Encoding.ASCII.GetBytes("NotConvery");
                NewFriend.Status   = PersonaState.Online;
                FriendsList.Add(NewFriend);
            }
        }
        void UpdateFriendslistFromClients()
        {
            lock (SteamServer.Clients)
            {
                FriendsList.Clear();

                foreach (UInt32 ClientKey in SteamServer.Clients.Keys)
                {
                    if (ClientID != ClientKey)
                        FriendsList.Add(SteamFriend.CreateFromClient(ClientKey));
                }

                // Debug
                SteamFriend NewFriend = new SteamFriend();
                NewFriend.XUID = 0x1100001DEADC0DE;
                NewFriend.Username = Encoding.ASCII.GetBytes("NotConvery");
                NewFriend.Status = PersonaState.Online;
                FriendsList.Add(NewFriend);
            }
        }