コード例 #1
0
 public void Pack(BinaryWriter writer)
 {
     writer.Write(Flags);
     writer.Write((uint)WeenieType);
     if ((Flags & 0x00000001) != 0)
     {
         IntStatsTable.Pack(writer);
     }
     if ((Flags & 0x00000080) != 0)
     {
         Int64StatsTable.Pack(writer);
     }
     if ((Flags & 0x00000002) != 0)
     {
         BoolStatsTable.Pack(writer);
     }
     if ((Flags & 0x00000004) != 0)
     {
         FloatStatsTable.Pack(writer);
     }
     if ((Flags & 0x00000010) != 0)
     {
         StrStatsTable.Pack(writer);
     }
     if ((Flags & 0x00000040) != 0)
     {
         DidStatsTable.Pack(writer);
     }
     if ((Flags & 0x00000008) != 0)
     {
         IidStatsTable.Pack(writer);
     }
     if ((Flags & 0x00000020) != 0)
     {
         PosStatsTable.Pack(writer);
     }
 }
コード例 #2
0
 public override void Pack(BinaryWriter writer)
 {
     writer.Write(ObjectID);
     writer.Write(Flags);
     writer.WriteBool32(Success);
     if ((Flags & 0x00000001) != 0)
     {
         IntStatsTable.Pack(writer);
     }
     if ((Flags & 0x00002000) != 0)
     {
         Int64StatsTable.Pack(writer);
     }
     if ((Flags & 0x00000002) != 0)
     {
         BoolStatsTable.Pack(writer);
     }
     if ((Flags & 0x00000004) != 0)
     {
         FloatStatsTable.Pack(writer);
     }
     if ((Flags & 0x00000008) != 0)
     {
         StrStatsTable.Pack(writer);
     }
     if ((Flags & 0x00001000) != 0)
     {
         DidStatsTable.Pack(writer);
     }
     if ((Flags & 0x00000010) != 0)
     {
         SpellBook.Pack(writer);
     }
     if ((Flags & 0x00000080) != 0)
     {
         ArmorProfile.Pack(writer);
     }
     if ((Flags & 0x00000100) != 0)
     {
         CreatureProfile.Pack(writer);
     }
     if ((Flags & 0x00000020) != 0)
     {
         WeaponProfile.Pack(writer);
     }
     if ((Flags & 0x00000040) != 0)
     {
         HookAppraisalProfile.Pack(writer);
     }
     if ((Flags & 0x00000200) != 0)
     {
         writer.Write((ushort)ProtHighlight);
         writer.Write((ushort)ProtColor);
     }
     if ((Flags & 0x00000800) != 0)
     {
         writer.Write((ushort)WeapHighlight);
         writer.Write((ushort)WeapColor);
     }
     if ((Flags & 0x00000400) != 0)
     {
         writer.Write((ushort)ResistHighlight);
         writer.Write((ushort)ResistColor);
     }
     if ((Flags & 0x00004000) != 0)
     {
         writer.Write(BaseArmorHead);
         writer.Write(BaseArmorChest);
         writer.Write(BaseArmorGroin);
         writer.Write(BaseArmorBicep);
         writer.Write(BaseArmorWrist);
         writer.Write(BaseArmorHand);
         writer.Write(BaseArmorThigh);
         writer.Write(BaseArmorShin);
         writer.Write(BaseArmorFoot);
     }
 }