Login Register
Packet ID: | 0x0064 |
---|---|
Packet Length: | 55 |
Client Defined: | (hard-coded) |
Sent Location(s): | src/net/tmwa/loginhandler.cpp:298 |
Parsed Location(s): | src/login/login.cpp |
Fields
Offset | Length | Contents |
---|---|---|
0 | 2 | Packet ID |
2 | 4 | Client Version |
6 | 24 | Username |
30 | 24 | Password |
54 | 1 | Bitmask:
0x01: Can handle Update Host packet 0x02: defaults to first char-server instead of last |
Description
Registers login credentials.
The server will take one of the following actions upon receiving this command:
- If the connection is refused, the server will respond with Login Error.
- If the account is banned or restricted, the server will respond with Login Error.
- If the account's GM level is less than the "Minimum GM Level" defined, the server will respond with Connection Problem.
- Otherwise, the login is successful, and the server will take all of the following actions:
- If the "Update Host" is defined on the server, the server will respond with Host Update.
- If at least one connected char-server, the server will respond with Login Data
- If there is no connected char-server the server will respond with Connection Problem.
Notes
- All supported clients must send a 3 on the final packet, indicating "Update Host" support, as well as defaulting to first server instead of last.
- Client Version is currently expected to be 0.
digraph finite_state_machine { rankdir=LR; size="9,15" node [shape = ellipse]; "Start" "End";
node [shape = box, color = "#A1A1A1", style = "rounded,filled"]; "Start" -> "Login Request";
node [shape = box, style="rounded"]; "Login Error" "Connection Problem";
"Login Request" -> "Login Error" [label="Connection\nRefused"]; "Login Request" -> "Login Error" [label="Account\nBanned or\nRestricted"]; "Login Request" -> "Connection\nProblem" [label="Account GM\nLevel less than\nMinimum\nGM Level"];
"Login Error" -> "End"; "Connection\nProblem" -> "End"; "Update Host\nSupported?" -> "Host Update" [label="Yes"]; "At least one\nCharacter\nServer?" -> "Connection\nProblem" [label="No"]; "At least one\nCharacter\nServer?" -> "Login Data" [label="Yes"]; "Login Data" -> "End";
node [shape = diamond, style="rounded"]; "Login Request" -> "Update Host\nSupported?" [label="Login Successful"]; "Update Host\nSupported?" -> "At least one\nCharacter\nServer?" [label="No"]; "Host Update" -> "At least one\nCharacter\nServer?";
}