From The Mana World
m (Update packet links.)
 
(18 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{packet
{{packet
|nicename=Login Register
|nicename=Login Request
|id=0x0064
|id=0x0064
|mode={{{mode}}}
|mode={{{mode}}}
|length=55
|length=55
|alignment=orange
|define=(hard-coded)
|define=(hard-coded)
|sent={{mana location|src/net/tmwa/loginhandler.cpp|298}}
|sent={{mana location|src/net/tmwa/loginhandler.cpp|298}}
Line 13: Line 14:
{{packet field |  30 | 24 | Password }}
{{packet field |  30 | 24 | Password }}
{{packet field |  54 | 1 | Bitmask:
{{packet field |  54 | 1 | Bitmask:
0x01: Can handle [[:Packet:0x0063|Update Host]] packet
0x01: Can handle [[Net:0x0063|Update Host]] packet
0x02: defaults to first char-server instead of last }}
0x02: defaults to first char-server instead of last }}


|description=
|description=[[File:LoginProcessFlow.svg|frame|Login Process Flow]]
Registers login credentials.
Registers login credentials.


The server will take one of the following actions upon receiving this command:
The server will take one of the following actions upon receiving this command:
* If the connection is refused, the server will respond with [[Packet:0x006A|Login Error]].
* If the connection is refused, the server will respond with [[Net:0x006A|Login Error]].
* If the account is banned or restricted, the server will respond with [[Packet:0x006A|Login Error]].
* If the account is banned or restricted, the server will respond with [[Net:0x006A|Login Error]].
* If the account's GM level is less than the "Minimum GM Level" defined, the server will respond with [[Packet:0x0081|Connection Problem]].
* If the account's GM level is less than the "Minimum GM Level" defined, the server will respond with [[Net:0x0081|Connection Problem]].
* Otherwise, the login is successful, and the server will take all of the following actions:
* 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 [[Packet:0x0063|Host Update]].
** If the "Update Host" is defined on the server, the server will respond with [[Net:0x0063|Host Update]].
** If at least one connected char-server, the server will respond with [[Packet:0x0069|Login Data]]
** If at least one connected char-server, the server will respond with [[Net:0x0069|Login Data]]
** If there is no connected char-server the server will respond with [[Packet:0x0081|Connection Problem]].
** If there is no connected char-server the server will respond with [[Net:0x0081|Connection Problem]].




Line 33: Line 34:
* Client Version is currently expected to be 0.
* Client Version is currently expected to be 0.
}}
}}
<uml activity direction="td">
(start)->(Login Request)-><d1>Connection Refused->(Login Error)->|a|->(end)
<d1>Banned or Restricted->(Login Error)
<d1>GM level less than Minimum GM Level->(Connection Problem)->|a|
<d1>Success-><d2>Update Host Defined->(Host Update)->(Login Data)->|a|
<d2>Update Host Not Defined->(Login Data)
<d2>Character already connected->(Connection Problem)
</uml>

Latest revision as of 23:53, 1 July 2013

< Back

Login Request

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

Login Process Flow

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.