protected RollerUpdate(IReadOnlyPacket packet) : this() { LocationX = packet.ReadInt(); LocationY = packet.ReadInt(); TargetX = packet.ReadInt(); TargetY = packet.ReadInt(); int n = packet.ReadLegacyShort(); for (int i = 0; i < n; i++) { ObjectUpdates.Add(RollerObjectUpdate.Parse(packet)); } RollerId = packet.ReadLegacyLong(); if (packet.Available > 0) { Type = (RollerUpdateType)packet.ReadInt(); if (Type == RollerUpdateType.MovingEntity || Type == RollerUpdateType.StationaryEntity) { if (packet.Protocol == ClientType.Unity) { packet.ReadInt(); } // Entity index may have changed to long here // but it's int everywhere else ??? EntityIndex = packet.ReadInt(); EntityLocationZ = packet.ReadLegacyFloat(); EntityTargetZ = packet.ReadLegacyFloat(); } } }
protected ActivityPoints(IReadOnlyPacket packet) { short n = packet.ReadLegacyShort(); for (int i = 0; i < n; i++) { var type = (ActivityPointType)packet.ReadInt(); dictionary[type] = packet.ReadInt(); } }
protected UserSearchResults(IReadOnlyPacket packet) { var results = new List <UserSearchResult>(); short n = packet.ReadLegacyShort(); for (int i = 0; i < n; i++) { results.Add(UserSearchResult.Parse(packet)); } Friends = results.AsReadOnly(); results = new List <UserSearchResult>(); n = packet.ReadLegacyShort(); for (int i = 0; i < n; i++) { results.Add(UserSearchResult.Parse(packet)); } Others = results.AsReadOnly(); }
protected NavigatorSearchResults(IReadOnlyPacket packet) { Category = packet.ReadString(); Filter = packet.ReadString(); short n = packet.ReadLegacyShort(); for (int i = 0; i < n; i++) { Add(NavigatorSearchResultList.Parse(packet)); } }
protected CatalogPageNode(IReadOnlyPacket packet) { IsVisible = packet.ReadBool(); Icon = packet.ReadInt(); Id = packet.ReadInt(); Name = packet.ReadString(); Text = packet.ReadString(); short n = packet.ReadLegacyShort(); for (int i = 0; i < n; i++) { OfferIds.Add(packet.ReadInt()); } n = packet.ReadLegacyShort(); for (int i = 0; i < n; i++) { Children.Add(Parse(packet)); } }
private Heightmap(IReadOnlyPacket packet) { Width = packet.ReadInt(); short n = packet.ReadLegacyShort(); Length = n / Width; Values = new short[n]; for (int i = 0; i < n; i++) { Values[i] = packet.ReadShort(); } }
protected NavigatorSearchResultList(IReadOnlyPacket packet) { Category = packet.ReadString(); Text = packet.ReadString(); ActionAllowed = packet.ReadInt(); BoolA = packet.ReadBool(); ViewMode = packet.ReadInt(); short n = packet.ReadLegacyShort(); for (int i = 0; i < n; i++) { Add(RoomInfo.Parse(packet)); } }
protected CatalogPage(IReadOnlyPacket packet) { Id = packet.ReadInt(); Mode = packet.ReadString(); LayoutCode = packet.ReadString(); short n = packet.ReadLegacyShort(); for (int i = 0; i < n; i++) { Images.Add(packet.ReadString()); } n = packet.ReadLegacyShort(); for (int i = 0; i < n; i++) { Texts.Add(packet.ReadString()); } n = packet.ReadLegacyShort(); for (int i = 0; i < n; i++) { Offers.Add(CatalogOffer.Parse(packet)); } UnknownIntA = packet.ReadInt(); AcceptSeasonCurrencyAsCredits = packet.ReadBool(); if (packet.Available > 0) { n = packet.ReadLegacyShort(); for (int i = 0; i < n; i++) { Data.Add(CatalogPageData.Parse(packet)); } } }
public Bot(EntityType type, long id, int index, IReadOnlyPacket packet) : this(type, id, index) { if (type == EntityType.PrivateBot) { Gender = H.ToGender(packet.ReadString()); OwnerId = packet.ReadLegacyLong(); OwnerName = packet.ReadString(); short n = packet.ReadLegacyShort(); for (int i = 0; i < n; i++) { Data.Add(packet.ReadShort()); } } }
protected RoomInfo(IReadOnlyPacket packet) : this() { Id = packet.ReadLegacyLong(); Name = packet.ReadString(); OwnerId = packet.ReadLegacyLong(); OwnerName = packet.ReadString(); Access = (RoomAccess)packet.ReadInt(); Users = packet.ReadInt(); MaxUsers = packet.ReadInt(); Description = packet.ReadString(); Trading = (TradePermissions)packet.ReadInt(); Score = packet.ReadInt(); Ranking = packet.ReadInt(); Category = (RoomCategory)packet.ReadInt(); int n = packet.ReadLegacyShort(); for (int i = 0; i < n; i++) { Tags.Add(packet.ReadString()); } Flags = (RoomFlags)packet.ReadInt(); if (Flags.HasFlag(RoomFlags.HasOfficialRoomPic)) { OfficialRoomPicRef = packet.ReadString(); } if (Flags.HasFlag(RoomFlags.IsGroupHomeRoom)) { GroupId = packet.ReadLegacyLong(); GroupName = packet.ReadString(); GroupBadge = packet.ReadString(); } if (Flags.HasFlag(RoomFlags.HasEvent)) { EventName = packet.ReadString(); EventDescription = packet.ReadString(); EventMinutesLeft = packet.ReadInt(); } }
protected CatalogOffer(IReadOnlyPacket packet) { Id = packet.ReadInt(); FurniLine = packet.ReadString(); IsRentable = packet.ReadBool(); PriceInCredits = packet.ReadInt(); PriceInActivityPoints = packet.ReadInt(); ActivityPointType = (ActivityPointType)packet.ReadInt(); CanPurchaseAsGift = packet.ReadBool(); short n = packet.ReadLegacyShort(); for (int i = 0; i < n; i++) { Products.Add(CatalogProduct.Parse(packet)); } ClubLevel = packet.ReadInt(); CanPurchaseMultiple = packet.ReadBool(); IsPet = packet.ReadBool(); PreviewImage = packet.ReadString(); }