Esempio n. 1
0
        /// <summary>
        ///     Initializes the messenger.
        /// </summary>
        internal void InitMessenger()
        {
            GameClient client = GetClient();

            if (client == null)
            {
                return;
            }

            client.SendMessage(_messenger.SerializeCategories());
            client.SendMessage(_messenger.SerializeFriends());
            client.SendMessage(_messenger.SerializeRequests());

            if (Yupi.OfflineMessages.ContainsKey(Id))
            {
                List <OfflineMessage> list = Yupi.OfflineMessages[Id];
                foreach (OfflineMessage current in list)
                {
                    client.SendMessage(_messenger.SerializeOfflineMessages(current));
                }
                Yupi.OfflineMessages.Remove(Id);
                OfflineMessage.RemoveAllMessages(Yupi.GetDatabaseManager().GetQueryReactor(), Id);
            }

            if (_messenger.Requests.Count > Yupi.FriendRequestLimit)
            {
                client.SendNotif(Yupi.GetLanguage().GetVar("user_friend_request_max"));
            }

            _messenger.OnStatusChanged(false);
        }
Esempio n. 2
0
        internal void InitMessenger()
        {
            GameClient Client = GetClient();

            if (Client == null)
            {
                return;
            }
            Messenger.OnStatusChanged(false);

            Client.SendMessage(Messenger.SerializeFriends());
            Client.SendMessage(Messenger.SerializeRequests());
        }
Esempio n. 3
0
        internal void InitMessenger()
        {
            var Client = GetClient();

            if (Client == null || Messenger == null || Messenger.requests == null)
            {
                return;
            }

            OtanixEnvironment.GetGame().GetClientManager().QueueConsoleUpdate(Client);
            friendsCount = Messenger.myFriends;

            Client.SendMessage(Messenger.SerializeFriendsCategories(Client.GetHabbo()));
            Client.SendMessage(Messenger.SerializeFriends(Client.GetHabbo()));
            Client.SendMessage(Messenger.SerializeRequests(Client));
            Messenger.SerializeOfflineMessages(Client);
        }
Esempio n. 4
0
        internal void InitMessenger()
        {
            GameClient Client = GetClient();

            if (Client == null)
            {
                return;
            }
            Messenger.OnStatusChanged(false);

            Client.SendMessage(Messenger.SerializeFriends());
            Client.SendMessage(Messenger.SerializeRequests());

            // TODO: Change spanishfuck into locale message
            if (Messenger.requests.Count > FirewindEnvironment.friendRequestLimit)
            {
                Client.SendNotif("Tienes más de " + FirewindEnvironment.friendRequestLimit + " peticiones de amigos, por lo que solo hemos cargado " + FirewindEnvironment.friendRequestLimit + " y las próximas serán cargadas una vez aceptes estas y reinicies sesión!");
            }
        }