Beispiel #1
0
        public Habbo(int Id, string Username, int Rank, string Motto, string Look, string Gender, int Credits, int ActivityPoints, int HomeRoom,
            bool HasFriendRequestsDisabled, int LastOnline, bool AppearOffline, bool HideInRoom, double CreateDate, int Diamonds,
            string machineID, string clientVolume, bool ChatPreference, bool FocusPreference, bool PetsMuted, bool BotsMuted, bool AdvertisingReportBlocked, double LastNameChange,
            int GOTWPoints, bool IgnoreInvites, double TimeMuted, double TradingLock, bool AllowGifts, int FriendBarState, bool DisableForcedEffects, bool AllowMimic, int VIPRank)
        {
            this._id = Id;
            this._username = Username;
            this._rank = Rank;
            this._motto = Motto;
            this._look = PlusEnvironment.GetGame().GetAntiMutant().RunLook(Look);
            this._gender = Gender.ToLower();
            this._footballLook = PlusEnvironment.FilterFigure(Look.ToLower());
            this._footballGender = Gender.ToLower();
            this._credits = Credits;
            this._duckets = ActivityPoints;
            this._diamonds = Diamonds;
            this._gotwPoints = GOTWPoints;
            this._homeRoom = HomeRoom;
            this._lastOnline = LastOnline;
            this._accountCreated = CreateDate;
            this._clientVolume = new List<int>();
            foreach (string Str in clientVolume.Split(','))
            {
                int Val = 0;
                if (int.TryParse(Str, out Val))
                    this._clientVolume.Add(int.Parse(Str));
                else
                    this._clientVolume.Add(100);
            }

            this._lastNameChange = LastNameChange;
            this._machineId = machineID;
            this._chatPreference = ChatPreference;
            this._focusPreference = FocusPreference;
            this._isExpert = IsExpert == true;

            this._appearOffline = AppearOffline;
            this._allowTradingRequests = true;//TODO
            this._allowUserFollowing = true;//TODO
            this._allowFriendRequests = HasFriendRequestsDisabled;//TODO
            this._allowMessengerInvites = IgnoreInvites;
            this._allowPetSpeech = PetsMuted;
            this._allowBotSpeech = BotsMuted;
            this._allowPublicRoomStatus = HideInRoom;
            this._allowConsoleMessages = true;
            this._allowGifts = AllowGifts;
            this._allowMimic = AllowMimic;
            this._receiveWhispers = true;
            this._ignorePublicWhispers = false;
            this._playingFastFood = false;
            this._friendbarState = FriendBarStateUtility.GetEnum(FriendBarState);
            this._christmasDay = ChristmasDay;
            this._wantsToRideHorse = 0;
            this._timeAFK = 0;
            this._disableForcedEffects = DisableForcedEffects;
            this._vipRank = VIPRank;

            this._disconnected = false;
            this._habboSaved = false;
            this._changingName = false;

            this._floodTime = 0;
            this._friendCount = 0;
            this._timeMuted = TimeMuted;
            this._timeCached = DateTime.Now;

            this._tradingLockExpiry = TradingLock;
            if (this._tradingLockExpiry > 0 && PlusEnvironment.GetUnixTimestamp() > this.TradingLockExpiry)
            {
                this._tradingLockExpiry = 0;
                using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
                {
                    dbClient.RunQuery("UPDATE `user_info` SET `trading_locked` = '0' WHERE `user_id` = '" + Id + "' LIMIT 1");
                }
            }

            this._bannedPhraseCount = 0;
            this._sessionStart = PlusEnvironment.GetUnixTimestamp();
            this._messengerSpamCount = 0;
            this._messengerSpamTime = 0;
            this._creditsTickUpdate = PlusStaticGameSettings.UserCreditsUpdateTimer;

            this._tentId = 0;
            this._hopperId = 0;
            this._isHopping = false;
            this._teleportId = 0;
            this._isTeleporting = false;
            this._teleportingRoomId = 0;
            this._roomAuthOk = false;
            this._currentRoomId = 0;

            this._hasSpoken = false;
            this._lastAdvertiseReport = 0;
            this._advertisingReported = false;
            this._advertisingReportBlocked = AdvertisingReportBlocked;

            this._wiredInteraction = false;
            this._questLastCompleted = 0;
            this._inventoryAlert = false;
            this._ignoreBobbaFilter = false;
            this._wiredTeleporting = false;
            this._customBubbleId = 0;
            this._onHelperDuty = false;
            this._fastfoodScore = 0;
            this._petId = 0;
            this._tempInt = 0;

            this._lastGiftPurchaseTime = DateTime.Now;
            this._lastMottoUpdateTime = DateTime.Now;
            this._lastClothingUpdateTime = DateTime.Now;
            this._lastForumMessageUpdateTime = DateTime.Now;

            this._giftPurchasingWarnings = 0;
            this._mottoUpdateWarnings = 0;
            this._clothingUpdateWarnings = 0;

            this._sessionGiftBlocked = false;
            this._sessionMottoBlocked = false;
            this._sessionClothingBlocked = false;

            this.FavoriteRooms = new ArrayList();
            this.MutedUsers = new List<int>();
            this.Achievements = new ConcurrentDictionary<string, UserAchievement>();
            this.Relationships = new Dictionary<int, Relationship>();
            this.RatedRooms = new List<int>();
            this.UsersRooms = new List<RoomData>();

            //TODO: Nope.
            this.InitPermissions();

            #region Stats
            DataRow StatRow = null;
            using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
            {
                dbClient.SetQuery("SELECT `id`,`roomvisits`,`onlinetime`,`respect`,`respectgiven`,`giftsgiven`,`giftsreceived`,`dailyrespectpoints`,`dailypetrespectpoints`,`achievementscore`,`quest_id`,`quest_progress`,`groupid`,`tickets_answered`,`respectstimestamp`,`forum_posts` FROM `user_stats` WHERE `id` = @user_id LIMIT 1");
                dbClient.AddParameter("user_id", Id);
                StatRow = dbClient.getRow();

                if (StatRow == null)//No row, add it yo
                {
                    dbClient.RunQuery("INSERT INTO `user_stats` (`id`) VALUES ('" + Id + "')");
                    dbClient.SetQuery("SELECT `id`,`roomvisits`,`onlinetime`,`respect`,`respectgiven`,`giftsgiven`,`giftsreceived`,`dailyrespectpoints`,`dailypetrespectpoints`,`achievementscore`,`quest_id`,`quest_progress`,`groupid`,`tickets_answered`,`respectstimestamp`,`forum_posts` FROM `user_stats` WHERE `id` = @user_id LIMIT 1");
                    dbClient.AddParameter("user_id", Id);
                    StatRow = dbClient.getRow();
                }

                try
                {
                    this._habboStats = new HabboStats(Convert.ToInt32(StatRow["roomvisits"]), Convert.ToDouble(StatRow["onlineTime"]), Convert.ToInt32(StatRow["respect"]), Convert.ToInt32(StatRow["respectGiven"]), Convert.ToInt32(StatRow["giftsGiven"]),
                        Convert.ToInt32(StatRow["giftsReceived"]), Convert.ToInt32(StatRow["dailyRespectPoints"]), Convert.ToInt32(StatRow["dailyPetRespectPoints"]), Convert.ToInt32(StatRow["AchievementScore"]),
                        Convert.ToInt32(StatRow["quest_id"]), Convert.ToInt32(StatRow["quest_progress"]), Convert.ToInt32(StatRow["groupid"]), Convert.ToString(StatRow["respectsTimestamp"]), Convert.ToInt32(StatRow["forum_posts"]));

                    if (Convert.ToString(StatRow["respectsTimestamp"]) != DateTime.Today.ToString("MM/dd"))
                    {
                        this._habboStats.RespectsTimestamp = DateTime.Today.ToString("MM/dd");
                        SubscriptionData SubData = null;

                        int DailyRespects = 10;

                        if (this._permissions.HasRight("mod_tool"))
                            DailyRespects = 20;
                        else if (PlusEnvironment.GetGame().GetSubscriptionManager().TryGetSubscriptionData(VIPRank, out SubData))
                            DailyRespects = SubData.Respects;

                        this._habboStats.DailyRespectPoints = DailyRespects;
                        this._habboStats.DailyPetRespectPoints = DailyRespects;

                        dbClient.RunQuery("UPDATE `user_stats` SET `dailyRespectPoints` = '" + DailyRespects + "', `dailyPetRespectPoints` = '" + DailyRespects + "', `respectsTimestamp` = '" + DateTime.Today.ToString("MM/dd") + "' WHERE `id` = '" + Id + "' LIMIT 1");
                    }
                }
                catch (Exception e)
                {
                    Logging.LogException(e.ToString());
                }
            }

            Group G = null;
            if (!PlusEnvironment.GetGame().GetGroupManager().TryGetGroup(this._habboStats.FavouriteGroupId, out G))
                this._habboStats.FavouriteGroupId = 0;
            #endregion
        }
Beispiel #2
0
        public Habbo(int Id, string Username, int Rank, string Motto, string Look, string Gender, int Credits, int ActivityPoints, int HomeRoom,
                     bool HasFriendRequestsDisabled, int LastOnline, bool AppearOffline, bool HideInRoom, double CreateDate, int Diamonds,
                     string machineID, string clientVolume, bool ChatPreference, bool FocusPreference, bool PetsMuted, bool BotsMuted, bool AdvertisingReportBlocked, double LastNameChange,
                     int GOTWPoints, bool IgnoreInvites, double TimeMuted, double TradingLock, bool AllowGifts, int FriendBarState, bool DisableForcedEffects, bool AllowMimic, int VIPRank)
        {
            _id             = Id;
            _username       = Username;
            _rank           = Rank;
            _motto          = Motto;
            _look           = Look;
            _gender         = Gender.ToLower();
            _footballLook   = PlusEnvironment.FilterFigure(Look.ToLower());
            _footballGender = Gender.ToLower();
            _credits        = Credits;
            _duckets        = ActivityPoints;
            _diamonds       = Diamonds;
            _gotwPoints     = GOTWPoints;
            _homeRoom       = HomeRoom;
            _lastOnline     = LastOnline;
            _accountCreated = CreateDate;
            _clientVolume   = new List <int>();
            foreach (string Str in clientVolume.Split(','))
            {
                int Val = 0;
                if (int.TryParse(Str, out Val))
                {
                    _clientVolume.Add(int.Parse(Str));
                }
                else
                {
                    _clientVolume.Add(100);
                }
            }

            _lastNameChange  = LastNameChange;
            _machineId       = machineID;
            _chatPreference  = ChatPreference;
            _focusPreference = FocusPreference;
            _isExpert        = IsExpert == true;

            _appearOffline         = AppearOffline;
            _allowTradingRequests  = true;                      //TODO
            _allowUserFollowing    = true;                      //TODO
            _allowFriendRequests   = HasFriendRequestsDisabled; //TODO
            _allowMessengerInvites = IgnoreInvites;
            _allowPetSpeech        = PetsMuted;
            _allowBotSpeech        = BotsMuted;
            _allowPublicRoomStatus = HideInRoom;
            _allowConsoleMessages  = true;
            _allowGifts            = AllowGifts;
            _allowMimic            = AllowMimic;
            _receiveWhispers       = true;
            _ignorePublicWhispers  = false;
            _playingFastFood       = false;
            _friendbarState        = FriendBarStateUtility.GetEnum(FriendBarState);
            _christmasDay          = ChristmasDay;
            _wantsToRideHorse      = 0;
            _timeAFK = 0;
            _disableForcedEffects = DisableForcedEffects;
            _vipRank = VIPRank;

            _disconnected = false;
            _habboSaved   = false;
            _changingName = false;

            _floodTime   = 0;
            _friendCount = 0;
            _timeMuted   = TimeMuted;
            _timeCached  = DateTime.Now;

            _tradingLockExpiry = TradingLock;
            if (_tradingLockExpiry > 0 && PlusEnvironment.GetUnixTimestamp() > TradingLockExpiry)
            {
                _tradingLockExpiry = 0;
                using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
                {
                    dbClient.RunQuery("UPDATE `user_info` SET `trading_locked` = '0' WHERE `user_id` = '" + Id + "' LIMIT 1");
                }
            }

            _bannedPhraseCount  = 0;
            _sessionStart       = PlusEnvironment.GetUnixTimestamp();
            _messengerSpamCount = 0;
            _messengerSpamTime  = 0;
            _creditsTickUpdate  = Convert.ToInt32(PlusEnvironment.GetSettingsManager().TryGetValue("user.currency_scheduler.tick"));

            _tentId            = 0;
            _hopperId          = 0;
            _isHopping         = false;
            _teleportId        = 0;
            _isTeleporting     = false;
            _teleportingRoomId = 0;
            _roomAuthOk        = false;
            _currentRoomId     = 0;

            _hasSpoken                = false;
            _lastAdvertiseReport      = 0;
            _advertisingReported      = false;
            _advertisingReportBlocked = AdvertisingReportBlocked;

            _wiredInteraction   = false;
            _questLastCompleted = 0;
            _inventoryAlert     = false;
            _ignoreBobbaFilter  = false;
            _wiredTeleporting   = false;
            _customBubbleId     = 0;
            _onHelperDuty       = false;
            _fastfoodScore      = 0;
            _petId   = 0;
            _tempInt = 0;

            _lastGiftPurchaseTime       = DateTime.Now;
            _lastMottoUpdateTime        = DateTime.Now;
            _lastClothingUpdateTime     = DateTime.Now;
            _lastForumMessageUpdateTime = DateTime.Now;

            _giftPurchasingWarnings = 0;
            _mottoUpdateWarnings    = 0;
            _clothingUpdateWarnings = 0;

            _sessionGiftBlocked     = false;
            _sessionMottoBlocked    = false;
            _sessionClothingBlocked = false;

            FavoriteRooms = new ArrayList();
            Achievements  = new ConcurrentDictionary <string, UserAchievement>();
            Relationships = new Dictionary <int, Relationship>();
            RatedRooms    = new List <int>();

            //TODO: Nope.
            InitPermissions();

            #region Stats
            DataRow StatRow = null;
            using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
            {
                dbClient.SetQuery("SELECT `id`,`roomvisits`,`onlinetime`,`respect`,`respectgiven`,`giftsgiven`,`giftsreceived`,`dailyrespectpoints`,`dailypetrespectpoints`,`achievementscore`,`quest_id`,`quest_progress`,`groupid`,`tickets_answered`,`respectstimestamp`,`forum_posts` FROM `user_stats` WHERE `id` = @user_id LIMIT 1");
                dbClient.AddParameter("user_id", Id);
                StatRow = dbClient.GetRow();

                if (StatRow == null)//No row, add it yo
                {
                    dbClient.RunQuery("INSERT INTO `user_stats` (`id`) VALUES ('" + Id + "')");
                    dbClient.SetQuery("SELECT `id`,`roomvisits`,`onlinetime`,`respect`,`respectgiven`,`giftsgiven`,`giftsreceived`,`dailyrespectpoints`,`dailypetrespectpoints`,`achievementscore`,`quest_id`,`quest_progress`,`groupid`,`tickets_answered`,`respectstimestamp`,`forum_posts` FROM `user_stats` WHERE `id` = @user_id LIMIT 1");
                    dbClient.AddParameter("user_id", Id);
                    StatRow = dbClient.GetRow();
                }

                try
                {
                    _habboStats = new HabboStats(Convert.ToInt32(StatRow["roomvisits"]), Convert.ToDouble(StatRow["onlineTime"]), Convert.ToInt32(StatRow["respect"]), Convert.ToInt32(StatRow["respectGiven"]), Convert.ToInt32(StatRow["giftsGiven"]),
                                                 Convert.ToInt32(StatRow["giftsReceived"]), Convert.ToInt32(StatRow["dailyRespectPoints"]), Convert.ToInt32(StatRow["dailyPetRespectPoints"]), Convert.ToInt32(StatRow["AchievementScore"]),
                                                 Convert.ToInt32(StatRow["quest_id"]), Convert.ToInt32(StatRow["quest_progress"]), Convert.ToInt32(StatRow["groupid"]), Convert.ToString(StatRow["respectsTimestamp"]), Convert.ToInt32(StatRow["forum_posts"]));

                    if (Convert.ToString(StatRow["respectsTimestamp"]) != DateTime.Today.ToString("MM/dd"))
                    {
                        _habboStats.RespectsTimestamp = DateTime.Today.ToString("MM/dd");
                        SubscriptionData SubData = null;

                        int DailyRespects = 10;

                        if (_permissions.HasRight("mod_tool"))
                        {
                            DailyRespects = 20;
                        }
                        else if (PlusEnvironment.GetGame().GetSubscriptionManager().TryGetSubscriptionData(VIPRank, out SubData))
                        {
                            DailyRespects = SubData.Respects;
                        }

                        _habboStats.DailyRespectPoints    = DailyRespects;
                        _habboStats.DailyPetRespectPoints = DailyRespects;

                        dbClient.RunQuery("UPDATE `user_stats` SET `dailyRespectPoints` = '" + DailyRespects + "', `dailyPetRespectPoints` = '" + DailyRespects + "', `respectsTimestamp` = '" + DateTime.Today.ToString("MM/dd") + "' WHERE `id` = '" + Id + "' LIMIT 1");
                    }
                }
                catch (Exception e)
                {
                    ExceptionLogger.LogException(e);
                }
            }

            Group G = null;
            if (!PlusEnvironment.GetGame().GetGroupManager().TryGetGroup(_habboStats.FavouriteGroupId, out G))
            {
                _habboStats.FavouriteGroupId = 0;
            }
            #endregion
        }
Beispiel #3
0
        public Habbo(int id,
                     string username,
                     int rank,
                     string motto,
                     string look,
                     string gender,
                     int credits,
                     int activityPoints,
                     int homeRoom,
                     bool hasFriendRequestsDisabled,
                     int lastOnline,
                     bool appearOffline,
                     bool hideInRoom,
                     double createDate,
                     int diamonds,
                     string machineId,
                     string clientVolume,
                     bool chatPreference,
                     bool focusPreference,
                     bool petsMuted,
                     bool botsMuted,
                     bool advertisingReportBlocked,
                     double lastNameChange,
                     int gotwPoints,
                     bool ignoreInvites,
                     double timeMuted,
                     double tradingLock,
                     bool allowGifts,
                     int friendBarState,
                     bool disableForcedEffects,
                     bool allowMimic,
                     int vipRank)
        {
            Id             = id;
            Username       = username;
            Rank           = rank;
            Motto          = motto;
            Look           = look;
            Gender         = gender.ToLower();
            FootballLook   = PlusEnvironment.FilterFigure(look.ToLower());
            FootballGender = gender.ToLower();
            Credits        = credits;
            Duckets        = activityPoints;
            Diamonds       = diamonds;
            GotwPoints     = gotwPoints;
            HomeRoom       = homeRoom;
            LastOnline     = lastOnline;
            AccountCreated = createDate;
            ClientVolume   = new List <int>();
            foreach (var str in clientVolume.Split(','))
            {
                ClientVolume.Add(int.TryParse(str, out _) ? int.Parse(str) : 100);
            }

            LastNameChange        = lastNameChange;
            MachineId             = machineId;
            ChatPreference        = chatPreference;
            FocusPreference       = focusPreference;
            IsExpert              = IsExpert;
            AppearOffline         = appearOffline;
            AllowTradingRequests  = true;                      //TODO
            AllowUserFollowing    = true;                      //TODO
            AllowFriendRequests   = hasFriendRequestsDisabled; //TODO
            AllowMessengerInvites = ignoreInvites;
            AllowPetSpeech        = petsMuted;
            AllowBotSpeech        = botsMuted;
            AllowPublicRoomStatus = hideInRoom;
            AllowConsoleMessages  = true;
            AllowGifts            = allowGifts;
            AllowMimic            = allowMimic;
            ReceiveWhispers       = true;
            IgnorePublicWhispers  = false;
            PlayingFastFood       = false;
            FriendbarState        = FriendBarStateUtility.GetEnum(friendBarState);
            ChristmasDay          = ChristmasDay;
            WantsToRideHorse      = 0;
            TimeAfk = 0;
            DisableForcedEffects = disableForcedEffects;
            VipRank           = vipRank;
            _disconnected     = false;
            _habboSaved       = false;
            ChangingName      = false;
            FloodTime         = 0;
            FriendCount       = 0;
            TimeMuted         = timeMuted;
            _timeCached       = DateTime.Now;
            TradingLockExpiry = tradingLock;
            if (TradingLockExpiry > 0 && PlusEnvironment.GetUnixTimestamp() > TradingLockExpiry)
            {
                TradingLockExpiry = 0;
                using (var dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
                {
                    dbClient.RunQuery("UPDATE `user_info` SET `trading_locked` = '0' WHERE `user_id` = '" + id + "' LIMIT 1");
                }
            }
            BannedPhraseCount          = 0;
            SessionStart               = PlusEnvironment.GetUnixTimestamp();
            MessengerSpamCount         = 0;
            MessengerSpamTime          = 0;
            CreditsUpdateTick          = Convert.ToInt32(PlusEnvironment.GetSettingsManager().TryGetValue("user.currency_scheduler.tick"));
            TentId                     = 0;
            HopperId                   = 0;
            IsHopping                  = false;
            TeleporterId               = 0;
            IsTeleporting              = false;
            TeleportingRoomId          = 0;
            RoomAuthOk                 = false;
            CurrentRoomId              = 0;
            HasSpoken                  = false;
            LastAdvertiseReport        = 0;
            AdvertisingReported        = false;
            AdvertisingReportedBlocked = advertisingReportBlocked;
            WiredInteraction           = false;
            QuestLastCompleted         = 0;
            InventoryAlert             = false;
            IgnoreBobbaFilter          = false;
            WiredTeleporting           = false;
            CustomBubbleId             = 0;
            OnHelperDuty               = false;
            FastfoodScore              = 0;
            PetId   = 0;
            TempInt = 0;
            LastGiftPurchaseTime       = DateTime.Now;
            LastMottoUpdateTime        = DateTime.Now;
            LastClothingUpdateTime     = DateTime.Now;
            LastForumMessageUpdateTime = DateTime.Now;
            GiftPurchasingWarnings     = 0;
            MottoUpdateWarnings        = 0;
            ClothingUpdateWarnings     = 0;
            SessionGiftBlocked         = false;
            SessionMottoBlocked        = false;
            SessionClothingBlocked     = false;
            FavoriteRooms = new ArrayList();
            Achievements  = new ConcurrentDictionary <string, UserAchievement>();
            Relationships = new Dictionary <int, Relationship>();
            RatedRooms    = new List <int>();
            UsersRooms    = new List <RoomData>();

            //TODO: Nope.
            InitPermissions();
            DataRow statRow = null;

            using (var dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
            {
                dbClient.SetQuery(
                    "SELECT `id`,`roomvisits`,`onlinetime`,`respect`,`respectgiven`,`giftsgiven`,`giftsreceived`,`dailyrespectpoints`,`dailypetrespectpoints`,`achievementscore`,`quest_id`,`quest_progress`,`groupid`,`tickets_answered`,`respectstimestamp`,`forum_posts` FROM `user_stats` WHERE `id` = @user_id LIMIT 1");
                dbClient.AddParameter("user_id", id);
                statRow = dbClient.GetRow();
                if (statRow == null) //No row, add it yo
                {
                    dbClient.RunQuery("INSERT INTO `user_stats` (`id`) VALUES ('" + id + "')");
                    dbClient.SetQuery(
                        "SELECT `id`,`roomvisits`,`onlinetime`,`respect`,`respectgiven`,`giftsgiven`,`giftsreceived`,`dailyrespectpoints`,`dailypetrespectpoints`,`achievementscore`,`quest_id`,`quest_progress`,`groupid`,`tickets_answered`,`respectstimestamp`,`forum_posts` FROM `user_stats` WHERE `id` = @user_id LIMIT 1");
                    dbClient.AddParameter("user_id", id);
                    statRow = dbClient.GetRow();
                }
                try
                {
                    _habboStats = new HabboStats(Convert.ToInt32(statRow["roomvisits"]),
                                                 Convert.ToDouble(statRow["onlineTime"]),
                                                 Convert.ToInt32(statRow["respect"]),
                                                 Convert.ToInt32(statRow["respectGiven"]),
                                                 Convert.ToInt32(statRow["giftsGiven"]),
                                                 Convert.ToInt32(statRow["giftsReceived"]),
                                                 Convert.ToInt32(statRow["dailyRespectPoints"]),
                                                 Convert.ToInt32(statRow["dailyPetRespectPoints"]),
                                                 Convert.ToInt32(statRow["AchievementScore"]),
                                                 Convert.ToInt32(statRow["quest_id"]),
                                                 Convert.ToInt32(statRow["quest_progress"]),
                                                 Convert.ToInt32(statRow["groupid"]),
                                                 Convert.ToString(statRow["respectsTimestamp"]),
                                                 Convert.ToInt32(statRow["forum_posts"]));
                    if (Convert.ToString(statRow["respectsTimestamp"]) != DateTime.Today.ToString("MM/dd"))
                    {
                        _habboStats.RespectsTimestamp = DateTime.Today.ToString("MM/dd");
                        SubscriptionData subData = null;
                        var dailyRespects        = 10;
                        if (_permissions.HasRight("mod_tool"))
                        {
                            dailyRespects = 20;
                        }
                        else if (PlusEnvironment.GetGame().GetSubscriptionManager().TryGetSubscriptionData(vipRank, out subData))
                        {
                            dailyRespects = subData.Respects;
                        }
                        _habboStats.DailyRespectPoints    = dailyRespects;
                        _habboStats.DailyPetRespectPoints = dailyRespects;
                        dbClient.RunQuery("UPDATE `user_stats` SET `dailyRespectPoints` = '" +
                                          dailyRespects +
                                          "', `dailyPetRespectPoints` = '" +
                                          dailyRespects +
                                          "', `respectsTimestamp` = '" +
                                          DateTime.Today.ToString("MM/dd") +
                                          "' WHERE `id` = '" +
                                          id +
                                          "' LIMIT 1");
                    }
                }
                catch (Exception e)
                {
                    ExceptionLogger.LogException(e);
                }
            }
            Group g = null;

            if (!PlusEnvironment.GetGame().GetGroupManager().TryGetGroup(_habboStats.FavouriteGroupId, out g))
            {
                _habboStats.FavouriteGroupId = 0;
            }
        }