From ea37ffc6d73bb0de686c29f8e8c6769f2a704ec5 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Thu, 17 Jul 2008 22:52:53 +0000 Subject: Added support for handling the custom eAthena packet that sends the update host (patch by Sanga). --- src/gui/char_server.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/gui/char_server.cpp') 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; } } -- cgit v1.2.3-70-g09d2