How to dump decoded packets
edit packet.cpp and look for the following block of code:
if (showeq_params->logZonePackets)
if(!logDate(showeq_params->ZoneLogFilename, len, data))
emit toggle_log_ZoneData();
Move this block of code from where you find it to just before the line that reads:
switch (opCode)
All of this is in the EQPacket::dispatchZoneData method.
Depending on which version of packet.cpp you have, this logging block:
1 - may already be in the right place. (dump decrypted)
2 - may be at the beginning of the procedure. (dump encrypted)
3 - may be both at the beginning and in the correct place. (dump both)
Anyhow, if you just want to see clean data, move it to just above the switch statement, get rid of any other ones and turn on Zone Data logging from the Network menu option in the program.
As a courtesy, try not to make wild-ass guesses as to what things are. Examine the existing structure in everquest.h and locate all of those items. When you have identified all of them and verified their data-types, then move on to new information.
Notes/tips:
1: SpawnId is 16 bits.
2: Some structures are actually unions.
3: Everything is Intel ordered, so the hex values "12 56 9a de" represent the 32 bit number 0xDE9A5612. Could just as easily represent 2 16 bit numberx 0x5612 and 0xDE9A
4: Just because a number is "real" doesn't mean it is a "float"...coordinates are very often stored in fixed point notation.
5: Most things are split on byte boundries (with the noteable exception of coordinate/delta sets and heading/animation fields), so expect straightforward datastorage.
6: Learn to count. I posted some ugly code and I regret it. Before you post a structure, renumber it's comments and unknowns and make sure it adds up.
Have fun.
-piggy
Re: How to dump decoded packets
Quote:
Originally posted by codepig666
4: Just because a number is "real" doesn't mean it is a "float"...coordinates are very often stored in fixed point notation.
Ok I have a question. I didn't follow what you mean by this? Is it a reference to how the "door" orientation is stored? (From memory it scaled from 128 to 512 for 0 to 360 degrees). Basically I am not sure I am following your definition of "real" and "float" here.
Also, did you verify all items not listed as unknown in the above structure?
Also, for anyone interested on packet structures there is some more info and code to help dump opcodes here:
http://seq.sourceforge.net/forums/sh...ighlight=howto