summaryrefslogtreecommitdiff
path: root/src/gui/char_server.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2008-07-17 22:52:53 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2008-07-17 22:52:53 +0000
commitea37ffc6d73bb0de686c29f8e8c6769f2a704ec5 (patch)
treefcca5b0bdca14ae694702ee4e882ba77a2a9b408 /src/gui/char_server.cpp
parent406bac35e4c6e79b0ba8d5fe97f32516c8becb0b (diff)
downloadmana-client-ea37ffc6d73bb0de686c29f8e8c6769f2a704ec5.tar.gz
mana-client-ea37ffc6d73bb0de686c29f8e8c6769f2a704ec5.tar.bz2
mana-client-ea37ffc6d73bb0de686c29f8e8c6769f2a704ec5.tar.xz
mana-client-ea37ffc6d73bb0de686c29f8e8c6769f2a704ec5.zip
Added support for handling the custom eAthena packet that sends the update
host (patch by Sanga).
Diffstat (limited to 'src/gui/char_server.cpp')
-rw-r--r--src/gui/char_server.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gui/char_server.cpp b/src/gui/char_server.cpp
index 638c05a6..b5ce9021 100644
--- a/src/gui/char_server.cpp
+++ b/src/gui/char_server.cpp
@@ -48,8 +48,10 @@ class ServerListModel : public gcn::ListModel {
std::string getElementAt(int i);
};
-ServerSelectDialog::ServerSelectDialog(LoginData *loginData):
- Window("Select Server"), mLoginData(loginData)
+ServerSelectDialog::ServerSelectDialog(LoginData *loginData, int nextState):
+ Window("Select Server"),
+ mLoginData(loginData),
+ mNextState(nextState)
{
mServerListModel = new ServerListModel();
mServerList = new ListBox(mServerListModel);
@@ -105,10 +107,12 @@ ServerSelectDialog::action(const gcn::ActionEvent &event)
const SERVER_INFO *si = server_info[mServerList->getSelected()];
mLoginData->hostname = iptostring(si->address);
mLoginData->port = si->port;
- state = CHAR_CONNECT_STATE;
+ mLoginData->updateHost = si->updateHost;
+
+ state = mNextState;
}
else if (event.getId() == "cancel") {
- state = LOADDATA_STATE;
+ state = LOGIN_STATE;
}
}