Example #1
0
 public void Pack(BinaryWriter writer)
 {
     writer.Write(Flags);
     writer.Write((uint)Options);
     if ((Flags & 0x00000001) != 0)
     {
         ShortCutManager.Pack(writer);
     }
     Tab1.Pack(writer);
     if ((Flags & 0x00000004) != 0)
     {
         Tab2.Pack(writer);
         Tab3.Pack(writer);
         Tab4.Pack(writer);
         Tab5.Pack(writer);
     }
     if ((Flags & 0x00000010) != 0)
     {
         Tab2.Pack(writer);
         Tab3.Pack(writer);
         Tab4.Pack(writer);
         Tab5.Pack(writer);
         Tab6.Pack(writer);
         Tab7.Pack(writer);
     }
     if ((Flags & 0x00000400) != 0)
     {
         Tab2.Pack(writer);
         Tab3.Pack(writer);
         Tab4.Pack(writer);
         Tab5.Pack(writer);
         Tab6.Pack(writer);
         Tab7.Pack(writer);
         Tab8.Pack(writer);
     }
     if ((Flags & 0x00000008) != 0)
     {
         DesiredComps.Pack(writer);
     }
     if ((Flags & 0x00000020) != 0)
     {
         writer.Write((uint)SpellFilters);
     }
     if ((Flags & 0x00000040) != 0)
     {
         writer.Write((uint)Options2);
     }
     if ((Flags & 0x00000080) != 0)
     {
         writer.WriteString16L(TimestampFormat);
     }
     if ((Flags & 0x00000100) != 0)
     {
         GenericQualities.Pack(writer);
     }
     if ((Flags & 0x00000200) != 0)
     {
         writer.Write(VersionRow);
         Properties.Pack(writer);
         writer.Align();
     }
 }
Example #2
0
 public void Unpack(BinaryReader reader)
 {
     Flags   = reader.ReadUInt32();
     Options = (CharacterOptions1)reader.ReadUInt32();
     if ((Flags & 0x00000001) != 0)
     {
         ShortCutManager.Unpack(reader);
     }
     Tab1.Unpack(reader);
     if ((Flags & 0x00000004) != 0)
     {
         Tab2.Unpack(reader);
         Tab3.Unpack(reader);
         Tab4.Unpack(reader);
         Tab5.Unpack(reader);
     }
     if ((Flags & 0x00000010) != 0)
     {
         Tab2.Unpack(reader);
         Tab3.Unpack(reader);
         Tab4.Unpack(reader);
         Tab5.Unpack(reader);
         Tab6.Unpack(reader);
         Tab7.Unpack(reader);
     }
     if ((Flags & 0x00000400) != 0)
     {
         Tab2.Unpack(reader);
         Tab3.Unpack(reader);
         Tab4.Unpack(reader);
         Tab5.Unpack(reader);
         Tab6.Unpack(reader);
         Tab7.Unpack(reader);
         Tab8.Unpack(reader);
     }
     if ((Flags & 0x00000008) != 0)
     {
         DesiredComps.Unpack(reader);
     }
     if ((Flags & 0x00000020) != 0)
     {
         SpellFilters = (SpellBookFilterOptions)reader.ReadUInt32();
     }
     if ((Flags & 0x00000040) != 0)
     {
         Options2 = (CharacterOptions2)reader.ReadUInt32();
     }
     if ((Flags & 0x00000080) != 0)
     {
         TimestampFormat = reader.ReadString16L();
     }
     if ((Flags & 0x00000100) != 0)
     {
         GenericQualities.Unpack(reader);
     }
     if ((Flags & 0x00000200) != 0)
     {
         VersionRow = reader.ReadUInt32();
         Properties.Unpack(reader);
         reader.Align();
     }
 }