From d4f32a38fd498c180d562ced38a9129e0abf2252 Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Wed, 30 Sep 2009 19:54:06 -0600 Subject: Merge login state machines for both clients Also do some cleanup and refactoring of related code. --- src/gui/charselectdialog.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'src/gui/charselectdialog.cpp') diff --git a/src/gui/charselectdialog.cpp b/src/gui/charselectdialog.cpp index 69a627e1..be1cd3de 100644 --- a/src/gui/charselectdialog.cpp +++ b/src/gui/charselectdialog.cpp @@ -98,9 +98,6 @@ CharSelectDialog::CharSelectDialog(LockedArray *charInfo, mCharInfo(charInfo), mLoginData(loginData), mCharSelected(false) -#ifdef EATHENA_SUPPORT - , mGender(loginData->sex) -#endif { mSelectButton = new Button(_("OK"), "ok", this); mCancelButton = new Button(_("Cancel"), "cancel", this); @@ -214,12 +211,8 @@ void CharSelectDialog::action(const gcn::ActionEvent &event) } else if (event.getId() == "cancel") { -#ifdef TMWSERV_SUPPORT mCharInfo->clear(); - state = STATE_SWITCH_ACCOUNTSERVER_ATTEMPT; -#else - state = STATE_EXIT; -#endif + state = STATE_SWITCH_SERVER_ATTEMPT; } #ifdef TMWSERV_SUPPORT else if (event.getId() == "new") @@ -250,7 +243,7 @@ void CharSelectDialog::action(const gcn::ActionEvent &event) { new CharDeleteConfirm(this); } - else if (n_character <= maxSlot) + else if (n_character < MAX_CHARACTER_COUNT) { // Start new character dialog CharCreateDialog *charCreateDialog = -- cgit v1.2.3-70-g09d2