summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-05-04 00:02:10 -0600
committerJared Adams <jaxad0127@gmail.com>2009-05-04 00:02:10 -0600
commitcd89ede064c63cb43da0fb4bfa16ff1599a96d32 (patch)
tree8d4efd373e3e31f8584e7f33c7a4a6e60f23eb15
parentca40dfd64338d5608e7836928b2eaa1648ae7caf (diff)
downloadmana-client-cd89ede064c63cb43da0fb4bfa16ff1599a96d32.tar.gz
mana-client-cd89ede064c63cb43da0fb4bfa16ff1599a96d32.tar.bz2
mana-client-cd89ede064c63cb43da0fb4bfa16ff1599a96d32.tar.xz
mana-client-cd89ede064c63cb43da0fb4bfa16ff1599a96d32.zip
Fix char-server default selection to be first
Also send a different version to the login-server to tell it to send the main char-server first.
-rw-r--r--src/gui/serverselectdialog.cpp25
-rw-r--r--src/net/ea/loginhandler.cpp8
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