Skip to content

AccountSystem

jmpala edited this page Aug 18, 2020 · 1 revision

PassiveSystem that manages the creation of game accounts and login.

  • checkStorageDirectory() static method that checks if the directory, where the accounts are created, exist. If not it creates it. The directory that checks is on Account.DIR_CUENTAS

  • createAccount() creates the account, persisting it into the filesystem. It is created, if it does not already exist, in the directory Account.DIR_CUENTAS. The key value for the accounts is the email address. Then the system sends to the client the AccountCreationResponse(), that will inform if the transaction was successful.

  • login() the system tries to retrieve the account and check if it exist and if the password is right. Informing to the client through the AccountLoginResponse() and the corresponding message, if the mentioned processes fail. Then it tries to retrieve the character list related to the account, creating a new list of dummy characters in case there are no characters inside. After getting the list of characters, the system tries to load the characters data, contained in Charfile.DIR_CHARFILES. On success, the client is informed through AccountLoginResponse()

  • getAccount() the system tries to retrieve the requested account, saved in Account.DIR_CUENTAS

<< Back to Server Systems

Get Starting

Requirements

Source Code

Reference

run

Graphics

balance

external documentation

Clone this wiki locally