From 7a79a5fb19b07fe29112d28b8d74924e68aa007e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 1 Mar 2015 18:20:08 +0300 Subject: Move sendSellRequest from ea namespace into eathena and tmwa. --- src/net/ea/buysellhandler.cpp | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) (limited to 'src/net/ea/buysellhandler.cpp') diff --git a/src/net/ea/buysellhandler.cpp b/src/net/ea/buysellhandler.cpp index 3ac4951bc..8af3cb4f0 100644 --- a/src/net/ea/buysellhandler.cpp +++ b/src/net/ea/buysellhandler.cpp @@ -22,7 +22,6 @@ #include "net/ea/buysellhandler.h" -#include "configuration.h" #include "inventory.h" #include "notifymanager.h" @@ -30,19 +29,12 @@ #include "enums/being/attributes.h" -#include "gui/windows/chatwindow.h" +#include "gui/windows/buydialog.h" #include "gui/windows/buyselldialog.h" #include "gui/windows/npcselldialog.h" -#include "gui/windows/buydialog.h" -#include "gui/windows/shopwindow.h" - -#include "net/chathandler.h" - #include "net/ea/eaprotocol.h" -#include "utils/timer.h" - #include "resources/notifytypes.h" #include "debug.h" @@ -59,25 +51,6 @@ BuySellHandler::BuySellHandler() mBuyDialog = nullptr; } -void BuySellHandler::sendSellRequest(const std::string &nick, - const ShopItem *const item, - const int amount) const -{ - if (!chatWindow || nick.empty() || !item || - amount < 1 || amount > item->getQuantity()) - { - return; - } - - const std::string data = strprintf("!sellitem %d %d %d", - item->getId(), item->getPrice(), amount); - - if (config.getBoolValue("hideShopMessages")) - chatHandler->privateMessage(nick, data); - else - chatWindow->addWhisper(nick, data, ChatMsgType::BY_PLAYER); -} - void BuySellHandler::processNpcBuySellChoice(Net::MessageIn &msg) { if (!BuySellDialog::isActive()) -- cgit v1.2.3-60-g2f50