Beispiel #1
0
        public HCatalogPage(HMessage packet)
        {
            Id          = packet.ReadInteger();
            CatalogType = packet.ReadString();
            LayoutCode  = packet.ReadString();

            Images = new string[packet.ReadInteger()];
            for (int i = 0; i < Images.Length; i++)
            {
                Images[i] = packet.ReadString();
            }

            Texts = new string[packet.ReadInteger()];
            for (int i = 0; i < Texts.Length; i++)
            {
                Texts[i] = packet.ReadString();
            }

            Offers = new HCatalogOffer[packet.ReadInteger()];
            for (int i = 0; i < Offers.Length; i++)
            {
                Offers[i] = new HCatalogOffer(packet);
            }

            OfferId = packet.ReadInteger();
            AcceptSeasonCurrencyAsCredits = packet.ReadBoolean();

            IsFrontPage = (packet.Readable > 0);
        }
Beispiel #2
0
        public HCatalogPage(HPacket packet)
            : base(packet)
        {
            Id          = packet.ReadInt32();
            CatalogType = packet.ReadUTF8();
            LayoutCode  = packet.ReadUTF8();

            Images = new string[packet.ReadInt32()];
            for (int i = 0; i < Images.Length; i++)
            {
                Images[i] = packet.ReadUTF8();
            }

            Texts = new string[packet.ReadInt32()];
            for (int i = 0; i < Texts.Length; i++)
            {
                Texts[i] = packet.ReadUTF8();
            }

            Offers = new HCatalogOffer[packet.ReadInt32()];
            for (int i = 0; i < Offers.Length; i++)
            {
                Offers[i] = new HCatalogOffer(packet);
            }

            OfferId = packet.ReadInt32();
            AcceptSeasonCurrencyAsCredits = packet.ReadBoolean();

            //TODO: ?????????????
            IsFrontPage = (packet.ReadableBytes > 0);
        }