Exemplo n.º 1
0
 public Record(BethesdaRecord copyFrom)
 {
     this.RecordType = copyFrom.RecordType;
     this.Flags      = copyFrom.Flags;
     this.Id         = copyFrom.Id;
     this.Revision   = copyFrom.Revision;
     this.Version    = copyFrom.Version;
     this.UNKNOWN_22 = copyFrom.UNKNOWN_22;
     if (copyFrom.Flags.HasFlag(BethesdaRecordFlags.Compressed))
     {
         this.CompressedFieldData = copyFrom.Payload.ToArray();
         this.fields = new Lazy <List <Field> >(() => CopyFieldsFrom(BethesdaRecord.GetFields(new ArraySegment <byte>(Zlib.Uncompress(this.CompressedFieldData)))));
     }
     else
     {
         List <Field> myFields = CopyFieldsFrom(copyFrom.Fields);
         this.fields = new Lazy <List <Field> >(() => myFields);
         this.MakeFieldsNotLazy();
     }
 }
Exemplo n.º 2
0
 protected virtual void OnRecord(BethesdaRecord record)
 {
 }
Exemplo n.º 3
0
 public BethesdaFile(BethesdaRecord headerRecord, BethesdaGroup[] topGroups)
 {
     this.HeaderRecord = headerRecord;
     this.TopGroups    = topGroups;
 }