CMD REALM LIST Server: Difference between revisions
m (→Packet: Fix incorrect header size) |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 57: | Line 57: | ||
| || - / Big || char[] || address_port || Zero terminated string; address of the Realm ("ip:port") | | || - / Big || char[] || address_port || Zero terminated string; address of the Realm ("ip:port") | ||
|- | |- | ||
| || 4 / Little || float || population || Population value.<br>200 is always green "Recommended", <br>400 is always red "Full",<br>600 is always blue "Recommended".<br>Low/Medium/High are calculated based on the population values sent. | | || 4 / Little || float || population || Population value.<br>200 is always green "Recommended", <br>400 is always red "Full",<br>600 is always blue "Recommended".<br>Low/Medium/High are calculated based on the population values sent. Based on the UI code in 3.3.5 : population < 0 : LOW, population = 0 : medium, population > 1 : High. The client seems to clamp any value lower than -1 or higher than 1. | ||
|- | |- | ||
| || 1 / - || uint8 || num_chars || The number of characters the client has on the server. | | || 1 / - || uint8 || num_chars || The number of characters the client has on the server. | ||
Line 164: | Line 164: | ||
| || - / Big || char[] || address_port || Zero terminated string; address of the Realm ("ip:port") | | || - / Big || char[] || address_port || Zero terminated string; address of the Realm ("ip:port") | ||
|- | |- | ||
| || 4 / Little || float || population || Population value.<br>200 is always green "Recommended", <br>400 is always red "Full",<br>600 is always blue "Recommended".<br>Low/Medium/High are calculated based on the population values sent. | | || 4 / Little || float || population || Population value.<br>200 is always green "Recommended", <br>400 is always red "Full",<br>600 is always blue "Recommended".<br>Low/Medium/High are calculated based on the population values sent. Based on the UI code in 3.3.5 : population < 0 : LOW, population = 0 : medium, population > 1 : High. The client seems to clamp any value lower than -1 or higher than 1. | ||
|- | |- | ||
| || 1 / - || uint8 || num_chars || The number of characters the client has on the server. | | || 1 / - || uint8 || num_chars || The number of characters the client has on the server. | ||
Line 207: | Line 207: | ||
For {{Template:Sandbox/VersionRange|max_expansionlevel=1}} the absolute size can be calculated by adding: | For {{Template:Sandbox/VersionRange|max_expansionlevel=1}} the absolute size can be calculated by adding: | ||
* Size of the header (always 5) | * Size of the header (always 8, 5 if used for size field) | ||
* Size of each individual realm (12 + length(address) + length(name)) | * Size of each individual realm (12 + length(address) + length(name)) | ||
* Size of footer (always 2) | * Size of footer (always 2) |
Latest revision as of 03:11, 6 June 2024
CMD_REALM_LIST_Server is a Login Packet sent by the server after receiving a CMD_REALM_LIST_Client.
In an ideal scenario there are no further login packets. When the client selects a server it wants to connect to it establishes a TCP connection and waits for the SMSG_AUTH_CHALLENGE World Packet from the world server.
Packet Layout
The packet is composed of:
- A header
- Zero or more bodies
- A footer.
The header and footer are almost identical across versions, but the bodies are very different for versions ≥ .
Header
The header describes how many realm bodies the client should read.
Offset | Size / Endianness | Type | Name | Description |
---|---|---|---|---|
0x0 | 1 / - | uint8 | opcode | 0x10 for CMD_REALM_LIST |
0x1 | 2 / Little | uint16 | size | Size of the rest of packet, without the opcode and size fields (3 bytes). |
0x3 | 4 / - | uint32 | padding | Not used in public clients. Set to 0. |
0x7 | 2 / Little | uint16 | num_realms | Number of realm bodies in the packet. This field is a uint8 for versions ≤ . |
Body
Each body element contains information about a single realm.
(1.1.2.4125)
Offset | Size / Endianness | Type | Name | Description |
---|---|---|---|---|
0x0 | 4 / Little | uint32 | realm_type | 0 is normal, 1 is PvP, 6 is RP and 8 is RPPvP. |
0x4 | 1 / - | uint8 | flags | See RealmInfo_Server.flags table below. |
0x5 | - / Big | char[] | realm_name | Zero terminated string; name of the Realm |
- / Big | char[] | address_port | Zero terminated string; address of the Realm ("ip:port") | |
4 / Little | float | population | Population value. 200 is always green "Recommended", 400 is always red "Full", 600 is always blue "Recommended". Low/Medium/High are calculated based on the population values sent. Based on the UI code in 3.3.5 : population < 0 : LOW, population = 0 : medium, population > 1 : High. The client seems to clamp any value lower than -1 or higher than 1. | |
1 / - | uint8 | num_chars | The number of characters the client has on the server. | |
1 / - | uint8 | realm_category | The language or region of the server. How this is interpreted depends on the locale of the client. It is shown as tabs at the bottom of the realmlist screen. If there are only realms of one category no tabs are shown. See table RealmInfo_Server.realm_category Values. | |
1 / - | uint8 | realm_id | Used for the initial sorting of the realms. Identical values are not a problem. |
Value | Name | Description |
---|---|---|
0x00 | NONE | No changes. |
0x01 | INVALID | Color realm name in read. |
0x02 | OFFLINE | Gray out name and prevent selection. |
0x04 | SPECIFY_BUILD | Unused before 2.0.0. If set for later versions additional fields in the body are required. |
0x08 | UNK1 | Unused. |
0x10 | UNK2 | Unused. |
0x20 | FORCE_RECOMMENDED | Forces the client to show the server as "Recommended" in blue text, no matter what the population value is. |
0x40 | FORCE_NEW_PLAYERS | Forces the client to show the server as "Recommended" in green text, no matter what the population value is. |
0x80 | FORCE_FULL | Forces the client to show the population as "Full" in red text, no matter what the population value is. |
Value | Name | Description |
---|---|---|
0x00 | DEFAULT | Same as the first value for a locale. |
US | ||
0x01 | UNITED_STATES | United States. |
0x05 | OCEANIC | Oceania. |
EUROPE | ||
0x01 | ENGLISH | English. |
0x02 | GERMAN | German. |
0x03 | FRENCH | French. |
0x05 | SPANISH | Spanish. |
KOREA | ||
0x01 | KOREA | Korea. |
TAIWAN | ||
0x01 | TAIWAN | Taiwan. |
CHINA | ||
0x01 | CHINA | China. |
0x02 | CN3 | Unknown. |
0x03 | CN7 | Unknown. |
TEST | ||
0x01 | TEST_SERVER | Test. |
0x05 | OCEANIC_TEST | Oceanic test. |
QA | ||
0x01 | QA_SERVER | QA server. |
(2.4.3.8606)
Offset | Size / Endianness | Type | Name | Description |
---|---|---|---|---|
0x0 | 1 / Little | uint8 | realm_type | Mangos just says "realm type (this is second column in Cfg_Configs.dbc)". |
0x1 | 1 / - | bool | locked | Show realm as locked in client. |
0x2 | 1 / - | uint8 | realm_flags | See RealmInfo_Server.flags table below. Setting SPECIFY_BUILD requires the additional fields at the bottom. |
0x3 | - / Big | char[] | realm_name | Zero terminated string; name of the Realm |
- / Big | char[] | address_port | Zero terminated string; address of the Realm ("ip:port") | |
4 / Little | float | population | Population value. 200 is always green "Recommended", 400 is always red "Full", 600 is always blue "Recommended". Low/Medium/High are calculated based on the population values sent. Based on the UI code in 3.3.5 : population < 0 : LOW, population = 0 : medium, population > 1 : High. The client seems to clamp any value lower than -1 or higher than 1. | |
1 / - | uint8 | num_chars | The number of characters the client has on the server. | |
1 / - | uint8 | realm_category | The language or region of the server. How this is interpreted depends on the locale of the client. It is shown as tabs at the bottom of the realmlist screen. If there are only realms of one category no tabs are shown. See table RealmInfo_Server.realm_category Values. | |
1 / - | uint8 | realm_id | Used for the initial sorting of the realms. Identical values are not a problem. | |
realm_flags SPECIFY_BUILD fields | ||||
1 / - | uint8 | major_version | Major version of the server. | |
1 / - | uint8 | minor_version | Minor version of the server. | |
1 / - | uint8 | patch_version | Patch version of the server. | |
1 / Little | uint16 | revision | Revision of the server. Revision is not shown after the name, but mousing over will show it. |
The footer contains unused padding.
Offset | Size / Endianness | Type | Name | Description |
---|---|---|---|---|
0x0 | 2 / ? | uint16 | padding | Ignored in public clients. Set to 0. |
Size
Packet
The only variable fields for each realm are the name and address fields. Remember to count the string terminators (1 byte each) in the length of strings.
For ≤ the absolute size can be calculated by adding:
- Size of the header (always 8, 5 if used for size field)
- Size of each individual realm (12 + length(address) + length(name))
- Size of footer (always 2)
For ≥ the absolute size can be calculated by adding:
- Size of the header (always 9)
- Size of each individual realm (10 + length(address) + length(name), + 5 if SPECIFY_BUILD is set in realm_flags)
- Size of footer (always 2)
Field
The field value should be the same as the entire packet, minus the size of the opcode and size fields (3 bytes).