From 1ee02ff239755d4cd9bfbbf298886987096e1cae Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Thu, 21 Apr 2005 22:36:06 +0000 Subject: A few changes to protocol. --- docs/packets.txt | 95 ++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 64 insertions(+), 31 deletions(-) (limited to 'docs') diff --git a/docs/packets.txt b/docs/packets.txt index 06b9681d..7d3b1d8a 100644 --- a/docs/packets.txt +++ b/docs/packets.txt @@ -54,45 +54,42 @@ available for future use. 3. LOGIN PROTOCOL -CMSG_REGISTRATION 0x0050 -Request to register a new account. +CMSG_REGISTER 0x0050 +Request to register a new account. Email verification by activation would +probably be good to add. Password will be sent only as md5 to hide the actual +password from both server admins and sniffers. Having the md5 would still allow +false identification, hence there is also an encrypted variant of this message. { A username A password A emailAddress - C sex - * 0 = male - * 1 = female } -CMSG_ENCRYPTED_REGISTRATION 0x0051 -Request to register a new account encrypting user data. payload contains -username, password and emailAddress encrypted using server's public key. +CMSG_ENCRYPTED_REGISTER 0x0051 +Request to register a new account encrypting user data. The contents of this +message are encrypted using server's public key and are otherwise the same as +in a normal register message. { - A payload - C sex + A username + A password + A emailAddress } -SMSG_REGISTRATION_ERROR 0x0052 -The registration process failed. ErrorCodes 0-3 shouldn't happen because syntax -is checked client side, otherwise it means a client hack. Every error not in -this list is considered unknown error. +SMSG_REGISTER_RESPONSE 0x0052 +Response to register message. Error code 0 means registration was a success. +Error codes 1-3 shouldn't happen because there are also checked client side, +otherwise it could mean client is out of date or modified. Every error not in +this list should be considered unknown error. { C errorCode - * 0 = invalid username - * 1 = invalid password - * 2 = invalid email address - * 3 = invalid sex + * 0 = registration succeeded + * 1 = invalid username + * 2 = invalid password + * 3 = invalid email address * 4 = existing username * 5 = existing email address } -SMSG_REGISTRATION_CONFIRM 0x0053 -This packet means the registration process was successful. This packet could be -merged with previous one using errorCode 0 or 255. -{ -} - CMSG_LOGIN 0x0054 Sends info about player login data: username and password. { @@ -102,8 +99,8 @@ Sends info about player login data: username and password. } CMSG_ENCRYPTED_LOGIN 0x0055 -Attempts an encrypted login. payload contains username and password -encrypted using server's public key. +Attempts an encrypted login. payload contains username and password encrypted +using server's public key. { A payload L clientVersion @@ -115,8 +112,8 @@ The login process failed. C errorCode * 0 = invalid username * 1 = invalid password - * 2 = invalid version (client is sending a version number > than current - one) + * 2 = invalid version (client is sending a version number > than + current one) * 2 = non existing username * 3 = incorrect password * 4 = old version (the client is outdated) @@ -127,10 +124,46 @@ The login process failed. } SMSG_LOGIN_CONFIRM 0x0057 -The login process succeded. The content of this packet depends on account and +The login process succeded. The content of this packet depends on account and player implementation. Still to be developed. { - L accounId - ... characterData + L accountId // What would the client do with this id? - Hammerbear + C number of characters + [ // Repeated for each character + A name + C hairStyle + C hairColor + C sex + * 0 = male + * 1 = female + ... + ] } +CMSG_CHAR_CREATE +Valid after login, this message sends a request for a new character to the +server. The message could be extended with region of origin and race. +{ + A name + C hairStyle + C hairColor + C sex + * 0 = male + * 1 = female + ... +} + +SMSG_CHAR_CREATE_RESPONSE +Response to character create message. Error code 0 means creation was a +success. Error codes 1-4 should not occur as they are also checked by the +client. Any not listed error codes are unknown errors. +{ + C errorCode + * 0 = character creation succeeded + * 1 = invalid name + * 2 = invalid hair style + * 3 = invalid hair color + * 4 = invalid sex + * 5 = existing username + * 6 = existing email address +} -- cgit v1.2.3-60-g2f50