diff options
-rw-r--r-- | src/gui/serverselectdialog.cpp | 25 | ||||
-rw-r--r-- | src/net/ea/loginhandler.cpp | 8 |
2 files changed, 15 insertions, 18 deletions
diff --git a/src/gui/serverselectdialog.cpp b/src/gui/serverselectdialog.cpp index bcc756b7..be4baead 100644 --- a/src/gui/serverselectdialog.cpp +++ b/src/gui/serverselectdialog.cpp @@ -42,8 +42,16 @@ class ServerListModel : public gcn::ListModel public: virtual ~ServerListModel() {} - int getNumberOfElements(); - std::string getElementAt(int i); + int getNumberOfElements() + { + return n_server; + } + + std::string getElementAt(int i) + { + const SERVER_INFO *si = server_info[i]; + return si->name + " (" + toString(si->online_users) + ")"; + } }; ServerSelectDialog::ServerSelectDialog(LoginData *loginData, int nextState): @@ -84,7 +92,7 @@ ServerSelectDialog::ServerSelectDialog(LoginData *loginData, int nextState): mOkButton->setEnabled(false); else // Select first server - mServerList->setSelected(1); + mServerList->setSelected(0); center(); setVisible(true); @@ -110,14 +118,3 @@ void ServerSelectDialog::action(const gcn::ActionEvent &event) else if (event.getId() == "cancel") state = STATE_LOGIN; } - -int ServerListModel::getNumberOfElements() -{ - return n_server; -} - -std::string ServerListModel::getElementAt(int i) -{ - const SERVER_INFO *si = server_info[i]; - return si->name + " (" + toString(si->online_users) + ")"; -} diff --git a/src/net/ea/loginhandler.cpp b/src/net/ea/loginhandler.cpp index 40bfb364..b657bb1c 100644 --- a/src/net/ea/loginhandler.cpp +++ b/src/net/ea/loginhandler.cpp @@ -191,11 +191,11 @@ void LoginHandler::sendLoginRegister(const std::string &username, /* * eAthena calls the last byte "client version 2", but it isn't used at - * at all. We're retasking it, with bit 0 to indicate whether the client - * can handle the 0x63 "update host" packet. Clients prior to 0.0.25 send - * 0 here. + * at all. We're retasking it, as a bit mask: + * 0 - can handle the 0x63 "update host" packet + * 1 - defaults to the first char-server (instead of the last) */ - outMsg.writeInt8(0x01); + outMsg.writeInt8(0x03); } } // namespace EAthena |