Esempio n. 1
0
 public void Pack(BinaryWriter writer)
 {
     BaseQualities.Pack(writer);
     writer.Write(Flags);
     writer.WriteBool32(HasHealth);
     if ((Flags & 0x00000001) != 0)
     {
         AttribCache.Pack(writer);
     }
     if ((Flags & 0x00000002) != 0)
     {
         SkillTable.Pack(writer);
     }
     if ((Flags & 0x00000004) != 0)
     {
         Body.Pack(writer);
     }
     if ((Flags & 0x00000100) != 0)
     {
         SpellBook.Pack(writer);
     }
     if ((Flags & 0x00000200) != 0)
     {
         EnchantmentRegistry.Pack(writer);
     }
     if ((Flags & 0x00000008) != 0)
     {
         Filter.Pack(writer);
     }
     if ((Flags & 0x00000010) != 0)
     {
         Table.Pack(writer);
     }
     if ((Flags & 0x00000020) != 0)
     {
         CreationProfile.Pack(writer);
     }
     if ((Flags & 0x00000040) != 0)
     {
         PageDataList.Pack(writer);
     }
     if ((Flags & 0x00000080) != 0)
     {
         GeneratorTable.Pack(writer);
     }
     if ((Flags & 0x00000400) != 0)
     {
         GeneratorRegistry.Pack(writer);
     }
     if ((Flags & 0x00000800) != 0)
     {
         GeneratorQueue.Pack(writer);
     }
 }
Esempio n. 2
0
 public void Unpack(BinaryReader reader)
 {
     BaseQualities.Unpack(reader);
     Flags     = reader.ReadUInt32();
     HasHealth = reader.ReadBool32();
     if ((Flags & 0x00000001) != 0)
     {
         AttribCache.Unpack(reader);
     }
     if ((Flags & 0x00000002) != 0)
     {
         SkillTable.Unpack(reader);
     }
     if ((Flags & 0x00000004) != 0)
     {
         Body.Unpack(reader);
     }
     if ((Flags & 0x00000100) != 0)
     {
         SpellBook.Unpack(reader);
     }
     if ((Flags & 0x00000200) != 0)
     {
         EnchantmentRegistry.Unpack(reader);
     }
     if ((Flags & 0x00000008) != 0)
     {
         Filter.Unpack(reader);
     }
     if ((Flags & 0x00000010) != 0)
     {
         Table.Unpack(reader);
     }
     if ((Flags & 0x00000020) != 0)
     {
         CreationProfile.Unpack(reader);
     }
     if ((Flags & 0x00000040) != 0)
     {
         PageDataList.Unpack(reader);
     }
     if ((Flags & 0x00000080) != 0)
     {
         GeneratorTable.Unpack(reader);
     }
     if ((Flags & 0x00000400) != 0)
     {
         GeneratorRegistry.Unpack(reader);
     }
     if ((Flags & 0x00000800) != 0)
     {
         GeneratorQueue.Unpack(reader);
     }
 }