Exemple #1
0
        internal void InitInformation(UserData data)
        {
            this.SubscriptionManager = new SubscriptionManager(Id, data);
            this.BadgeComponent = new BadgeComponent(Id, data);
            this.quests = data.quests;

            this.Messenger = new HabboMessenger(Id);
            this.Messenger.Init(data.friends, data.requests);
            this.SpectatorMode = false;
            this.Disconnected = false;
            this.UsersRooms = data.rooms;
            this.Relationships = data.Relations;
        }
Exemple #2
0
        internal void Init(GameClient client, UserData data)
        {
            this.mClient = client;

            this.SubscriptionManager = new SubscriptionManager(Id, data);
            this.BadgeComponent = new BadgeComponent(Id, data);
            this.InventoryComponent = InventoryGlobal.GetInventory(Id, client, data);
            this.InventoryComponent.SetActiveState(client);
            this.AvatarEffectsInventoryComponent = new AvatarEffectsInventoryComponent(Id, client, data);
            using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
            {
                if (client.GetHabbo() != null)
                {
                    dbClient.setQuery("SELECT COUNT(0) FROM items WHERE user_id=@id AND room_id=''");
                    dbClient.addParameter("id", client.GetHabbo().Id);
                    int lol = dbClient.getInteger();
                    if (lol >= 5000)
                        client.SendNotif("You are close to the limit for items in your inventory!\n"
                    + "The maximum is currently 8000 items, you have " + lol + " items loaded in your inventory. \nPlease note that we are not responsible for crashing because of too big inventories!");
                }
            }
            this.quests = data.quests;

            this.Messenger = new HabboMessenger(Id);
            this.Messenger.Init(data.friends, data.requests);
            this.FriendCount = Convert.ToUInt32(data.friends.Count);
            this.SpectatorMode = false;
            this.WasSpectator = false;
            this.Disconnected = false;
            this.UsersRooms = data.rooms;
            this.Relationships = data.Relations;
        }