From 3829f228ef367e47f68b4caae55f1d67c4b03569 Mon Sep 17 00:00:00 2001 From: Graham Date: Sat, 5 Jun 2021 13:00:33 +0100 Subject: [PATCH] Add world list packet structure Signed-off-by: Graham --- share/doc/protocol/world-list.md | 65 ++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 share/doc/protocol/world-list.md diff --git a/share/doc/protocol/world-list.md b/share/doc/protocol/world-list.md new file mode 100644 index 0000000000..778029a91f --- /dev/null +++ b/share/doc/protocol/world-list.md @@ -0,0 +1,65 @@ +# World list + +## Downstream + +| Opcode | Length | Jagex name | Description | +|-------:|---------------:|-----------------------------|------------------------------------| +| 0 | Variable short | Unknown | World list | + +### 0 (World list) + +| Data type | Description | +|--------------|-------------------------| +| UnsignedByte | Version, must be 1 | +| Boolean | Worlds updated | + +The following fields are only present if the worlds updated flag is set: + +| Data type | Description | +|--------------------|-------------------------| +| UnsignedShortSmart | Number of countries (n) | +| Country\[n\] | Countries (see below) | +| UnsignedShortSmart | Minimum world ID | +| UnsignedShortSmart | Maximum world ID | +| UnsignedShortSmart | Number of worlds (o) | +| World\[o\] | Worlds (see below) | +| Int | Checksum | + +The following fields are always present: + +| Data type | Description | +|--------------------|---------------------------| +| PlayerCount\[o\] | Player counts (see below) | + +#### Country + +| Data type | Description | +|--------------------|----------------| +| UnsignedShortSmart | Flag sprite ID | +| VersionedString | Name | + +#### World + +| Data type | Description | +|--------------------|----------------------------------------------| +| UnsignedShortSmart | Offset (world ID minus the minimum world ID) | +| UnsignedByte | Country ID (from the list in the packet) | +| Int | Flags (see below) | +| VersionedString | Activity | +| VersionedString | Hostname | + +##### Flags + +| Flag | Description | +|-----:|--------------| +| 0x1 | Members only | +| 0x2 | Quick chat | +| 0x4 | PvP | +| 0x8 | Loot share | + +### Player count + +| Data type | Description | +|--------------------|----------------------------------------------| +| UnsignedShortSmart | Offset (world ID minus the minimum world ID) | +| UnsignedShort | Players (-1 indicates the world is offline) |