public UserInfo() { Badges = new UserBadgeComponent(); Wallet = new UserWallet(); Preferences = new UserPreferences(); EffectComponent = new UserEffectComponent(); CreateDate = DateTime.Now; Subscription = new Subscription(); NavigatorLog = new List <UserSearchLog>(); FavoriteRooms = new List <RoomData>(); SupportTickets = new List <SupportTicket>(); TradeLocks = new List <TradeLock>(); MutedUsers = new List <UserInfo>(); Cautions = new List <UserCaution>(); Bans = new List <UserBan>(); Rank = Rank.Normal; RatedRooms = new List <RoomData>(); RecentlyVisitedRooms = new List <RoomData>(); Relationships = new RelationshipComponent(); Respect = new UserRespectComponent(); Tags = new List <string>(); Talents = new List <UserTalent>(); UserGroups = new List <Group>(); Achievements = new List <UserAchievement>(); Inventory = new Inventory(); UsersRooms = new List <RoomData>(); Look = "hr-115-42.hd-190-1.ch-215-62.lg-285-91.sh-290-62"; Gender = "M"; Motto = string.Empty; Email = string.Empty; BuilderInfo = new UserBuilderComponent(); Minimail = new List <Minimail>(); }
public override void Compose(Yupi.Protocol.ISender session, UserBadgeComponent badges) { using (ServerMessage message = Pool.GetMessageBuffer(Id)) { message.AppendInteger(badges.Badges.Count); foreach (UserBadge badge in badges.Badges) { message.AppendInteger(1); // TODO Magic constant message.AppendString(badge.Badge.Code); } IList <UserBadge> visibleBadges = badges.GetVisible(); message.AppendInteger(visibleBadges.Count); foreach (UserBadge badge in visibleBadges) { message.AppendInteger(badge.Slot); message.AppendString(badge.Badge.Code); } session.Send(message); } }