From 582ca3b9024277fa845aa7d5fd180b9c304b3513 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 1 Mar 2015 18:03:03 +0300 Subject: Move requestBuyList from ea namespace into eathena and tmwa. --- src/net/tmwa/buysellhandler.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/net/tmwa/buysellhandler.cpp') diff --git a/src/net/tmwa/buysellhandler.cpp b/src/net/tmwa/buysellhandler.cpp index 499cccaa6..2e5f79127 100644 --- a/src/net/tmwa/buysellhandler.cpp +++ b/src/net/tmwa/buysellhandler.cpp @@ -161,4 +161,23 @@ void BuySellHandler::requestSellList(const std::string &nick) const } } +void BuySellHandler::requestBuyList(const std::string &nick) const +{ + if (nick.empty() || !shopWindow) + return; + + const std::string data("!buylist " + toString(tick_time)); + shopWindow->setAcceptPlayer(nick); + + if (config.getBoolValue("hideShopMessages")) + { + chatHandler->privateMessage(nick, data); + } + else + { + if (chatWindow) + chatWindow->addWhisper(nick, data, ChatMsgType::BY_PLAYER); + } +} + } // namespace TmwAthena -- cgit v1.2.3-60-g2f50