diff options
Diffstat (limited to 'src/net/tmwa')
-rw-r--r-- | src/net/tmwa/buysellhandler.cpp | 19 | ||||
-rw-r--r-- | src/net/tmwa/buysellhandler.h | 3 |
2 files changed, 22 insertions, 0 deletions
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 diff --git a/src/net/tmwa/buysellhandler.h b/src/net/tmwa/buysellhandler.h index 4197eda81..01137e5f8 100644 --- a/src/net/tmwa/buysellhandler.h +++ b/src/net/tmwa/buysellhandler.h @@ -42,6 +42,9 @@ class BuySellHandler final : public MessageHandler, public Ea::BuySellHandler void requestSellList(const std::string &nick) const override final; + void requestBuyList(const std::string &nick) + const override final; + protected: static void processNpcBuy(Net::MessageIn &msg); |