World Packet: Difference between revisions
Jump to navigation
Jump to search
(Add World Packets category and info about header encryption) |
(Add more explanatory text) |
||
Line 2: | Line 2: | ||
World packets consist of a packet size, an [[Opcodes|Opcode]] and a body. | World packets consist of a packet size, an [[Opcodes|Opcode]] and a body. | ||
= Headers = | |||
All world packet headers are encrypted using the session key negotiated during login, except for [[SMSG_AUTH_CHALLENGE]] and [[CMSG_AUTH_SESSION]]. | |||
For server messages (SMSG) the headers look like: | For server messages (SMSG) the headers look like: | ||
Line 10: | Line 14: | ||
{{CMSG_Header}} | {{CMSG_Header}} | ||
= Process = | |||
World packets begin with the client making a TCP to the world server and then: | |||
# The server sends a [[SMSG_AUTH_CHALLENGE]]. | |||
# The client sends a [[CMSG_AUTH_SESSION]]. | |||
# The server sends a [[SMSG_AUTH_RESPONSE]]. | |||
# The client requests a character screen with [[CMSG_CHAR_ENUM]]. | |||
# The server responds with a list of characters in a [[SMSG_CHAR_ENUM]]. | |||
# The client is now at the character screen. | |||
[[Category:Packet]] | [[Category:Packet]] | ||
[[Category:World_Packets]] | [[Category:World_Packets]] |
Revision as of 19:25, 31 May 2021
World Packets are the majority of communication between the client and the world server.
World packets consist of a packet size, an Opcode and a body.
Headers
All world packet headers are encrypted using the session key negotiated during login, except for SMSG_AUTH_CHALLENGE and CMSG_AUTH_SESSION.
For server messages (SMSG) the headers look like:
Offset | Size / Endianness | Type | Name | Description |
---|---|---|---|---|
0x0 | 2 / Big | uint16 | size | Size of the packet including the opcode field. |
0x2 | 2 / Little | uint16 | opcode | Opcode for the packet. Determines the structure of the body. |
For client messages (CMSG) the headers look like:
Offset | Size / Endianness | Type | Name | Description |
---|---|---|---|---|
0x0 | 2 / Big | uint16 | size | Size of the packet including the opcode field. |
0x2 | 4 / Little | uint32 | opcode | Opcode for the packet. Determines the structure of the body. |
Process
World packets begin with the client making a TCP to the world server and then:
- The server sends a SMSG_AUTH_CHALLENGE.
- The client sends a CMSG_AUTH_SESSION.
- The server sends a SMSG_AUTH_RESPONSE.
- The client requests a character screen with CMSG_CHAR_ENUM.
- The server responds with a list of characters in a SMSG_CHAR_ENUM.
- The client is now at the character screen.