Crate wow_login_messages
source · [−]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 Version | Login | Reconnect |
---|---|---|
1.1.2.4125 | 2 | 2 |
1.12.1.5875 | 3 | 2 |
2.4.3.8606 | 8 | 8 |
3.3.5.12340 | 8 | 8 |
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 add the following to your Cargo.toml
:
[dependencies]
wow_login_messages = { version = "0.2", features = ["sync"] }
Or add it with cargo edit:
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
realmlist.wtf
.