Exemplo n.º 1
0
 public static void Extract(string dir, string outFile)
 {
     using (writer = new IndentTextWriter(outFile))
     {
         GenericLogParser.ParseDir(SniffitztLogConverter.Extract,
                                   dir,
                                   ExtractVehicleIds);
     }
 }
Exemplo n.º 2
0
 public static void Extract(string dir, string outFile)
 {
     using (writer = new IndentTextWriter(outFile))
     {
         GenericLogParser.ParseDir(SniffitztLogConverter.Extract, dir,
                                   new LogHandler(opcode => opcode == RealmServerOpCode.SMSG_INITIALIZE_FACTIONS, HandleInitFactions),
                                   new LogHandler(opcode => opcode == RealmServerOpCode.SMSG_SET_FACTION_STANDING, UpdateReputations),
                                   new LogHandler(opcode => opcode == RealmServerOpCode.SMSG_TRAINER_LIST, HandleTrainerList),
                                   new LogHandler(HandleUpdates)
                                   );
     }
 }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            // Parse all files in the dir "/logs" using the KSniffer-log-format and
            // hand all SMSG_GAMEOBJECT_QUERY_RESPONSE packets to the HandleGOQueryPackets - method
            GenericLogParser.ParseDir(KSnifferLogConverter.ExtractSingleLine, "/logs",
                                      opcode => opcode == RealmServerOpCode.SMSG_GAMEOBJECT_QUERY_RESPONSE,
                                      HandleGOQueryPackets);


            // Parse all files in the dir "/logs" using the KSniffer-log-format (with all of a packet's content in a single line) and
            // hand all Quest-related packets to the HandleQuestPackets - method
            GenericLogParser.ParseDir(KSnifferLogConverter.ExtractSingleLine, "/logs",
                                      opcode => opcode.ToString().Contains("QUEST"),
                                      HandleQuestPackets);


            // Parse all files in the dir "/logs" using the Sniffitzt-log-format and
            // hand all Update-packets to the HandleUpdatePackets - method
            // NOTE: Update packets are different from all other kinds of packets and therefore get special treatment
            GenericLogParser.ParseDir(SniffitztLogConverter.Extract, "/logs",
                                      HandleUpdatePackets);
        }