diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-17 10:41:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-17 10:41:59 +0300 |
commit | 38b46ebb02bbe307765aa9a456b587eafd3dfd7e (patch) | |
tree | d096b453db8708d8239a4255a9d626eb8bb0f681 /src/net/net.cpp | |
parent | 9cdbed6c562f95e24e02f49630386f8b18884a02 (diff) | |
download | plus-38b46ebb02bbe307765aa9a456b587eafd3dfd7e.tar.gz plus-38b46ebb02bbe307765aa9a456b587eafd3dfd7e.tar.bz2 plus-38b46ebb02bbe307765aa9a456b587eafd3dfd7e.tar.xz plus-38b46ebb02bbe307765aa9a456b587eafd3dfd7e.zip |
Remove getter for generalHandler.
Diffstat (limited to 'src/net/net.cpp')
-rw-r--r-- | src/net/net.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/net/net.cpp b/src/net/net.cpp index cd97e921e..b8b292f98 100644 --- a/src/net/net.cpp +++ b/src/net/net.cpp @@ -48,6 +48,7 @@ namespace Net class ChatHandler; class FamilyHandler; class GameHandler; + class GeneralHandler; } Net::AdminHandler *adminHandler = nullptr; @@ -73,11 +74,6 @@ Net::CashShopHandler *cashShopHandler = nullptr; Net::FamilyHandler *familyHandler = nullptr; Net::BankHandler *bankHandler = nullptr; -Net::GeneralHandler *Net::getGeneralHandler() -{ - return generalHandler; -} - Net::GuildHandler *Net::getGuildHandler() { return guildHandler; @@ -141,14 +137,14 @@ ServerInfo::Type networkType = ServerInfo::UNKNOWN; void connectToServer(const ServerInfo &server) { BLOCK_START("Net::connectToServer") - if (networkType == server.type && getGeneralHandler()) + if (networkType == server.type && generalHandler) { - getGeneralHandler()->reload(); + generalHandler->reload(); } else { - if (networkType != ServerInfo::UNKNOWN && getGeneralHandler()) - getGeneralHandler()->unload(); + if (networkType != ServerInfo::UNKNOWN && generalHandler) + generalHandler->unload(); switch (server.type) { @@ -171,7 +167,7 @@ void connectToServer(const ServerInfo &server) break; } - getGeneralHandler()->load(); + generalHandler->load(); networkType = server.type; } @@ -186,7 +182,7 @@ void connectToServer(const ServerInfo &server) void unload() { - GeneralHandler *const handler = getGeneralHandler(); + GeneralHandler *const handler = generalHandler; if (handler) handler->unload(); } |