View Single Post
  #147  
Old 05-18-2016, 02:33 PM
Tyen05
Discordant
 
Join Date: Mar 2009
Location: eqbrowser.com
Posts: 309
Default

hardcoded x,y,z,h to the /loc infront of priest of discord in nqeynos, but my packet doesnt seem right

Client:
Code:
		public void DoClientUpdate()
		{
			GameObject us = EqemuConnectObject;
			float x = -us.transform.position.x;
			float y = us.transform.position.z;
			float z = us.transform.position.y;
			float h = us.transform.rotation.y;
						
			byte[] PositionUpdateRequest = new byte[38];
			Int32 position = 0;
				
			WriteInt16((short)OurEntityID, ref PositionUpdateRequest, ref position);
			WriteInt32(BitConverter.ToInt32(BitConverter.GetBytes(x), 0), ref PositionUpdateRequest, ref position);
			WriteInt32(BitConverter.ToInt32(BitConverter.GetBytes(y), 0), ref PositionUpdateRequest, ref position);
			WriteInt32(BitConverter.ToInt32(BitConverter.GetBytes(z), 0), ref PositionUpdateRequest, ref position);
			WriteInt32(0, ref PositionUpdateRequest, ref position);
			WriteInt32(0, ref PositionUpdateRequest, ref position);
			WriteInt32(0, ref PositionUpdateRequest, ref position);
			WriteInt32(0, ref PositionUpdateRequest, ref position);
			WriteInt32(0, ref PositionUpdateRequest, ref position);
			WriteInt32(122, ref PositionUpdateRequest, ref position);

			GenerateAndSendWorldPacket (PositionUpdateRequest.Length, 87 /* OP_ClientUpdate */, 2, curInstanceId, PositionUpdateRequest);
		}
Server:
Code:
struct PlayerPositionUpdateClient_Struct
{
/*0000*/ uint16	spawn_id;
/*0004*/ float	x_pos;				// x coord
/*0004*/ float	y_pos;				// y coord
/*0004*/ float	z_pos;				// z coord
/*0008*/ float	delta_x;			// Change in z
/*0012*/ float	delta_y;			// Change in x
/*0016*/ float	delta_z;			// Change in y
/*0016*/ float	delta_heading;			// Change in y
/*0020*/ int32	animationspeed;		// animation
/*0032*/ float	rotation;			// Directional heading
/*0036*/
};
UnityPacket:
Code:
[05-18-2016 :: 15:15:22] [Packet :: Client -> Server (Dump)] [OP_ClientUpdate - 0x0057] [Size: 40] 
   0: EB 00 EA 00 00 00 0B 00 - 00 00 02 00 00 00 00 00  | ................
  16: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  | ................
  32: 00 7A 00 00 00 00                                  | .z....
TitaniumPacket:
Code:
[05-18-2016 :: 02:37:22] [Packet :: Client -> Server] [OP_ClientUpdate - 0x0057] [Size: 38]
[05-18-2016 :: 02:37:22] [Packet :: Client -> Server (Dump)] [OP_ClientUpdate - 0x0057] [Size: 38]
   0: E9 00 2F 36 00 00 30 41 - 00 00 00 00 00 00 00 00  | ../6..0A........
  16: 00 00 00 00 00 00 20 00 - 00 00 6A 43 64 10 08 40  | ...... ...jCd..@
  32: D0 03 00 00
__________________
Browser based EQ project
Reply With Quote