PDA

View Full Version : 06/19/2013 Changes



ShortBuss
06-19-2013, 04:12 PM
I have a start, but I won't be able to finish this today. Seems some utilities company really likes cutting my cable line so no internet for me for a few days. Here is what I have so far:

Opcodes:
<opcode id="1434" name="OP_PlayerProfile" updated="06/19/13">
<opcode id="64d6" name="OP_ZoneEntry" updated="06/19/13">
<opcode id="039e" name="OP_TimeOfDay" updated="06/19/13">
<opcode id="08f5" name="OP_NewZone" updated="06/19/13">
<opcode id="12d8" name="OP_SpawnDoor" updated="06/19/13">
<opcode id="0a1a" name="OP_GroundSpawn" updated="06/19/13">
<opcode id="1cb1" name="OP_SendZonePoints" updated="06/19/13">
<opcode id="3a96" name="OP_GuildMOTD" updated="06/19/13">
<opcode id="06c2" name="OP_ClientUpdate" updated="06/19/13">
<opcode id="38f4" name="OP_NpcMoveUpdate" updated="06/19/13">
<opcode id="2239" name="OP_MobUpdate" updated="06/19/13">
<opcode id="4cb5" name="OP_DeleteSpawn" updated="06/19/13">
<opcode id="05ed" name="OP_RemoveSpawn" updated="06/19/13">
<opcode id="6438" name="OP_Death" updated="06/19/13">
<opcode id="6f8c" name="OP_WearChange" updated="06/19/13">
<opcode id="3943" name="OP_SpawnAppearance" updated="06/19/13">

playerSelfPosStruct in Everquest.h. This should be correct except for pitch. Pitch seems to be gone, I can't find it anywhere.


/*
** Self Position Update
** Length: 42 Octets
** OpCode: PlayerPosCode
*/

struct playerSelfPosStruct
{
/*0000*/ uint16_t unknown0000; // ***Placeholder (update time counter?)
/*0002*/ uint16_t spawnId; // Player's spawn id
/*0004*/ uint16_t unknown0004; // ***Placeholder
/*0006*/ unsigned pitch:12; // pitch (up/down heading)
signed animation:10; // velocity
unsigned padding5:10;
/*0010*/ float deltaX; // Change in x
/*0014*/ float y; // y coord (2nd loc value)
/*0018*/ float deltaZ; // Change in z
/*0022*/ signed deltaHeading:10; // change in heading
unsigned padding4:12; // ***Placeholder
unsigned padding1:10; // ***Placeholder
/*0026*/ float deltaY; // Change in y
/*0030*/ unsigned heading:12; // Directional heading
unsigned padding2:10; // ***Placeholder
unsigned padding3:10; // ***Placeholder
/*0034*/ float z; // z coord (3rd loc value)
/*0038*/ float x; // x coord (1st loc value)
/*0042*/
};



SpawnStruct is changed. There's 12 bytes added in the packet I looked out. I found and fixed that, but I think there are more changes also as I'm still getting some bad sizes back on it.
In spawnshell.cpp in fillsSpawnStruct. Changing a skip from 25 to 37. Here's the area around it with change:


netStream.skipBytes(6);

spawn->petOwnerId = netStream.readUInt32NC();

// 12 bytes added 06/19/2013 patch in the middel. Changed 25 to 37.
netStream.skipBytes(37);
race = spawn->race;


Started working on the 24 byte position data but having trouble with it. I think it's due to spawnstruct still having some changes I haven't figured out yet.

deletemenow69
06-20-2013, 05:05 AM
Thanks for trying to get us up sir! If I can help in anyway, please just ask.

ShortBuss
06-20-2013, 08:44 AM
Finally got this working. The 12 bytes added to the spawn packet only happen for NPCs (Spawn->NPC = 1). At least this is what I've observed so far. So now it will skip 37 for NPC=1 and skip 25 for everything else. I think everything is working except for Pitch on the 42 byte player pos packet. I couldn't find it for some reason, but it doesn't seem to be having any negative impact on things.

The following patch/diff is from LATEST SVN. So make sure to re-extract latest SVN. DO NOT put this on top of your working code from May. I didn't check the May changes into SVN because I couldn't get the new SVN settings working until recently. I'll try to get these new June changes into SVN soon.



Index: conf/zoneopcodes.xml
================================================== =================
--- conf/zoneopcodes.xml (revision 788)
+++ conf/zoneopcodes.xml (working copy)
@@ -3,33 +3,33 @@
<seqopcodes>

<!-- Critical opcodes used directly by ShowEQ -->
- <opcode id="6b5b" name="OP_PlayerProfile" updated="04/17/13">
+ <opcode id="1434" name="OP_PlayerProfile" updated="06/19/13">
<comment>CharProfileCode</comment>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
- <opcode id="31d8" name="OP_ZoneEntry" updated="04/17/13">
+ <opcode id="64d6" name="OP_ZoneEntry" updated="06/19/13">
<comment>ZoneEntryCode</comment>
<payload dir="client" typename="ClientZoneEntryStruct" sizechecktype="match"/>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
- <opcode id="3377" name="OP_TimeOfDay" updated="04/17/13">
+ <opcode id="039e" name="OP_TimeOfDay" updated="06/19/13">
<comment>TimeOfDayCode</comment>
<payload dir="server" typename="timeOfDayStruct" sizechecktype="match"/>
</opcode>
- <opcode id="0bf6" name="OP_NewZone" updated="04/17/13">
+ <opcode id="08f5" name="OP_NewZone" updated="06/19/13">
<comment>NewZoneCode</comment>
<payload dir="server" typename="newZoneStruct" sizechecktype="match"/>
</opcode>
- <opcode id="375d" name="OP_SpawnDoor" updated="04/17/13">
+ <opcode id="12d8" name="OP_SpawnDoor" updated="06/19/13">
<comment>DoorSpawnsCode</comment>
<payload dir="server" typename="doorStruct" sizechecktype="modulus"/>
</opcode>
- <opcode id="3a2b" name="OP_GroundSpawn" updated="04/17/13">
+ <opcode id="0a1a" name="OP_GroundSpawn" updated="06/19/13">
<comment>MakeDropCode</comment>
<payload dir="server" typename="makeDropStruct" sizechecktype="none"/>
<payload dir="client" typename="uint8_t" sizechecktype="none"/>
</opcode>
- <opcode id="41b8" name="OP_SendZonePoints" updated="04/17/13">
+ <opcode id="1cb1" name="OP_SendZonePoints" updated="06/19/13">
<comment>Coords in a zone that will port you to another zone</comment>
<payload dir="server" typename="zonePointsStruct" sizechecktype="none"/>
</opcode>
@@ -41,40 +41,40 @@
<comment>ExpUpdateCode</comment>
<payload dir="server" typename="expUpdateStruct" sizechecktype="match"/>
</opcode>
- <opcode id="4e44" name="OP_GuildMOTD" updated="04/17/13">
+ <opcode id="3a96" name="OP_GuildMOTD" updated="06/19/13">
<comment>GuildMOTD</comment>
<payload dir="server" typename="guildMOTDStruct" sizechecktype="none"/>
</opcode>
- <opcode id="6962" name="OP_ClientUpdate" updated="04/17/13">
+ <opcode id="06c2" name="OP_ClientUpdate" updated="06/19/13">
<comment>Position updates</comment>
<payload dir="server" typename="playerSpawnPosStruct" sizechecktype="match"/>
<payload dir="both" typename="playerSelfPosStruct" sizechecktype="match"/>
</opcode>
- <opcode id="5a39" name="OP_NpcMoveUpdate" updated="04/17/13">
+ <opcode id="38f4" name="OP_NpcMoveUpdate" updated="06/19/13">
<comment>Position updates</comment>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
- <opcode id="6d4b" name="OP_MobUpdate" updated="04/17/13">
+ <opcode id="2239" name="OP_MobUpdate" updated="06/19/13">
<comment>MobUpdateCode</comment>
<payload dir="both" typename="spawnPositionUpdate" sizechecktype="match"/>
</opcode>
- <opcode id="0b78" name="OP_DeleteSpawn" updated="04/17/13">
+ <opcode id="4cb5" name="OP_DeleteSpawn" updated="06/19/13">
<comment>DeleteSpawnCode</comment>
<payload dir="both" typename="deleteSpawnStruct" sizechecktype="match"/>
</opcode>
- <opcode id="5279" name="OP_RemoveSpawn" updated="04/17/13">
+ <opcode id="05ed" name="OP_RemoveSpawn" updated="06/19/13">
<comment>Remove spawn from zone</comment>
<payload dir="both" typename="removeSpawnStruct" sizechecktype="none"/>
</opcode>
- <opcode id="1aa0" name="OP_Death" updated="04/17/13">
+ <opcode id="6438" name="OP_Death" updated="06/19/13">
<comment>old NewCorpseCode</comment>
<payload dir="server" typename="newCorpseStruct" sizechecktype="match"/>
</opcode>
- <opcode id="1ff6" name="OP_WearChange" updated="04/17/13">
+ <opcode id="6f8c" name="OP_WearChange" updated="06/19/13">
<comment>SpawnUpdateCode</comment>
<payload dir="both" typename="SpawnUpdateStruct" sizechecktype="match"/>
</opcode>
- <opcode id="130f" name="OP_SpawnAppearance" updated="04/17/13">
+ <opcode id="3943" name="OP_SpawnAppearance" updated="06/19/13">
<comment>SpawnAppearanceCode</comment>
<payload dir="both" typename="spawnAppearanceStruct" sizechecktype="match"/>
</opcode>
@@ -86,7 +86,7 @@
<comment>NpcHpUpdateCode Update HP % of a PC or NPC</comment>
<payload dir="both" typename="hpNpcUpdateStruct" sizechecktype="match"/>
</opcode>
- <opcode id="665a" name="OP_GuildMemberUpdate" updated="04/17/13">
+ <opcode id="4d7b" name="OP_GuildMemberUpdate" updated="06/19/13">
<comment>Info regarding guild members</comment>
<payload dir="server" typename="GuildMemberUpdate" sizechecktype="match"/>
</opcode>
@@ -94,20 +94,20 @@
<comment>Items dropped on the ground</comment>
<payload dir="both" typename="remDropStruct" sizechecktype="match"/>
</opcode>
- <opcode id="7329" name="OP_Action" updated="04/17/13">
+ <opcode id="1e52" name="OP_Action" updated="06/19/13">
<comment>Spells cast etc</comment>
<payload dir="both" typename="actionStruct" sizechecktype="match"/>
<payload dir="both" typename="actionAltStruct" sizechecktype="match"/>
</opcode>
- <opcode id="4725" name="OP_Action2" updated="04/17/13">
+ <opcode id="59d4" name="OP_Action2" updated="06/19/13">
<comment>Combat actions i.e. bash, kick etc</comment>
<payload dir="both" typename="action2Struct" sizechecktype="match"/>
</opcode>
- <opcode id="3815" name="OP_Consider" updated="04/17/13">
+ <opcode id="73ac" name="OP_Consider" updated="06/19/13">
<comment>ConsiderCode</comment>
<payload dir="both" typename="considerStruct" sizechecktype="match"/>
</opcode>
- <opcode id="3f43" name="OP_TargetMouse" updated="04/17/13">
+ <opcode id="7c5c" name="OP_TargetMouse" updated="06/19/13">
<comment>Targeting a person - old ClientTargetCode</comment>
<payload dir="both" typename="clientTargetStruct" sizechecktype="match"/>
</opcode>
Index: src/everquest.h
================================================== =================
--- src/everquest.h (revision 788)
+++ src/everquest.h (working copy)
@@ -1090,19 +1090,21 @@
{
struct
{
- unsigned pitch:12;
- signed y:19; // y coord
- unsigned padding03:01;
- signed z:19; // z coord
- signed deltaX:13; // change in x
- signed deltaZ:13; // change in z
- unsigned heading:12; // heading
- unsigned padding01:07;
- signed deltaY:13; // change in y
- signed x:19; // x coord
- signed animation:10; // velocity
- signed deltaHeading:10; // change in heading
- unsigned padding02:12;
+ unsigned pitch:12;
+ signed z:19; // z coord
+ unsigned padding01:01;
+ signed y:19; // y coord
+ signed deltaHeading:10; // change in heading
+ unsigned padding05:03;
+ signed x:19; // x coord
+ signed deltaY:13; // change in y
+ signed animation:10; // velocity
+ signed deltaZ:13; // change in z
+ unsigned padding02:06;
+ unsigned padding04:3;
+ unsigned heading:12; // heading
+ signed deltaX:13; // change in x
+ unsigned padding03:4;
};
int32_t posData[5];
};
@@ -2351,24 +2353,26 @@
/*0000*/ uint16_t spawnId;
/*0002*/ uint16_t spawnId2;
/*0004*/ unsigned pitch:12;
- signed y:19; // y coord
- unsigned padding03:01;
-/*0008*/ signed z:19; // z coord
+ signed z:19; // z coord
+ unsigned padding01:01;
+/*0008*/ signed y:19; // y coord
+ signed deltaHeading:10; // change in heading
+ unsigned padding05:03;
+/*0012*/ signed x:19; // x coord
+ signed deltaY:13; // change in y
+/*0016*/ signed animation:10; // velocity
+ signed deltaZ:13; // change in z
+ unsigned padding02:06;
+/*0020*/ unsigned padding04:3;
+ unsigned heading:12; // heading
signed deltaX:13; // change in x
-/*0012*/ signed deltaZ:13; // change in z
- unsigned heading:12; // heading
- unsigned padding01:07;
-/*0016*/ signed deltaY:13; // change in y
- signed x:19; // x coord
-/*0020*/ signed animation:10; // velocity
- signed deltaHeading:10; // change in heading
- unsigned padding02:12;
+ unsigned padding03:4;
/*0024*/
};

/*
** Self Position Update
-** Length: 46 Octets
+** Length: 42 Octets
** OpCode: PlayerPosCode
*/

@@ -2378,22 +2382,21 @@
/*0002*/ uint16_t spawnId; // Player's spawn id
/*0004*/ uint16_t unknown0004; // ***Placeholder
/*0006*/ unsigned pitch:12; // pitch (up/down heading)
- unsigned padding1:20; // ***Placeholder
+ signed animation:10; // velocity
+ unsigned padding5:10;
/*0010*/ float deltaX; // Change in x
-/*0014*/ signed animation:10; // velocity
- unsigned padding2:12; // ***Placeholder
+/*0014*/ float y; // y coord (2nd loc value)
+/*0018*/ float deltaZ; // Change in z
+/*0022*/ signed deltaHeading:10; // change in heading
+ unsigned padding4:12; // ***Placeholder
+ unsigned padding1:10; // ***Placeholder
+/*0026*/ float deltaY; // Change in y
+/*0030*/ unsigned heading:12; // Directional heading
+ unsigned padding2:10; // ***Placeholder
unsigned padding3:10; // ***Placeholder
-/*0018*/ float x; // x coord (1st loc value)
-/*0022*/ unsigned heading:12; // Directional heading
- unsigned padding6:20; // **Placeholder
-/*0026*/ float z; // z coord (3rd loc value)
-/*0030*/ signed deltaHeading:10; // change in heading
- unsigned padding4:10; // ***Placeholder
- unsigned padding5:12; // ***Placeholder
-/*0034*/ float deltaZ; // Change in z
-/*0038*/ float deltaY; // Change in y
-/*0042*/ float y; // y coord (2nd loc value)
-/*0046*/
+/*0034*/ float z; // z coord (3rd loc value)
+/*0038*/ float x; // x coord (1st loc value)
+/*0042*/
};


Index: src/player.cpp
================================================== =================
--- src/player.cpp (revision 788)
+++ src/player.cpp (working copy)
@@ -852,32 +852,31 @@
/*0002*/ uint16_t spawnId; // Player's spawn id
/*0004*/ uint16_t unknown0004; // ***Placeholder
/*0006*/ unsigned pitch:12; // pitch (up/down heading)
- unsigned padding1:20; // ***Placeholder
+ signed animation:10; // velocity
+ unsigned padding5:10;
/*0010*/ float deltaX; // Change in x
- /*0014*/ signed animation:10; // velocity
- unsigned padding2:12; // ***Placeholder
+ /*0014*/ float y; // y coord (2nd loc value)
+ /*0018*/ float deltaZ; // Change in z
+ /*0022*/ signed deltaHeading:10; // change in heading
+ unsigned padding4:12; // ***Placeholder
+ unsigned padding1:10; // ***Placeholder
+ /*0026*/ float deltaY; // Change in y
+ /*0030*/ unsigned heading:12; // Directional heading
+ unsigned padding2:10; // ***Placeholder
unsigned padding3:10; // ***Placeholder
- /*0018*/ float x; // x coord (1st loc value)
- /*0022*/ unsigned heading:12; // Directional heading
- unsigned padding6:20; // **Placeholder
- /*0026*/ float z; // z coord (3rd loc value)
- /*0030*/ signed deltaHeading:10; // change in heading
- unsigned padding4:10; // ***Placeholder
- unsigned padding5:12; // ***Placeholder
- /*0034*/ float deltaZ; // Change in z
- /*0038*/ float deltaY; // Change in y
- /*0042*/ float y; // y coord (2nd loc value)
- /*0046*/
+ /*0034*/ float z; // z coord (3rd loc value)
+ /*0038*/ float x; // x coord (1st loc value)
+ /*0042*/
};
#pragma pack(0)
struct pos *p = (struct pos *)data;
- printf("[%.2x](%f, %f, %f), dx %f dy %f dz %f head %d dhead %d anim %d pitch %d (%x, %x, %x, %x, %x, %x)\n",
+ printf("[%.2x](%f, %f, %f), dx %f dy %f dz %f head %d dhead %d anim %d pitch %d (%x, %x, %x, %x, %x)\n",
p->spawnId, p->x, p->y, p->z,
p->deltaX, p->deltaY, p->deltaZ,
p->heading, p->deltaHeading,
p->animation, p->pitch,
p->padding1, p->padding2, p->padding3,
- p->padding4, p->padding5, p->padding6 );
+ p->padding4, p->padding5 );

#endif

Index: src/spawnshell.cpp
================================================== =================
--- src/spawnshell.cpp (revision 788)
+++ src/spawnshell.cpp (working copy)
@@ -674,7 +674,15 @@

spawn->petOwnerId = netStream.readUInt32NC();

- netStream.skipBytes(25);
+ // 12 bytes added to NPC only in 06/19/2013.
+ if (spawn->NPC == 1)
+ {
+ netStream.skipBytes(37);
+ }
+ else
+ {
+ netStream.skipBytes(25);
+ }
race = spawn->race;

// this is how the client checks if equipment should be read.
@@ -910,30 +918,32 @@
/*0000*/ uint16_t spawnId;
/*0002*/ uint16_t spawnId2;
/*0004*/ unsigned pitch:12;
- signed y:19; // y coord
- unsigned padding03:01;
- /*0008*/ signed z:19; // z coord
+ signed z:19; // z coord
+ unsigned padding01:01;
+ /*0008*/ signed y:19; // y coord
+ signed deltaHeading:10; // change in heading
+ unsigned padding05:03;
+ /*0012*/ signed x:19; // x coord
+ signed deltaY:13; // change in y
+ /*0016*/ signed animation:10; // velocity
+ signed deltaZ:13; // change in z
+ unsigned padding02:06;
+ /*0020*/ unsigned padding04:3;
+ unsigned heading:12; // heading
signed deltaX:13; // change in x
- /*0012*/ signed deltaZ:13; // change in z
- unsigned heading:12; // heading
- unsigned padding01:07;
- /*0016*/ signed deltaY:13; // change in y
- signed x:19; // x coord
- /*0020*/ signed animation:10; // velocity
- signed deltaHeading:10; // change in heading
- unsigned padding02:12;
+ unsigned padding03:4;
/*0024*/
};
#pragma pack(0)
struct pos *p = (struct pos *)data;
if (p->spawnId == 0x1234)
- printf("[%.2x](%f, %f, %f), dx %f dy %f dz %f\n head %d dhead %d anim %d pitch %d (%x, %x, %x)\n",
+ printf("[%.2x](%f, %f, %f), dx %f dy %f dz %f\n head %d dhead %d anim %d pitch %d (%x, %x, %x, %x, %x)\n",
p->spawnId, float(p->x)/8.0, float(p->y/8.0), float(p->z)/8.0,
float(p->deltaX)/4.0, float(p->deltaY)/4.0,
float(p->deltaZ)/4.0,
p->heading, p->deltaHeading,
p->animation, p->pitch,
- p->padding01, p->padding02, p->padding03);
+ p->padding01, p->padding02, p->padding03, p->padding04, p->padding05);
#endif

updateSpawn(pupdate->spawnId, x, y, z, dx, dy, dz,

Fluxcapacitor
06-20-2013, 09:03 PM
Thank you! It's tedious work to figure this stuff out.

deletemenow69
06-21-2013, 12:26 PM
Thank you as well. As soon as I got SVN functioning properly with new url, I was able to compile with your patch. Initial login seg-faulted and exited. I relaunched, and zoned and it has worked ever since.

Thank you!

Razzle
06-28-2013, 09:47 AM
Works great. I picked back up my notes on getting it to work under cygwin, and have it working flawlessly. I had to change very little to get it running. Learning how to update the autoconf was something new. I had some initial seg faults that I have not had come back. Not sure on that. I did not like cygwins x server, so I used xming and it looks awesome. I still want to test under a few other versions of windows. Then I will push some updates to svn. Then on to my next bit of fun. QT4 maybe? Hmm. Or not for the faint of heart ... OSX. Yeah.

Razzle

Razzle
07-01-2013, 07:40 PM
Cygwin + Netbeans = Cool.