diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-03-01 18:20:08 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-03-01 18:20:08 +0300 |
commit | 7a79a5fb19b07fe29112d28b8d74924e68aa007e (patch) | |
tree | 13fb4fb88157e27aae0928ad539a27fb6026cfcf /src/net/ea | |
parent | a91716af879291415679c807f6d2563fc078fdff (diff) | |
download | manaverse-7a79a5fb19b07fe29112d28b8d74924e68aa007e.tar.gz manaverse-7a79a5fb19b07fe29112d28b8d74924e68aa007e.tar.bz2 manaverse-7a79a5fb19b07fe29112d28b8d74924e68aa007e.tar.xz manaverse-7a79a5fb19b07fe29112d28b8d74924e68aa007e.zip |
Move sendSellRequest from ea namespace into eathena and tmwa.
Diffstat (limited to 'src/net/ea')
-rw-r--r-- | src/net/ea/buysellhandler.cpp | 29 | ||||
-rw-r--r-- | src/net/ea/buysellhandler.h | 4 |
2 files changed, 1 insertions, 32 deletions
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()) diff --git a/src/net/ea/buysellhandler.h b/src/net/ea/buysellhandler.h index bc5b2f395..e972b1208 100644 --- a/src/net/ea/buysellhandler.h +++ b/src/net/ea/buysellhandler.h @@ -37,10 +37,6 @@ class BuySellHandler notfinal : public Net::BuySellHandler A_DELETE_COPY(BuySellHandler) - virtual void sendSellRequest(const std::string &nick, - const ShopItem *const item, - const int amount) const override final; - protected: static void processNpcBuySellChoice(Net::MessageIn &msg); |