diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-17 00:29:18 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-17 00:29:18 +0300 |
commit | e5698022dfae8aec4c9b4696dc6a93d5edc84d5d (patch) | |
tree | 1885a7117559aabbdfb5132ef12ed725482c6882 /src | |
parent | 0c821c1e711b7cd1e16089a04e866f5869782975 (diff) | |
download | manaplus-e5698022dfae8aec4c9b4696dc6a93d5edc84d5d.tar.gz manaplus-e5698022dfae8aec4c9b4696dc6a93d5edc84d5d.tar.bz2 manaplus-e5698022dfae8aec4c9b4696dc6a93d5edc84d5d.tar.xz manaplus-e5698022dfae8aec4c9b4696dc6a93d5edc84d5d.zip |
Remove getter for beingHandler.
Diffstat (limited to 'src')
-rw-r--r-- | src/actions/actions.cpp | 2 | ||||
-rw-r--r-- | src/actormanager.cpp | 2 | ||||
-rw-r--r-- | src/being/localplayer.cpp | 2 | ||||
-rw-r--r-- | src/gui/popups/popupmenu.cpp | 2 | ||||
-rw-r--r-- | src/net/beinghandler.h | 2 | ||||
-rw-r--r-- | src/net/net.cpp | 6 | ||||
-rw-r--r-- | src/net/net.h | 2 |
7 files changed, 7 insertions, 11 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp index e3ad3a11a..d087f39e7 100644 --- a/src/actions/actions.cpp +++ b/src/actions/actions.cpp @@ -772,7 +772,7 @@ impHandler(undress) if (!target) target = localPlayer->getTarget(); if (target) - Net::getBeingHandler()->undress(target); + beingHandler->undress(target); return true; } diff --git a/src/actormanager.cpp b/src/actormanager.cpp index 8c83ebce4..9827e1485 100644 --- a/src/actormanager.cpp +++ b/src/actormanager.cpp @@ -247,7 +247,7 @@ Being *ActorManager::createBeing(const int id, if (type == ActorType::Player || type == ActorType::Npc) { being->updateFromCache(); - Net::getBeingHandler()->requestNameById(id); + beingHandler->requestNameById(id); if (localPlayer) localPlayer->checkNewName(being); } diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp index 1b5df36aa..a4faa0496 100644 --- a/src/being/localplayer.cpp +++ b/src/being/localplayer.cpp @@ -2407,7 +2407,7 @@ void LocalPlayer::pingRequest() mPingSendTick = time; mWaitPing = true; - Net::getBeingHandler()->requestNameById(getId()); + beingHandler->requestNameById(getId()); } std::string LocalPlayer::getPingTime() const diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp index 00b19ee38..423e340c4 100644 --- a/src/gui/popups/popupmenu.cpp +++ b/src/gui/popups/popupmenu.cpp @@ -1402,7 +1402,7 @@ void PopupMenu::handleLink(const std::string &link, } else if (link == "undress" && being) { - Net::getBeingHandler()->undress(being); + beingHandler->undress(being); } else if (link == "addcomment" && !mNick.empty()) { diff --git a/src/net/beinghandler.h b/src/net/beinghandler.h index 1f988f360..5b2495a1d 100644 --- a/src/net/beinghandler.h +++ b/src/net/beinghandler.h @@ -49,4 +49,6 @@ class BeingHandler notfinal } // namespace Net +extern Net::BeingHandler *beingHandler; + #endif // NET_BEINGHANDLER_H diff --git a/src/net/net.cpp b/src/net/net.cpp index 978300b3b..f6a3413e7 100644 --- a/src/net/net.cpp +++ b/src/net/net.cpp @@ -41,6 +41,7 @@ namespace Net class AdminHandler; class AuctionHandler; class BankHandler; + class BeingHandler; } Net::AdminHandler *adminHandler = nullptr; @@ -131,11 +132,6 @@ Net::TradeHandler *Net::getTradeHandler() return tradeHandler; } -Net::BeingHandler *Net::getBeingHandler() -{ - return beingHandler; -} - Net::BuySellHandler *Net::getBuySellHandler() { return buySellHandler; diff --git a/src/net/net.h b/src/net/net.h index d90008027..be6a2647b 100644 --- a/src/net/net.h +++ b/src/net/net.h @@ -36,7 +36,6 @@ namespace Net { -class BeingHandler; class CashShopHandler; class CharServerHandler; class ChatHandler; @@ -56,7 +55,6 @@ class TradeHandler; class BuySellHandler; class ServerFeatures; -BeingHandler *getBeingHandler() A_WARN_UNUSED; CharServerHandler *getCharServerHandler() A_WARN_UNUSED; ChatHandler *getChatHandler() A_WARN_UNUSED; GameHandler *getGameHandler() A_WARN_UNUSED; |