コード例 #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);
            }
        }
コード例 #2
0
ファイル: ObjectItem.cs プロジェクト: Teles1/Cookie
        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();
        }
コード例 #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());
            }
        }