summaryrefslogtreecommitdiff
path: root/src/net/tmwa/buysellhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-03-01 18:03:03 +0300
committerAndrei Karas <akaras@inbox.ru>2015-03-01 18:03:03 +0300
commit582ca3b9024277fa845aa7d5fd180b9c304b3513 (patch)
tree52356cd3d703c648e4876f800f66aae8b18999eb /src/net/tmwa/buysellhandler.cpp
parentc735249c6bc90c0e723c42e7c5b1276579609ec9 (diff)
downloadmanaplus-582ca3b9024277fa845aa7d5fd180b9c304b3513.tar.gz
manaplus-582ca3b9024277fa845aa7d5fd180b9c304b3513.tar.bz2
manaplus-582ca3b9024277fa845aa7d5fd180b9c304b3513.tar.xz
manaplus-582ca3b9024277fa845aa7d5fd180b9c304b3513.zip
Move requestBuyList from ea namespace into eathena and tmwa.
Diffstat (limited to 'src/net/tmwa/buysellhandler.cpp')
-rw-r--r--src/net/tmwa/buysellhandler.cpp19
1 files changed, 19 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