summaryrefslogtreecommitdiff
path: root/src/net/ea/loginhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-17 22:43:13 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-17 22:43:13 +0300
commit73271c8b5e39d01c34064db8a4529e31d36cf0aa (patch)
tree62889d7fb733f0494317365d7846776b7371fcf7 /src/net/ea/loginhandler.cpp
parent9a40e1202946e3384500da28668a52d28ad377f4 (diff)
downloadplus-73271c8b5e39d01c34064db8a4529e31d36cf0aa.tar.gz
plus-73271c8b5e39d01c34064db8a4529e31d36cf0aa.tar.bz2
plus-73271c8b5e39d01c34064db8a4529e31d36cf0aa.tar.xz
plus-73271c8b5e39d01c34064db8a4529e31d36cf0aa.zip
Add static in loginhandler.
Diffstat (limited to 'src/net/ea/loginhandler.cpp')
-rw-r--r--src/net/ea/loginhandler.cpp23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/net/ea/loginhandler.cpp b/src/net/ea/loginhandler.cpp
index 24c9d8e09..57eea9101 100644
--- a/src/net/ea/loginhandler.cpp
+++ b/src/net/ea/loginhandler.cpp
@@ -42,14 +42,19 @@
namespace Ea
{
+std::string LoginHandler::mUpdateHost;
+Worlds LoginHandler::mWorlds;
+Token LoginHandler::mToken;
+bool LoginHandler::mVersionResponse = false;
+bool LoginHandler::mRegistrationEnabled = true;
+
LoginHandler::LoginHandler() :
- Net::LoginHandler(),
- mVersionResponse(false),
- mRegistrationEnabled(true),
- mUpdateHost(),
- mWorlds(),
- mToken()
+ Net::LoginHandler()
{
+ mVersionResponse = false;
+ mRegistrationEnabled = true;
+ mUpdateHost.clear();
+ mWorlds.clear();
mToken.clear();
}
@@ -133,7 +138,7 @@ void LoginHandler::clearWorlds()
mWorlds.clear();
}
-void LoginHandler::procecessCharPasswordResponse(Net::MessageIn &msg) const
+void LoginHandler::processCharPasswordResponse(Net::MessageIn &msg)
{
// 0: acc not found, 1: success, 2: password mismatch, 3: pass too short
const uint8_t errMsg = msg.readUInt8("result code");
@@ -189,7 +194,7 @@ void LoginHandler::processLoginData(Net::MessageIn &msg)
{
msg.skip(2, "len");
- clearWorlds();
+ loginHandler->clearWorlds();
const int worldCount = (msg.getLength() - 47) / 32;
@@ -225,7 +230,7 @@ void LoginHandler::processLoginData(Net::MessageIn &msg)
client->setState(STATE_WORLD_SELECT);
}
-void LoginHandler::processLoginError(Net::MessageIn &msg) const
+void LoginHandler::processLoginError(Net::MessageIn &msg)
{
const uint8_t code = msg.readUInt8("error");
logger->log("Login::error code: %u", static_cast<unsigned int>(code));