Example #1
0
        /// <summary>
        /// Renders a single WoW - Packet
        /// </summary>
        public static void Dump(ParsablePacketInfo info, IndentTextWriter writer)
        {
            var packet = info.Packet;

            if (packet.PacketId.IsUpdatePacket)
            {
                ParsedUpdatePacket.Dump(info.Timestamp, packet.ReadBytes(packet.Length - packet.HeaderSize), false, writer,
                                        packet.PacketId.RawId == (uint)RealmServerOpCode.SMSG_COMPRESSED_UPDATE_OBJECT);
            }
            else
            {
                var parser = new PacketParser(info);
                parser.Parse();
                parser.Dump(writer);
            }

            writer.WriteLine();
        }
Example #2
0
 /// <summary>
 /// Write human-readable version of log to ParsedQuestOutput.txt
 /// </summary>
 /// <param name="packet">Any kind of Update-packet</param>
 public static void HandleUpdatePackets(ParsedUpdatePacket packet)
 {
     // iterate over all Creation-UpdateBlocks in the UpdatePacket
     foreach (var block in packet.GetBlocks(UpdateType.Create))
     {
         // We only want NPC-information
         if (block.ObjectType == ObjectTypeId.Unit)
         {
             // write all NPCs that I encountered and have Level > 80 to a file
             // add a "u" (for unsigned in uint) to the number, since the Level is a uint
             if (block.GetUInt(UnitFields.LEVEL) > 80u)
             {
                 packet.Dump(level80MobsWriter);
                 level80MobsWriter.WriteLine();                                  // empty line in between entries
             }
         }
     }
 }
Example #3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="packet"></param>
 private void HandleUpdatePackets(ParsedUpdatePacket packet)
 {
     packet.Dump(m_output.Writer);
     m_output.Writer.WriteLine();
     m_output.Writer.Flush();
 }