S>C 0x06 MCP_GAMEINFO
|Transport Layer:||Transmission Control Protocol (TCP)|
|Application Layer:||Diablo II Realm Messages (MCP)|
|Direction:||Server to Client|
|Used By:||Diablo II, Diablo II Lord of Destruction|
(does not include protocol header)
Information about a specific game. The game client requests this when a game is selected in the list.
Status is usually a set of flags about the game. If it is
0, the packet contains no useful information and the server is probably down. If it is
0xFFFFFFFE, the request was not valid.
Flag values (OR them together), if valid:
* The level range shown in game is calculated from the level restriction values;
difference bytes are used to make the range
max(1, level - difference) to
min(99, level + difference).
** Internally, there are 16 character slots, but the last 8 are always empty.
This value sometimes includes some empty character slots.
Then, some empty strings are added to the end of the packet.
To determine the number of characters really in the game:
CharsInGameReal = CharsInGameFake - AmountOfEmptyCharNames;
Byte N here refers to character in slot N, or 0 if the slot is empty.
The game status field indicates the game type and difficulty associated with the game. The following return values were observed consistently on both USEast and USWest realms.
Non-Ladder Softcore Expansion (Hell) : 0x00102004 Non-Ladder Softcore Expansion (Nightmare): 0x00101004 Non-Ladder Softcore Expansion (Normal) : 0x00100004 Non-Ladder Hardcore Expansion (Hell) : 0x00102804 Non-Ladder Hardcore Expansion (Nightmare): 0x00101804 Non-Ladder Hardcore Expansion (Normal) : 0x00100804 Non-Ladder Softcore Classic (Hell) : 0x00002004 Non-Ladder Softcore Classic (Nightmare): 0x00001004 Non-Ladder Softcore Classic (Normal) : 0x00000004 Non-Ladder Hardcore Classic (Hell) : 0x00002804 Non-Ladder Hardcore Classic (Nightmare): 0x00001804 Non-Ladder Hardcore Classic (Normal) : 0x00000804 Ladder Softcore Expansion (Hell) : 0x00302004 Ladder Softcore Expansion (Nightmare): 0x00301004 Ladder Softcore Expansion (Normal) : 0x00300004 Ladder Hardcore Expansion (Hell) : 0x00302804 Ladder Hardcore Expansion (Nightmare): 0x00301804 Ladder Hardcore Expansion (Normal) : 0x00300804 Ladder Softcore Classic (Hell) : 0x00202004 Ladder Softcore Classic (Nightmare): 0x00201004 Ladder Softcore Classic (Normal) : 0x00200004 Ladder Hardcore Classic (Hell) : 0x00202804 Ladder Hardcore Classic (Nightmare): 0x00201804 Ladder Hardcore Classic (Normal) : 0x00200804
In order to decode a successful response interpret it in the following way:
The game difficulty is this one of:
Nightmare : 0x1000; Hell : 0x2000; Normal : 0;
The game type is the bitwise or of any of:
Ladder : 0x200000; Expansion : 0x100000; Hardcore : 0x800;
bitwise or the difficulty with the game type and the number
0x4 to get a successful status response.
Other than the documented
0 response above, the server also returns
0xFFFFFFFE indicating the request was not valid for a number of reasons. This was observed sending the empty string, sending characters disallowed in a game name, and sending a string of a game that did not exist. In no case did this cause me to be IP-banned. There appears to be no differentiation between passworded and public games.
The field unknown appears to be the level restriction. It should be interpreted as 2 bytes not one word. The first byte read off the wire is the level to start from. On game creation this appears to be the creator's level but it can change as the creator gains levels or leaves the game. The second byte should be interpreted as the level difference. e.g. creating a game with a level 98 character with level restriction set to 30 results in
0x62 0x1E initially (again, this can change). To find the level restriction displayed in-game take the range to be
max(1, level-difference) to
min(99, level+difference). Thus a difference of 30 for a 98 character reads as 68 to 99 in-game. If there is no restriction specified these fields are both zero.
There is no restriction on requesting game information. A character need not be of the correct type, have the game password, have completed the correct difficulty, nor meet the level restriction in order to request game information.
Hi Kaylin, I've imported your email as a comment.
byte unused is actually string game_desc. You'll get the empty string if empty. In addition the terminating message that terminates the gamelist seems to be an additional byte in length, I'm not sure if it's always an additional byte in length. In retrospect this should have been obvious to me as the client gets the game description from this message too.