User:Jaxad0127/State machine

From The Mana World

This article describes the internal state machines used in the client.

The core state machine is rather simple:

            -> Exit <-
            |        |
Start -> Login <-> Game
     \     v      /
      -> Error <--

Both Login and Game are sub machines.

The Login machine is more complicated. All states can go to Error, all but Start can go to Exit.


State Go To Condition
Start Server No login data is present (default; some may be present if we've already chosen a server and just want to switch accounts, or characters)
Login Login server data present, but no login information present (we want to change logins, but not servers)
Character Login data present (we just want to change characters)
Server Server User selects a server and it's type could not be determined
Login User selects a server and it's type was successfully determined
Login Server User wants to change servers
Login Login failed (bad password, unknown username, etc)
Server2 Login succeeded
Register User wants to make a new account
Server2 Update No secondary servers to choose from or selection made
Login User wants to use another account
Server User wants to use another server
Update Character When done
Character Login User wants to use another account
Server User wants to use another server
Game Character selected
New User wants to make a new character
Delete User wants to delete a character
Account User wants to view/change account information
Register Login User cancels registration
Register Registration failed
Server2 Registration succeeded
Account Character User is done in this state
Password User wants to change their password
Email User want to change their email
Password Account User cancels change or change succeeded
Password Change failed
Email Account User cancels change or change succeeded
Email Change failed