Esempio n. 1
0
 public void UpdateValues(Habbo habbo)
 {
     this.Username         = habbo.Username;
     this.Look             = habbo.Look;
     this.Motto            = habbo.Motto;
     this.AccountCreated   = habbo.AccountCreated;
     this.AchievementScore = habbo.GetUserStats()?.AchievementPoints ?? 0;
     this.FriendsCount     = habbo.GetMessenger()?.GetFriends()?.Count ?? 0;
     this.LastOnline       = habbo.LastOnline;
     this.Lovers           = habbo.GetMessenger()?.GetFriends()?.Where(f => f.Relation == MessengerFriendRelation.Love).Select(f => f.ID).ToList() ?? UserProfile.Empty;
     this.Friends          = habbo.GetMessenger()?.GetFriends()?.Where(f => f.Relation == MessengerFriendRelation.Smile).Select(f => f.ID).ToList() ?? UserProfile.Empty;
     this.Haters           = habbo.GetMessenger()?.GetFriends()?.Where(f => f.Relation == MessengerFriendRelation.Angry).Select(f => f.ID).ToList() ?? UserProfile.Empty;
     this.Badges           = habbo.GetBadgeManager()?.GetActiveBadges().Select(b => b.BadgeID).ToList() ?? UserProfile.EmptyBadges;
 }