summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/charserverrecv.cpp8
-rw-r--r--src/net/eathena/gamehandler.cpp2
-rw-r--r--src/net/eathena/gamerecv.cpp2
-rw-r--r--src/net/eathena/generalhandler.cpp2
-rw-r--r--src/net/eathena/generalrecv.cpp6
-rw-r--r--src/net/eathena/loginhandler.cpp4
-rw-r--r--src/net/eathena/loginrecv.cpp12
7 files changed, 18 insertions, 18 deletions
diff --git a/src/net/eathena/charserverrecv.cpp b/src/net/eathena/charserverrecv.cpp
index aed472207..d09d98768 100644
--- a/src/net/eathena/charserverrecv.cpp
+++ b/src/net/eathena/charserverrecv.cpp
@@ -200,7 +200,7 @@ void CharServerRecv::processCharLogin(Net::MessageIn &msg)
}
}
- client->setState(STATE_CHAR_SELECT);
+ client->setState(State::CHAR_SELECT);
}
void CharServerRecv::processCharLogin2(Net::MessageIn &msg)
@@ -247,7 +247,7 @@ void CharServerRecv::processCharMapInfo(Net::MessageIn &restrict msg)
if (network)
network->disconnect();
- client->setState(STATE_CONNECT_GAME);
+ client->setState(State::CONNECT_GAME);
BLOCK_END("CharServerRecv::processCharMapInfo")
}
@@ -277,7 +277,7 @@ void CharServerRecv::processChangeMapServer(Net::MessageIn &msg)
server.port = msg.readInt16("port");
network->disconnect();
- client->setState(STATE_CHANGE_MAP);
+ client->setState(State::CHANGE_MAP);
if (localPlayer)
{
localPlayer->setTileCoords(x, y);
@@ -499,7 +499,7 @@ void CharServerRecv::processCharCharacters(Net::MessageIn &msg)
}
}
- client->setState(STATE_CHAR_SELECT);
+ client->setState(State::CHAR_SELECT);
}
void CharServerRecv::processCharBanCharList(Net::MessageIn &msg)
diff --git a/src/net/eathena/gamehandler.cpp b/src/net/eathena/gamehandler.cpp
index 1b5b1bc3a..0fa7a44fe 100644
--- a/src/net/eathena/gamehandler.cpp
+++ b/src/net/eathena/gamehandler.cpp
@@ -67,7 +67,7 @@ void GameHandler::connect()
const Token &token = static_cast<LoginHandler*>(loginHandler)->getToken();
- if (client->getState() == STATE_CONNECT_GAME)
+ if (client->getState() == State::CONNECT_GAME)
{
// Change the player's ID to the account ID to match what eAthena uses
if (localPlayer)
diff --git a/src/net/eathena/gamerecv.cpp b/src/net/eathena/gamerecv.cpp
index 43c52ba61..e7dd0b589 100644
--- a/src/net/eathena/gamerecv.cpp
+++ b/src/net/eathena/gamerecv.cpp
@@ -65,7 +65,7 @@ void GameRecv::processMapLogin(Net::MessageIn &msg)
network->pauseDispatch();
// Switch now or we'll have problems
- client->setState(STATE_GAME);
+ client->setState(State::GAME);
if (localPlayer)
localPlayer->setTileCoords(x, y);
}
diff --git a/src/net/eathena/generalhandler.cpp b/src/net/eathena/generalhandler.cpp
index ecfa7eeda..7ee608088 100644
--- a/src/net/eathena/generalhandler.cpp
+++ b/src/net/eathena/generalhandler.cpp
@@ -186,7 +186,7 @@ void GeneralHandler::flushNetwork()
else
errorMessage = _("Got disconnected from server!");
- client->setState(STATE_ERROR);
+ client->setState(State::ERROR);
}
}
diff --git a/src/net/eathena/generalrecv.cpp b/src/net/eathena/generalrecv.cpp
index ff5809028..6e6ece029 100644
--- a/src/net/eathena/generalrecv.cpp
+++ b/src/net/eathena/generalrecv.cpp
@@ -51,7 +51,7 @@ void GeneralRecv::processConnectionProblem(Net::MessageIn &msg)
errorMessage = _("No servers available.");
break;
case 2:
- if (client->getState() == STATE_GAME)
+ if (client->getState() == State::GAME)
{
errorMessage = _("Someone else is trying to use "
"this account.");
@@ -136,7 +136,7 @@ void GeneralRecv::processConnectionProblem(Net::MessageIn &msg)
errorMessage = _("Unknown connection error.");
break;
}
- client->setState(STATE_ERROR);
+ client->setState(State::ERROR);
}
void GeneralRecv::processMapNotFound(Net::MessageIn &msg)
@@ -144,7 +144,7 @@ void GeneralRecv::processMapNotFound(Net::MessageIn &msg)
const int sz = msg.readInt16("len") - 4;
msg.readString(sz, "map name?");
errorMessage = _("Map not found");
- client->setState(STATE_ERROR);
+ client->setState(State::ERROR);
}
} // namespace EAthena
diff --git a/src/net/eathena/loginhandler.cpp b/src/net/eathena/loginhandler.cpp
index a50b0dc4a..07314cf64 100644
--- a/src/net/eathena/loginhandler.cpp
+++ b/src/net/eathena/loginhandler.cpp
@@ -62,8 +62,8 @@ void LoginHandler::connect()
}
else
{
- if (client->getState() != STATE_LOGIN)
- client->setState(STATE_LOGIN);
+ if (client->getState() != State::LOGIN)
+ client->setState(State::LOGIN);
}
}
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);
}
}