예제 #1
0
 public static partial void CustomBinaryEndExport(MutagenWriter writer, IDialogTopicGetter obj)
 {
     try
     {
         if (!obj.Items.TryGet(out var items) ||
             items.Count == 0)
         {
             return;
         }
         using (HeaderExport.Header(writer, RecordTypes.GRUP, ObjectType.Group))
         {
             FormKeyBinaryTranslation.Instance.Write(
                 writer,
                 obj.FormKey);
             writer.Write((int)GroupTypeEnum.TopicChildren);
             writer.Write(obj.Timestamp);
             ListBinaryTranslation <IDialogItemGetter> .Instance.Write(
                 writer : writer,
                 items : items,
                 transl : (MutagenWriter subWriter, IDialogItemGetter subItem) =>
             {
                 subItem.WriteToBinary(subWriter);
             });
         }
     }
     catch (Exception ex)
     {
         throw RecordException.Enrich(ex, obj);
     }
 }
예제 #2
0
 static partial void WriteBinaryResponseCountCustom(MutagenWriter writer, IDialogTopicGetter item)
 {
     if (!item.Responses.TryGet(out var resp) ||
         resp.Count == 0)
     {
         using (HeaderExport.Subrecord(writer, RecordTypes.TIFC))
         {
             writer.WriteZeros(4);
         }
     }