Пример #1
0
 public void Unpack(BinaryReader reader)
 {
     Flags      = reader.ReadUInt32();
     WeenieType = (ObjectType)reader.ReadUInt32();
     if ((Flags & 0x00000001) != 0)
     {
         IntStatsTable.Unpack(reader);
     }
     if ((Flags & 0x00000080) != 0)
     {
         Int64StatsTable.Unpack(reader);
     }
     if ((Flags & 0x00000002) != 0)
     {
         BoolStatsTable.Unpack(reader);
     }
     if ((Flags & 0x00000004) != 0)
     {
         FloatStatsTable.Unpack(reader);
     }
     if ((Flags & 0x00000010) != 0)
     {
         StrStatsTable.Unpack(reader);
     }
     if ((Flags & 0x00000040) != 0)
     {
         DidStatsTable.Unpack(reader);
     }
     if ((Flags & 0x00000008) != 0)
     {
         IidStatsTable.Unpack(reader);
     }
     if ((Flags & 0x00000020) != 0)
     {
         PosStatsTable.Unpack(reader);
     }
 }
Пример #2
0
 public override void Unpack(BinaryReader reader)
 {
     base.Unpack(reader);
     ObjectID = reader.ReadUInt32();
     Flags    = reader.ReadUInt32();
     Success  = reader.ReadBool32();
     if ((Flags & 0x00000001) != 0)
     {
         IntStatsTable.Unpack(reader);
     }
     if ((Flags & 0x00002000) != 0)
     {
         Int64StatsTable.Unpack(reader);
     }
     if ((Flags & 0x00000002) != 0)
     {
         BoolStatsTable.Unpack(reader);
     }
     if ((Flags & 0x00000004) != 0)
     {
         FloatStatsTable.Unpack(reader);
     }
     if ((Flags & 0x00000008) != 0)
     {
         StrStatsTable.Unpack(reader);
     }
     if ((Flags & 0x00001000) != 0)
     {
         DidStatsTable.Unpack(reader);
     }
     if ((Flags & 0x00000010) != 0)
     {
         SpellBook.Unpack(reader);
     }
     if ((Flags & 0x00000080) != 0)
     {
         ArmorProfile.Unpack(reader);
     }
     if ((Flags & 0x00000100) != 0)
     {
         CreatureProfile.Unpack(reader);
     }
     if ((Flags & 0x00000020) != 0)
     {
         WeaponProfile.Unpack(reader);
     }
     if ((Flags & 0x00000040) != 0)
     {
         HookAppraisalProfile.Unpack(reader);
     }
     if ((Flags & 0x00000200) != 0)
     {
         ProtHighlight = (ArmorHighlightMask)reader.ReadUInt16();
         ProtColor     = (ArmorHighlightMask)reader.ReadUInt16();
     }
     if ((Flags & 0x00000800) != 0)
     {
         WeapHighlight = (WeaponHighlightMask)reader.ReadUInt16();
         WeapColor     = (WeaponHighlightMask)reader.ReadUInt16();
     }
     if ((Flags & 0x00000400) != 0)
     {
         ResistHighlight = (ResistHighlightMask)reader.ReadUInt16();
         ResistColor     = (ResistHighlightMask)reader.ReadUInt16();
     }
     if ((Flags & 0x00004000) != 0)
     {
         BaseArmorHead  = reader.ReadUInt32();
         BaseArmorChest = reader.ReadUInt32();
         BaseArmorGroin = reader.ReadUInt32();
         BaseArmorBicep = reader.ReadUInt32();
         BaseArmorWrist = reader.ReadUInt32();
         BaseArmorHand  = reader.ReadUInt32();
         BaseArmorThigh = reader.ReadUInt32();
         BaseArmorShin  = reader.ReadUInt32();
         BaseArmorFoot  = reader.ReadUInt32();
     }
 }