public CookedLootData(CR2WFile cr2w, CVariable parent, string name) : base(cr2w, parent, name)
 {
     Key = new CUInt64(cr2w, this, nameof(Key))
     {
         IsSerialized = true
     };
     LootTableIds = new CArrayVLQInt32 <TweakDBID>(cr2w, this, nameof(LootTableIds))
     {
         IsSerialized = true
     };
     ContentAssignment = new TweakDBID(cr2w, this, nameof(ContentAssignment))
     {
         IsSerialized = true
     };
 }
Exemple #2
0
 public LocalizationString(CR2WFile cr2w, CVariable parent, string name) : base(cr2w, parent, name)
 {
     Unk1  = new CUInt64(cr2w, this, nameof(Unk1));
     Value = new CString(cr2w, this, nameof(Value));
 }
Exemple #3
0
        private void ReadBytes(int bytestart, BinaryReader reader)
        {
            reader.BaseStream.Seek(bytestart, SeekOrigin.Begin);

            try
            {
                var obj = new CVector(File);
                obj.Read(reader, (uint)(bytes.Length - bytestart));
                var v = CreatePropertyLayout(obj);
                v.Endpos   = (int)reader.BaseStream.Position;
                v.HexValue = bytes[bytestart].ToString("X2");
                v.Method   = "CVector";
            }
            catch
            {
            }

            reader.BaseStream.Seek(bytestart, SeekOrigin.Begin);

            try
            {
                var obj = new CUInt64(File);
                obj.Read(reader, (uint)(bytes.Length - bytestart));
                var v = CreatePropertyLayout(obj);
                v.Endpos   = (int)reader.BaseStream.Position;
                v.HexValue = bytes[bytestart].ToString("X2");
                v.Method   = "CUInt64";
            }
            catch
            {
            }

            reader.BaseStream.Seek(bytestart, SeekOrigin.Begin);

            try
            {
                var obj = new CUInt32(File);
                obj.Read(reader, (uint)(bytes.Length - bytestart));
                var v = CreatePropertyLayout(obj);
                v.Endpos   = (int)reader.BaseStream.Position;
                v.HexValue = bytes[bytestart].ToString("X2");
                v.Method   = "CUInt32";
            }
            catch
            {
            }


            reader.BaseStream.Seek(bytestart, SeekOrigin.Begin);

            try
            {
                var obj = new CUInt16(File);
                obj.Read(reader, (uint)(bytes.Length - bytestart));
                var v = CreatePropertyLayout(obj);
                v.Endpos   = (int)reader.BaseStream.Position;
                v.HexValue = bytes[bytestart].ToString("X2");
                v.Method   = "CUInt16";
            }
            catch
            {
            }

            reader.BaseStream.Seek(bytestart, SeekOrigin.Begin);

            try
            {
                var obj = new CUInt8(File);

                obj.Read(reader, (uint)(bytes.Length - bytestart));
                var v = CreatePropertyLayout(obj);
                v.Endpos   = (int)reader.BaseStream.Position;
                v.HexValue = bytes[bytestart].ToString("X2");
                v.Method   = "CUInt8";
            }
            catch
            {
            }

            reader.BaseStream.Seek(bytestart, SeekOrigin.Begin);

            try
            {
                var obj = new CDynamicInt(File);
                obj.Read(reader, (uint)(bytes.Length - bytestart));
                var v = CreatePropertyLayout(obj);
                v.Endpos   = (int)reader.BaseStream.Position;
                v.HexValue = bytes[bytestart].ToString("X2");
                v.Method   = "CDynamicInt";
            }
            catch
            {
            }

            reader.BaseStream.Seek(bytestart, SeekOrigin.Begin);

            try
            {
                var obj = new CFloat(File);
                obj.Read(reader, (uint)(bytes.Length - bytestart));
                var v = CreatePropertyLayout(obj);
                v.Endpos   = (int)reader.BaseStream.Position;
                v.HexValue = bytes[bytestart].ToString("X2");
                v.Method   = "CFloat";
            }
            catch
            {
            }

            reader.BaseStream.Seek(bytestart, SeekOrigin.Begin);

            try
            {
                var obj = new CName(File);

                obj.Read(reader, (uint)(bytes.Length - bytestart));
                var v = CreatePropertyLayout(obj);
                v.Endpos   = (int)reader.BaseStream.Position;
                v.HexValue = bytes[bytestart].ToString("X2");
                v.Method   = "CName";

                var valueTest = v.Value;
            }
            catch
            {
            }

            reader.BaseStream.Seek(bytestart, SeekOrigin.Begin);

            try
            {
                var obj = new CHandle(File);

                obj.Read(reader, (uint)(bytes.Length - bytestart));
                var v = CreatePropertyLayout(obj);
                v.Endpos   = (int)reader.BaseStream.Position;
                v.HexValue = bytes[bytestart].ToString("X2");
                v.Method   = "CHandle";

                var valueTest = v.Value;
            }
            catch
            {
            }

            reader.BaseStream.Seek(bytestart, SeekOrigin.Begin);

            try
            {
                var obj = new CSoft(File);

                obj.Read(reader, (uint)(bytes.Length - bytestart));
                var v = CreatePropertyLayout(obj);
                v.Endpos   = (int)reader.BaseStream.Position;
                v.HexValue = bytes[bytestart].ToString("X2");
                v.Method   = "CSoft";

                var valueTest = v.Value;
            }
            catch
            {
            }

            reader.BaseStream.Seek(bytestart, SeekOrigin.Begin);

            try
            {
                var obj = File.ReadVariable(reader);

                obj.Read(reader, (uint)(bytes.Length - bytestart));
                var v = CreatePropertyLayout(obj);
                v.Endpos   = (int)reader.BaseStream.Position;
                v.HexValue = bytes[bytestart].ToString("X2");
                v.Method   = "ReadVariable";
            }
            catch
            {
            }
        }
Exemple #4
0
 public TweakDBID(CR2WFile cr2w, CVariable parent, string name) : base(cr2w, parent, name)
 {
     Id = new CUInt64(cr2w, this, nameof(Id));
 }