예제 #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 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);
     }
 }
예제 #3
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);
     }
 }
예제 #4
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();
     }
 }