Ejemplo n.º 1
0
        /// <summary>
        /// Gets the player's blocked users
        /// </summary>
        /// <returns>The list of blocked friends</returns>
        public List <Friend> GetBlocked()
        {
            RequestBlocked();
            GetBlockedEvent blockedEvent = WaitForServerEvent <GetBlockedEvent>(Timeout);

            if (blockedEvent == null)
            {
                return(null);
            }

            return(blockedEvent.Blocked);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Processes the message
        /// </summary>
        /// <param name="connectionBase">The connection base</param>
        /// <param name="message">The playerio message</param>
        /// <param name="handled">Whether the message was already handled</param>
        public void Process(ConnectionBase connectionBase, Message message, bool handled)
        {
            List <Friend> blocked = new List <Friend>();

            for (uint i = 0; i < message.Count; i += 2)
            {
                Friend pendingFriend = new Friend((LobbyConnection)connectionBase, message.GetString(i));
                blocked.Add(pendingFriend);
            }

            GetBlockedEvent getBlockedEvent = new GetBlockedEvent()
            {
                Blocked = blocked,
                Raw     = message
            };

            connectionBase.RaiseServerEvent <GetBlockedEvent>(getBlockedEvent);
        }