diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-11-16 22:35:17 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-11-16 22:35:17 +0300 |
commit | b3d17866a3c5700b52c2b0b954fce132a52c1dbf (patch) | |
tree | 7ba07c98a1842eb766de35e172f559dcf5ac6fb4 /src/net/eathena/loginrecv.cpp | |
parent | 5e8e53f6e795a84ab5ca6cfe0d08672878044707 (diff) | |
download | mv-b3d17866a3c5700b52c2b0b954fce132a52c1dbf.tar.gz mv-b3d17866a3c5700b52c2b0b954fce132a52c1dbf.tar.bz2 mv-b3d17866a3c5700b52c2b0b954fce132a52c1dbf.tar.xz mv-b3d17866a3c5700b52c2b0b954fce132a52c1dbf.zip |
Convert State enum into strong typed.
Diffstat (limited to 'src/net/eathena/loginrecv.cpp')
-rw-r--r-- | src/net/eathena/loginrecv.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/net/eathena/loginrecv.cpp b/src/net/eathena/loginrecv.cpp index af9592b7a..6324689b5 100644 --- a/src/net/eathena/loginrecv.cpp +++ b/src/net/eathena/loginrecv.cpp @@ -117,7 +117,7 @@ void LoginRecv::processLoginError2(Net::MessageIn &msg) UNIMPLIMENTEDPACKET; break; } - client->setState(STATE_ERROR); + client->setState(State::ERROR); } void LoginRecv::processUpdateHost2(Net::MessageIn &msg) @@ -139,8 +139,8 @@ void LoginRecv::processUpdateHost2(Net::MessageIn &msg) logger->log("Received update hosts \"%s\" from login server.", updateHost.c_str()); - if (client->getState() == STATE_PRE_LOGIN) - client->setState(STATE_LOGIN); + if (client->getState() == State::PRE_LOGIN) + client->setState(State::LOGIN); } void LoginRecv::processServerVersion(Net::MessageIn &msg) @@ -167,7 +167,7 @@ void LoginRecv::processServerVersion(Net::MessageIn &msg) logger->log("Hercules without version"); } updateProtocol(); - client->setState(STATE_LOGIN); + client->setState(State::LOGIN); } void LoginRecv::processCondingKey(Net::MessageIn &msg) @@ -184,7 +184,7 @@ void LoginRecv::processCharPasswordResponse(Net::MessageIn &msg) // Successful pass change if (errMsg == 1) { - client->setState(STATE_CHANGEPASSWORD_SUCCESS); + client->setState(State::CHANGEPASSWORD_SUCCESS); } // pass change failed else @@ -209,7 +209,7 @@ void LoginRecv::processCharPasswordResponse(Net::MessageIn &msg) errorMessage = _("Unknown error."); break; } - client->setState(STATE_ACCOUNTCHANGE_ERROR); + client->setState(State::ACCOUNTCHANGE_ERROR); } } |