From c841447e5196a34f62860189b0960d78a0ce1ced Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 17 Sep 2014 00:32:31 +0300 Subject: Remove getter for buySellHandler. --- src/gui/popups/popupmenu.cpp | 8 ++++---- src/gui/windows/buydialog.cpp | 2 +- src/gui/windows/buyselldialog.cpp | 4 ++-- src/gui/windows/selldialog.cpp | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/gui') diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp index 423e340c4..89de39145 100644 --- a/src/gui/popups/popupmenu.cpp +++ b/src/gui/popups/popupmenu.cpp @@ -918,22 +918,22 @@ void PopupMenu::handleLink(const std::string &link, if (being->getType() == ActorType::Npc) Net::getNpcHandler()->buy(mBeingId); else if (being->getType() == ActorType::Player) - Net::getBuySellHandler()->requestSellList(being->getName()); + buySellHandler->requestSellList(being->getName()); } else if (link == "buy" && !mNick.empty()) { - Net::getBuySellHandler()->requestSellList(mNick); + buySellHandler->requestSellList(mNick); } else if (link == "sell" && being && mBeingId != 0) { if (being->getType() == ActorType::Npc) Net::getNpcHandler()->sell(mBeingId); else if (being->getType() == ActorType::Player) - Net::getBuySellHandler()->requestBuyList(being->getName()); + buySellHandler->requestBuyList(being->getName()); } else if (link == "sell" && !mNick.empty()) { - Net::getBuySellHandler()->requestBuyList(mNick); + buySellHandler->requestBuyList(mNick); } else if (link == "attack" && being) { diff --git a/src/gui/windows/buydialog.cpp b/src/gui/windows/buydialog.cpp index c09044f7b..c86ef184a 100644 --- a/src/gui/windows/buydialog.cpp +++ b/src/gui/windows/buydialog.cpp @@ -459,7 +459,7 @@ void BuyDialog::action(const ActionEvent &event) const ShopItem *const item = mShopItems->at(selectedItem); if (item) { - Net::getBuySellHandler()->sendBuyRequest(mNick, + buySellHandler->sendBuyRequest(mNick, item, mAmountItems); tradeWindow->addAutoMoney(mNick, item->getPrice() * mAmountItems); diff --git a/src/gui/windows/buyselldialog.cpp b/src/gui/windows/buyselldialog.cpp index 238389ce9..f8d2ec954 100644 --- a/src/gui/windows/buyselldialog.cpp +++ b/src/gui/windows/buyselldialog.cpp @@ -132,14 +132,14 @@ void BuySellDialog::action(const ActionEvent &event) if (mNpcId != -1) Net::getNpcHandler()->buy(mNpcId); else - Net::getBuySellHandler()->requestSellList(mNick); + buySellHandler->requestSellList(mNick); } else if (eventId == "Sell") { if (mNpcId != -1) Net::getNpcHandler()->sell(mNpcId); else - Net::getBuySellHandler()->requestBuyList(mNick); + buySellHandler->requestBuyList(mNick); } close(); diff --git a/src/gui/windows/selldialog.cpp b/src/gui/windows/selldialog.cpp index 70d790733..b62b22976 100644 --- a/src/gui/windows/selldialog.cpp +++ b/src/gui/windows/selldialog.cpp @@ -305,7 +305,7 @@ void SellDialog::action(const ActionEvent &event) else { ShopItem *const item = mShopItems->at(selectedItem); - Net::getBuySellHandler()->sendSellRequest(mNick, + buySellHandler->sendSellRequest(mNick, item, mAmountItems); if (tradeWindow) -- cgit v1.2.3-60-g2f50