diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2008-07-17 22:52:53 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2008-07-17 22:52:53 +0000 |
commit | ea37ffc6d73bb0de686c29f8e8c6769f2a704ec5 (patch) | |
tree | fcca5b0bdca14ae694702ee4e882ba77a2a9b408 /src/gui | |
parent | 406bac35e4c6e79b0ba8d5fe97f32516c8becb0b (diff) | |
download | mana-ea37ffc6d73bb0de686c29f8e8c6769f2a704ec5.tar.gz mana-ea37ffc6d73bb0de686c29f8e8c6769f2a704ec5.tar.bz2 mana-ea37ffc6d73bb0de686c29f8e8c6769f2a704ec5.tar.xz mana-ea37ffc6d73bb0de686c29f8e8c6769f2a704ec5.zip |
Added support for handling the custom eAthena packet that sends the update
host (patch by Sanga).
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/char_server.cpp | 12 | ||||
-rw-r--r-- | src/gui/char_server.h | 3 |
2 files changed, 10 insertions, 5 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; } } diff --git a/src/gui/char_server.h b/src/gui/char_server.h index 26e723f9..3e43dd55 100644 --- a/src/gui/char_server.h +++ b/src/gui/char_server.h @@ -46,7 +46,7 @@ class ServerSelectDialog : public Window, public gcn::ActionListener { * * @see Window::Window */ - ServerSelectDialog(LoginData *loginData); + ServerSelectDialog(LoginData *loginData, int nextState); /** * Destructor. @@ -63,6 +63,7 @@ class ServerSelectDialog : public Window, public gcn::ActionListener { ServerListModel *mServerListModel; gcn::ListBox *mServerList; gcn::Button *mOkButton; + int mNextState; }; #endif |