summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-17 10:31:03 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-17 10:31:03 +0300
commit9cdbed6c562f95e24e02f49630386f8b18884a02 (patch)
tree4dad8316607387c80b66cf42b2a806ffa1a3afed /src/net
parent3a7313c027407e3b35360a021c72fe78f181d81d (diff)
downloadplus-9cdbed6c562f95e24e02f49630386f8b18884a02.tar.gz
plus-9cdbed6c562f95e24e02f49630386f8b18884a02.tar.bz2
plus-9cdbed6c562f95e24e02f49630386f8b18884a02.tar.xz
plus-9cdbed6c562f95e24e02f49630386f8b18884a02.zip
Remove getter for gameHandler.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/eathena/charserverhandler.cpp4
-rw-r--r--src/net/familyhandler.h2
-rw-r--r--src/net/gamehandler.h2
-rw-r--r--src/net/net.cpp12
-rw-r--r--src/net/net.h4
-rw-r--r--src/net/tmwa/charserverhandler.cpp4
6 files changed, 10 insertions, 18 deletions
diff --git a/src/net/eathena/charserverhandler.cpp b/src/net/eathena/charserverhandler.cpp
index e1d6c5373..189acb05d 100644
--- a/src/net/eathena/charserverhandler.cpp
+++ b/src/net/eathena/charserverhandler.cpp
@@ -357,7 +357,7 @@ void CharServerHandler::processCharMapInfo(Net::MessageIn &restrict msg)
ServerInfo &server = mapServer;
BLOCK_START("CharServerHandler::processCharMapInfo")
PlayerInfo::setCharId(msg.readInt32("char id"));
- GameHandler *const gh = static_cast<GameHandler*>(Net::getGameHandler());
+ GameHandler *const gh = static_cast<GameHandler*>(gameHandler);
gh->setMap(msg.readString(16, "map name"));
if (config.getBoolValue("usePersistentIP") || settings.persistentIp)
{
@@ -390,7 +390,7 @@ void CharServerHandler::processChangeMapServer(Net::MessageIn &msg)
Network *const network = mNetwork;
ServerInfo &server = mapServer;
BLOCK_START("CharServerHandler::processChangeMapServer")
- GameHandler *const gh = static_cast<GameHandler*>(Net::getGameHandler());
+ GameHandler *const gh = static_cast<GameHandler*>(gameHandler);
if (!gh || !network)
{
BLOCK_END("CharServerHandler::processChangeMapServer")
diff --git a/src/net/familyhandler.h b/src/net/familyhandler.h
index e6b7bb174..3f4bce683 100644
--- a/src/net/familyhandler.h
+++ b/src/net/familyhandler.h
@@ -43,4 +43,6 @@ class FamilyHandler notfinal
} // namespace Net
+extern Net::FamilyHandler *familyHandler;
+
#endif // NET_FAMILYHANDLER_H
diff --git a/src/net/gamehandler.h b/src/net/gamehandler.h
index 1752f7eea..94cb554c1 100644
--- a/src/net/gamehandler.h
+++ b/src/net/gamehandler.h
@@ -65,4 +65,6 @@ class GameHandler notfinal
} // namespace Net
+extern Net::GameHandler *gameHandler;
+
#endif // NET_GAMEHANDLER_H
diff --git a/src/net/net.cpp b/src/net/net.cpp
index aa89e39fe..cd97e921e 100644
--- a/src/net/net.cpp
+++ b/src/net/net.cpp
@@ -46,6 +46,8 @@ namespace Net
class CashShopHandler;
class CharServerHandler;
class ChatHandler;
+ class FamilyHandler;
+ class GameHandler;
}
Net::AdminHandler *adminHandler = nullptr;
@@ -71,11 +73,6 @@ Net::CashShopHandler *cashShopHandler = nullptr;
Net::FamilyHandler *familyHandler = nullptr;
Net::BankHandler *bankHandler = nullptr;
-Net::GameHandler *Net::getGameHandler()
-{
- return gameHandler;
-}
-
Net::GeneralHandler *Net::getGeneralHandler()
{
return generalHandler;
@@ -136,11 +133,6 @@ Net::MailHandler *Net::getMailHandler()
return mailHandler;
}
-Net::FamilyHandler *Net::getFamilyHandler()
-{
- return familyHandler;
-}
-
namespace Net
{
diff --git a/src/net/net.h b/src/net/net.h
index 11f605252..825a9894a 100644
--- a/src/net/net.h
+++ b/src/net/net.h
@@ -36,8 +36,6 @@
namespace Net
{
-class FamilyHandler;
-class GameHandler;
class GeneralHandler;
class GuildHandler;
class InventoryHandler;
@@ -51,7 +49,6 @@ class SkillHandler;
class TradeHandler;
class ServerFeatures;
-GameHandler *getGameHandler() A_WARN_UNUSED;
GeneralHandler *getGeneralHandler() A_WARN_UNUSED;
GuildHandler *getGuildHandler() A_WARN_UNUSED;
InventoryHandler *getInventoryHandler() A_WARN_UNUSED;
@@ -64,7 +61,6 @@ SkillHandler *getSkillHandler() A_WARN_UNUSED;
TradeHandler *getTradeHandler() A_WARN_UNUSED;
ServerFeatures *getServerFeatures() A_WARN_UNUSED;
MailHandler *getMailHandler() A_WARN_UNUSED;
-FamilyHandler *getFamilyHandler() A_WARN_UNUSED;
ServerInfo::Type getNetworkType() A_WARN_UNUSED;
diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp
index e23b6f08c..969353cc4 100644
--- a/src/net/tmwa/charserverhandler.cpp
+++ b/src/net/tmwa/charserverhandler.cpp
@@ -420,7 +420,7 @@ void CharServerHandler::processCharMapInfo(Net::MessageIn &restrict msg)
ServerInfo &server = mapServer;
BLOCK_START("CharServerHandler::processCharMapInfo")
PlayerInfo::setCharId(msg.readInt32("char id?"));
- GameHandler *const gh = static_cast<GameHandler*>(Net::getGameHandler());
+ GameHandler *const gh = static_cast<GameHandler*>(gameHandler);
gh->setMap(msg.readString(16, "map name"));
if (config.getBoolValue("usePersistentIP") || settings.persistentIp)
{
@@ -453,7 +453,7 @@ void CharServerHandler::processChangeMapServer(Net::MessageIn &msg)
Network *const network = mNetwork;
ServerInfo &server = mapServer;
BLOCK_START("CharServerHandler::processChangeMapServer")
- GameHandler *const gh = static_cast<GameHandler*>(Net::getGameHandler());
+ GameHandler *const gh = static_cast<GameHandler*>(gameHandler);
if (!gh || !network)
{
BLOCK_END("CharServerHandler::processChangeMapServer")