Пример #1
0
        public override void Deserialize(IDataReader reader)
        {
            base.Deserialize(reader);
            ObjectGID = reader.ReadVarUhShort();
            var EffectsCount = reader.ReadShort();

            Effects = new List <ObjectEffect>();
            for (var i = 0; i < EffectsCount; i++)
            {
                ObjectEffect objectToAdd = ProtocolTypeManager.GetInstance(reader.ReadUShort());
                objectToAdd.Deserialize(reader);
                Effects.Add(objectToAdd);
            }
        }
Пример #2
0
        public override void Deserialize(IDataReader reader)
        {
            ObjectUID = reader.ReadVarUhInt();
            var EffectsCount = reader.ReadShort();

            Effects = new List <ObjectEffect>();
            for (var i = 0; i < EffectsCount; i++)
            {
                ObjectEffect objectToAdd = ProtocolTypeManager.GetInstance(reader.ReadUShort());
                objectToAdd.Deserialize(reader);
                Effects.Add(objectToAdd);
            }
            var PricesCount = reader.ReadShort();

            Prices = new List <long>();
            for (var i = 0; i < PricesCount; i++)
            {
                Prices.Add(reader.ReadVarLong());
            }
        }