|Direction:||Server to Client|
|Used By:||Diablo II, Diablo II Lord of Destruction|
Received when requesting ladder data.
Multiple packets are received until all of the
Message data is entirely received.
Total response size: The size of the entire batch of SID_REQUESTLADDERDATA messages, excluding their headers.
Current message size: The size of the current message, excluding its header.
Total size of unreceived messages: The total size of all the unreceived messages in the batch, excluding their headers and first bytes. In the last packet, this value is 0, since there are no unreceived messages.
Rank of first entry: Always zero, except in the last message. In the last message, this specifies the zero-based rank of the first entry. (For example if this is 17 in the last packet, then ladder entries 18-33 were retrieved.)
The server may respond with one or more of these messages. The client must not handle the data until the last packet in the batch is received.
Message data should be concatenated backwards. For example, if 3 packets were received, then the data buffer should contain the data of the 3rd packet, followed by the data of the 2nd packet, followed by the data of the 1st packet. Only after the last packet was received, the data buffer should be parsed.
Important note: If the entry is the last entry in the packet, the character name might be smaller than 16 bytes. In this case, the client MUST add null bytes to the end of the packet, BEFORE adding it to the data buffer.
Ladder packets are NOT SENT IN ANY ORDER - They are often sent completely out of order and must be placed back into the proper order. You have to infer the sequencing based on the 'how big' fields in the 10 byte header.
Message data, after reconstruction, contains:
- AND 0x07 to get character:
0x08: Highlight this (if response to C > S [0x16] MCP_CHARRANK)
0x10: Dead character (hardcore only)
0x20: Hardcore character
0x40: Expansion character
Character name: The character name is always 16 bytes. If the name is shorter than 16 bytes, the string is padded with nulls. The last byte is always null, since character names are limited to 15 chars.