Exemplo n.º 1
0
        public override void Deserialize(ICustomDataInput reader)
        {
            base.Deserialize(reader);
            ObjectGID = reader.ReadVarShort();
            var countEffects = reader.ReadShort();

            Effects = new List <ObjectEffect>();
            for (short i = 0; i < countEffects; i++)
            {
                var          effectstypeId = reader.ReadShort();
                ObjectEffect type          = new ObjectEffect();
                type.Deserialize(reader);
                Effects.Add(type);
            }
        }
Exemplo n.º 2
0
        public override void Deserialize(ICustomDataInput reader)
        {
            base.Deserialize(reader); // empty struct
            Position  = reader.ReadShort();
            ObjectGID = Convert.ToInt16(reader.ReadVarUhShort());
            var countEffects = reader.ReadShort();

            Effects = new List <ObjectEffect>();
            for (short i = 0; i < countEffects; i++)
            {
                var          effectstypeId = reader.ReadShort();
                ObjectEffect type          = ProtocolTypeManager.GetInstance <ObjectEffect>(effectstypeId);
                type.Deserialize(reader);
                Effects.Add(type);
            }
            ObjectUID = reader.ReadVarInt();
            Quantity  = reader.ReadVarInt();
        }
Exemplo n.º 3
0
        public override void Deserialize(ICustomDataInput reader)
        {
            ObjectUID = reader.ReadVarInt();
            var countEffects = reader.ReadShort();

            Effects = new List <ObjectEffect>();
            for (short i = 0; i < countEffects; i++)
            {
                var          effectstypeId = reader.ReadShort();
                ObjectEffect type          = new ObjectEffect();
                type.Deserialize(reader);
                Effects.Add(type);
            }
            var countPrices = reader.ReadShort();

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