public BadgeManager(uint habboId, Habbo habbo, UserDataFactory userDataFactory) { this.Badges = new Dictionary <string, Badge>(StringComparer.OrdinalIgnoreCase); this.HabboID = habboId; this.Habbo = habbo; foreach (DataRow dataRow in userDataFactory.GetBadges()?.Rows) { string badgeId = (string)dataRow["badge_id"]; this.Badges.Add(badgeId, new Badge(badgeId, (int)dataRow["badge_slot"])); } }
public BadgeComponent(uint userId, UserDataFactory userdata) { this.Badges = new List <Badge>(); this.UserId = userId; DataTable dataTable_ = userdata.GetBadges(); if (dataTable_ != null) { foreach (DataRow dataRow in dataTable_.Rows) { this.Badges.Add(new Badge((string)dataRow["badge_id"], (int)dataRow["badge_slot"])); } } }