public virtual void Deserialize(IDataReader reader)
        {
            bonesId = reader.ReadVarUhShort();
            if (bonesId < 0)
            {
                throw new System.Exception("Forbidden value on bonesId = " + bonesId + ", it doesn't respect the following condition : bonesId < 0");
            }
            var limit = reader.ReadUShort();

            skins = new uint[limit];
            for (int i = 0; i < limit; i++)
            {
                skins[i] = reader.ReadVarUhShort();
            }
            limit         = reader.ReadUShort();
            indexedColors = new int[limit];
            for (int i = 0; i < limit; i++)
            {
                indexedColors[i] = reader.ReadInt();
            }
            limit  = reader.ReadUShort();
            scales = new int[limit];
            for (int i = 0; i < limit; i++)
            {
                scales[i] = reader.ReadVarShort();
            }
            limit       = reader.ReadUShort();
            subentities = new Types.SubEntity[limit];
            for (int i = 0; i < limit; i++)
            {
                subentities[i] = new Types.SubEntity();
                subentities[i].Deserialize(reader);
            }
        }
Beispiel #2
0
 public virtual void Deserialize(IDataReader reader)
 {
     bonesId = reader.ReadShort();
     if (bonesId < 0)
         throw new Exception("Forbidden value on bonesId = " + bonesId + ", it doesn't respect the following condition : bonesId < 0");
     var limit = reader.ReadUShort();
     skins = new short[limit];
     for (int i = 0; i < limit; i++)
     {
          skins[i] = reader.ReadShort();
     }
     limit = reader.ReadUShort();
     indexedColors = new int[limit];
     for (int i = 0; i < limit; i++)
     {
          indexedColors[i] = reader.ReadInt();
     }
     limit = reader.ReadUShort();
     scales = new short[limit];
     for (int i = 0; i < limit; i++)
     {
          scales[i] = reader.ReadShort();
     }
     limit = reader.ReadUShort();
     subentities = new Types.SubEntity[limit];
     for (int i = 0; i < limit; i++)
     {
          subentities[i] = new Types.SubEntity();
          subentities[i].Deserialize(reader);
     }
 }
        public virtual void Deserialize(ICustomDataInput reader)
        {
            bonesId = reader.ReadVarUhShort();
            if (bonesId < 0)
            {
                throw new Exception("Forbidden value on bonesId = " + bonesId + ", it doesn't respect the following condition : bonesId < 0");
            }
            var limit = reader.ReadUShort();

            skins = new List <ushort>();
            for (int i = 0; i < limit; i++)
            {
                skins.Add(reader.ReadVarUhShort());
            }
            limit         = reader.ReadUShort();
            indexedColors = new List <int>();
            for (int i = 0; i < limit; i++)
            {
                indexedColors.Add(reader.ReadInt());
            }
            limit  = reader.ReadUShort();
            scales = new List <short>();
            for (int i = 0; i < limit; i++)
            {
                scales.Add(reader.ReadVarShort());
            }
            limit       = reader.ReadUShort();
            subentities = new List <SubEntity>();
            for (int i = 0; i < limit; i++)
            {
                var subentity = new Types.SubEntity();
                subentity.Deserialize(reader);
                subentities.Add(subentity);
            }
        }
Beispiel #4
0
        public virtual void Deserialize(IDataReader reader)
        {
            bonesId = reader.ReadVarUhShort();
            var limit = (ushort)reader.ReadUShort();

            skins = new uint[limit];
            for (int i = 0; i < limit; i++)
            {
                skins[i] = reader.ReadVarUhShort();
            }
            limit         = (ushort)reader.ReadUShort();
            indexedColors = new int[limit];
            for (int i = 0; i < limit; i++)
            {
                indexedColors[i] = reader.ReadInt();
            }
            limit  = (ushort)reader.ReadUShort();
            scales = new int[limit];
            for (int i = 0; i < limit; i++)
            {
                scales[i] = reader.ReadVarShort();
            }
            limit       = (ushort)reader.ReadUShort();
            subentities = new Types.SubEntity[limit];
            for (int i = 0; i < limit; i++)
            {
                subentities[i] = new Types.SubEntity();
                subentities[i].Deserialize(reader);
            }
        }
Beispiel #5
0
        public virtual void Deserialize(IDataReader reader)
        {
            bonesId = reader.ReadVarShort();
            if (bonesId < 0)
            {
                throw new Exception("Forbidden value on bonesId = " + bonesId + ", it doesn't respect the following condition : bonesId < 0");
            }
            var limit  = reader.ReadShort();
            var skins_ = new short[limit];

            for (int i = 0; i < limit; i++)
            {
                skins_[i] = reader.ReadVarShort();
                if (skins_[i] < 0)
                {
                    throw new Exception("Forbidden value on skins_[i] = " + skins_[i] + ", it doesn't respect the following condition : skins_[i] < 0");
                }
            }
            skins = skins_;
            limit = reader.ReadShort();
            var indexedColors_ = new int[limit];

            for (int i = 0; i < limit; i++)
            {
                indexedColors_[i] = reader.ReadInt();
            }
            indexedColors = indexedColors_;
            limit         = reader.ReadShort();
            var scales_ = new short[limit];

            for (int i = 0; i < limit; i++)
            {
                scales_[i] = reader.ReadVarShort();
            }
            scales = scales_;
            limit  = reader.ReadShort();
            var subentities_ = new Types.SubEntity[limit];

            for (int i = 0; i < limit; i++)
            {
                subentities_[i] = new Types.SubEntity();
                subentities_[i].Deserialize(reader);
            }
            subentities = subentities_;
        }
Beispiel #6
0
 public virtual void Deserialize(ICustomDataInput reader)
 {
     bonesId = reader.ReadVarUhShort();
     if (bonesId < 0)
         throw new Exception("Forbidden value on bonesId = " + bonesId + ", it doesn't respect the following condition : bonesId < 0");
     var limit = reader.ReadUShort();
     skins = new List<ushort>();
     for (int i = 0; i < limit; i++)
     {
         skins.Add(reader.ReadVarUhShort());
     }
     limit = reader.ReadUShort();
     indexedColors = new List<int>();
     for (int i = 0; i < limit; i++)
     {
         indexedColors.Add(reader.ReadInt());
     }
     limit = reader.ReadUShort();
     scales = new List<short>();
     for (int i = 0; i < limit; i++)
     {
         scales.Add(reader.ReadVarShort());
     }
     limit = reader.ReadUShort();
     subentities = new List<SubEntity>();
     for (int i = 0; i < limit; i++)
     {
          var subentity = new Types.SubEntity();
         subentity.Deserialize(reader);
         subentities.Add(subentity);
     }
 }