示例#1
0
        private static void OnMessengerInit(Session Session, ClientMessage Message)
        {
            ReadOnlyCollection <uint> Friends = Session.MessengerFriendCache.Friends;
            List <uint> Requests = new List <uint>(); // todo: move requests to cache as well?

            using (SqlDatabaseClient MySqlClient = SqlDatabaseManager.GetClient())
            {
                Requests = GetFriendsForUser(MySqlClient, Session.CharacterId, 0);
            }

            Session.SendData(MessengerFriendListComposer.Compose(Friends));

            if (Requests.Count > 0)
            {
                Session.SendData(MessengerRequestListComposer.Compose(Requests));
            }
        }
示例#2
0
        private static void OnMessengerInit(Session Session, ClientMessage Message)
        {
            ReadOnlyCollection <uint> Friends = Session.MessengerFriendCache.Friends;

            Session.SendData(MessengerFriendListComposer.Compose(Friends));
        }