public void Init(GameClient client, UserData.UserData data) { Achievements = data.achievements; FavoriteRooms = new ArrayList(); foreach (int id in data.favouritedRooms) { FavoriteRooms.Add(id); } _client = client; BadgeComponent = new BadgeComponent(this, data); InventoryComponent = new InventoryComponent(Id, client); quests = data.quests; Messenger = new HabboMessenger(Id); Messenger.Init(data.friends, data.requests); _friendCount = Convert.ToInt32(data.friends.Count); _disconnected = false; Relationships = data.Relations; InitSearches(); InitFX(); InitClothing(); InitIgnores(); }
/// <summary> /// Initializes the information. /// </summary> /// <param name="data">The data.</param> internal void InitInformation(UserData data) { _subscriptionManager = new SubscriptionManager(Id, data); _badgeComponent = new UserBadgeManager(Id, data); Quests = data.Quests; _messenger = new HabboMessenger(Id); _messenger.Init(data.Friends, data.Requests); SpectatorMode = false; Disconnected = false; UsersRooms = data.Rooms; Relationships = data.Relations; AnsweredPolls = data.SuggestedPolls; }
/// <summary> /// Initializes the specified client. /// </summary> /// <param name="client">The client.</param> /// <param name="data">The data.</param> internal void Init(GameClient client, UserData data) { _mClient = client; _subscriptionManager = new SubscriptionManager(Id, data); _badgeComponent = new UserBadgeManager(Id, data); _inventoryComponent = new InventoryComponent(Id, client, data); _inventoryComponent.SetActiveState(client); _avatarEffectComponent = new AvatarEffectComponent(Id, client, data); Quests = data.Quests; _messenger = new HabboMessenger(Id); _messenger.Init(data.Friends, data.Requests); FriendCount = Convert.ToUInt32(data.Friends.Count); SpectatorMode = false; Disconnected = false; UsersRooms = data.Rooms; MinimailUnreadMessages = data.MiniMailCount; Relationships = data.Relations; AnsweredPolls = data.SuggestedPolls; ClothesManagerManager = new UserClothesManager(Id); Preferences = new UserPreferences(Id); YoutubeManager = new YoutubeManager(Id); }