Expand description

Implementation of the network protocol used between World of Warcraft authentication/login servers and clients for game versions 1.0.0 (Vanilla) to 3.3.5 (Wrath of the Lich King). See the WoWDev Login page for details.

Clients will send the protocol version they’re using. So if the client sends a protocol_version of 2 they will be using messages from version_2.

In each version module there is an opcodes module that contains enums for possible client and server messages. As well as utility functions for reading/writing the correct message.

Notice that the same game version may use different protocol versions for login/reconnecting. See the table on the WoWDev wiki or the table below for further information.

Game VersionLoginReconnect
1.1.2.412522
1.12.1.587532
2.0.0.608032
2.0.1.618032
2.0.3.629955
2.0.5.632066
2.0.6.633755
2.0.7.638366
2.0.8.640366
2.0.10.644866
2.0.12.654666
2.1.0.669266
2.1.0.672966
2.1.1.673966
2.1.2.680366
2.1.3.689866
2.2.0.727266
2.2.2.731866
2.2.2.731866
2.2.3.735966
2.3.0.756177
2.3.2.774177
2.3.3.779977
2.4.0.808988
2.4.1.812588
2.4.2.827888
2.4.3.860688
3.3.5.1234088

The helper module contains utility functions for common operations.

The ClientMessage (sent from the client) and ServerMessage (sent from the server) are the primary interface for sending messages.

§Usage

To add only the synchronous methods run the following command:

cargo add --features 'sync' wow_login_messages

For async support see the Features section.

And then use the structs from the relevant version module.

§Features

Tokio and async-std support are gated behind the tokio and async-std features. Synchronous (std) support is gated behind sync. All of these are disabled by default. You must enable at least one of them, otherwise there’s not much point to the crate.

§Auto Generation

This crate is partially auto generated by the wowm files in the wow_messages repository.

§Design Decisions

Types have been named the ugly CMD_SCREAMING_SNAKE_CASE way because that’s what other (mostly C++) emulators call them. This makes it significantly easier to search through other emulators or other documentation.

§Other Work

  • vMaNGOS (C++) and MaNGOS derivatives in general have a relatively complete list of messages for popular versions, but they are not available as a library.
  • Ember (C++) has all messages for 1.12, although some work will probably be required in order to use it as a standalone library.
  • Shadowburn (Erlang) has messages for 1.12, although they are not in the form of a library.
  • gophercraft (Go) seems to have most messages in a library format.

Modules§

Constants§

  • Default used by the auth server. Clients will automatically connect to this when no port is specified in the realmlist.wtf.

Traits§