diff options
author | Jared Adams <jaxad0127@gmail.com> | 2010-04-12 14:46:06 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-04-12 15:15:37 -0600 |
commit | 612c842f32fec68ece4244ac672a1b889cf2eb18 (patch) | |
tree | 8682f225a4681e281505bd0f4c501be701228a9e /src/client.cpp | |
parent | f30f3e6a51fc20bded8a3a04cd3a0f328a064469 (diff) | |
download | mana-612c842f32fec68ece4244ac672a1b889cf2eb18.tar.gz mana-612c842f32fec68ece4244ac672a1b889cf2eb18.tar.bz2 mana-612c842f32fec68ece4244ac672a1b889cf2eb18.tar.xz mana-612c842f32fec68ece4244ac672a1b889cf2eb18.zip |
Add support for map-server switching under eAthena
Also do some cleanup that's been needed for a while.
Reviewed-by: Bertram
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/client.cpp b/src/client.cpp index eebdaace..2e136e39 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -574,6 +574,10 @@ int Client::exec() if (mState != mOldState) { + Net::GeneralHandler *generalHandler = Net::getGeneralHandler(); + if (generalHandler) + generalHandler->stateChanged(mOldState, mState); + if (mOldState == STATE_GAME) { delete game; @@ -774,13 +778,20 @@ int Client::exec() STATE_SWITCH_CHARACTER); break; + case STATE_CHANGE_MAP: + logger->log("State: CHANGE_MAP"); + + Net::getGameHandler()->connect(); + mCurrentDialog = new ConnectionDialog( + _("Changing game servers"), + STATE_SWITCH_CHARACTER); + break; + case STATE_GAME: logger->log("Memorizing selected character %s", player_node->getName().c_str()); config.setValue("lastCharacter", player_node->getName()); - Net::getGameHandler()->inGame(); - // Fade out logon-music here too to give the desired effect // of "flowing" into the game. sound.fadeOutMusic(1000); |