summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-17 10:55:20 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-17 10:55:20 +0300
commitfd050698f74b5dc7a9867bc93ba6b7c65ef2462f (patch)
tree246017e7d1b399e60a5d7b97a7106cd75587b88f /src/net
parent4228763829f71ec4db50ed185483d7707c5e47eb (diff)
downloadmv-fd050698f74b5dc7a9867bc93ba6b7c65ef2462f.tar.gz
mv-fd050698f74b5dc7a9867bc93ba6b7c65ef2462f.tar.bz2
mv-fd050698f74b5dc7a9867bc93ba6b7c65ef2462f.tar.xz
mv-fd050698f74b5dc7a9867bc93ba6b7c65ef2462f.zip
Remove getter for inventoryHandler.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/eathena/playerhandler.cpp2
-rw-r--r--src/net/inventoryhandler.h2
-rw-r--r--src/net/net.cpp6
-rw-r--r--src/net/net.h2
-rw-r--r--src/net/tmwa/playerhandler.cpp2
5 files changed, 5 insertions, 9 deletions
diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp
index d31fd5f0d..fd17105c9 100644
--- a/src/net/eathena/playerhandler.cpp
+++ b/src/net/eathena/playerhandler.cpp
@@ -176,7 +176,7 @@ void PlayerHandler::pickUp(const FloorItem *const floorItem) const
MessageOut outMsg(CMSG_ITEM_PICKUP);
outMsg.writeInt32(floorItem->getId());
EAthena::InventoryHandler *const handler =
- static_cast<EAthena::InventoryHandler*>(Net::getInventoryHandler());
+ static_cast<EAthena::InventoryHandler*>(inventoryHandler);
if (handler)
handler->pushPickup(floorItem->getId());
}
diff --git a/src/net/inventoryhandler.h b/src/net/inventoryhandler.h
index 7caad3994..ce134f90c 100644
--- a/src/net/inventoryhandler.h
+++ b/src/net/inventoryhandler.h
@@ -86,4 +86,6 @@ class InventoryHandler notfinal
} // namespace Net
+extern Net::InventoryHandler *inventoryHandler;
+
#endif // NET_INVENTORYHANDLER_H
diff --git a/src/net/net.cpp b/src/net/net.cpp
index feed36ea0..ed81a42ec 100644
--- a/src/net/net.cpp
+++ b/src/net/net.cpp
@@ -50,6 +50,7 @@ namespace Net
class GameHandler;
class GeneralHandler;
class GuildHandler;
+ class InventoryHandler;
}
Net::AdminHandler *adminHandler = nullptr;
@@ -75,11 +76,6 @@ Net::CashShopHandler *cashShopHandler = nullptr;
Net::FamilyHandler *familyHandler = nullptr;
Net::BankHandler *bankHandler = nullptr;
-Net::InventoryHandler *Net::getInventoryHandler()
-{
- return inventoryHandler;
-}
-
Net::LoginHandler *Net::getLoginHandler()
{
return loginHandler;
diff --git a/src/net/net.h b/src/net/net.h
index 71cbcc21e..baee5e9b2 100644
--- a/src/net/net.h
+++ b/src/net/net.h
@@ -36,7 +36,6 @@
namespace Net
{
-class InventoryHandler;
class LoginHandler;
class MailHandler;
class NpcHandler;
@@ -47,7 +46,6 @@ class SkillHandler;
class TradeHandler;
class ServerFeatures;
-InventoryHandler *getInventoryHandler() A_WARN_UNUSED;
LoginHandler *getLoginHandler() A_WARN_UNUSED;
NpcHandler *getNpcHandler() A_WARN_UNUSED;
PartyHandler *getPartyHandler() A_WARN_UNUSED;
diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp
index c2791e0d9..baf8e43a4 100644
--- a/src/net/tmwa/playerhandler.cpp
+++ b/src/net/tmwa/playerhandler.cpp
@@ -186,7 +186,7 @@ void PlayerHandler::pickUp(const FloorItem *const floorItem) const
MessageOut outMsg(CMSG_ITEM_PICKUP);
outMsg.writeInt32(floorItem->getId());
TmwAthena::InventoryHandler *const handler =
- static_cast<TmwAthena::InventoryHandler*>(Net::getInventoryHandler());
+ static_cast<TmwAthena::InventoryHandler*>(inventoryHandler);
if (handler)
handler->pushPickup(floorItem->getId());
}