summaryrefslogtreecommitdiff
path: root/src/net/ea/gamehandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-17 19:12:04 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-17 21:22:47 +0300
commitefb2f46fc326117d77851fe588784ff869e2935f (patch)
treeba483c230a64e16aefa89f9717d6915d267e2f01 /src/net/ea/gamehandler.cpp
parent661dec0f325a01427911598fb6b7e24754a3a1b5 (diff)
downloadplus-efb2f46fc326117d77851fe588784ff869e2935f.tar.gz
plus-efb2f46fc326117d77851fe588784ff869e2935f.tar.bz2
plus-efb2f46fc326117d77851fe588784ff869e2935f.tar.xz
plus-efb2f46fc326117d77851fe588784ff869e2935f.zip
Add static in gamehandler.
Diffstat (limited to 'src/net/ea/gamehandler.cpp')
-rw-r--r--src/net/ea/gamehandler.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/net/ea/gamehandler.cpp b/src/net/ea/gamehandler.cpp
index 64e952680..8d42cc220 100644
--- a/src/net/ea/gamehandler.cpp
+++ b/src/net/ea/gamehandler.cpp
@@ -41,10 +41,14 @@
namespace Ea
{
+std::string GameHandler::mMap;
+int GameHandler::mCharID = 0;
+
GameHandler::GameHandler() :
- mMap(),
- mCharID(0)
+ Net::GameHandler()
{
+ mMap.clear();
+ mCharID = 0;
}
void GameHandler::who() const
@@ -56,19 +60,19 @@ void GameHandler::setMap(const std::string &map)
mMap = map.substr(0, map.rfind("."));
}
-void GameHandler::processWhoAnswer(Net::MessageIn &msg) const
+void GameHandler::processWhoAnswer(Net::MessageIn &msg)
{
NotifyManager::notify(NotifyTypes::ONLINE_USERS,
msg.readInt32("users count"));
}
-void GameHandler::processCharSwitchResponse(Net::MessageIn &msg) const
+void GameHandler::processCharSwitchResponse(Net::MessageIn &msg)
{
if (msg.readUInt8("response"))
client->setState(STATE_SWITCH_CHARACTER);
}
-void GameHandler::processMapQuitResponse(Net::MessageIn &msg) const
+void GameHandler::processMapQuitResponse(Net::MessageIn &msg)
{
if (msg.readUInt8("response"))
{