summaryrefslogtreecommitdiff
path: root/src/net/tmwa/buysellhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-03-01 17:59:15 +0300
committerAndrei Karas <akaras@inbox.ru>2015-03-01 17:59:15 +0300
commitc735249c6bc90c0e723c42e7c5b1276579609ec9 (patch)
tree631089153777345ec85b2c36c4da6a4777ee6fe8 /src/net/tmwa/buysellhandler.cpp
parent4f9bf0141d5b96372eec33a545ba546a9622426c (diff)
downloadplus-c735249c6bc90c0e723c42e7c5b1276579609ec9.tar.gz
plus-c735249c6bc90c0e723c42e7c5b1276579609ec9.tar.bz2
plus-c735249c6bc90c0e723c42e7c5b1276579609ec9.tar.xz
plus-c735249c6bc90c0e723c42e7c5b1276579609ec9.zip
Move requestSellList from ea namespace into eathena and tmwa.
Diffstat (limited to 'src/net/tmwa/buysellhandler.cpp')
-rw-r--r--src/net/tmwa/buysellhandler.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/net/tmwa/buysellhandler.cpp b/src/net/tmwa/buysellhandler.cpp
index 2f870c0a9..499cccaa6 100644
--- a/src/net/tmwa/buysellhandler.cpp
+++ b/src/net/tmwa/buysellhandler.cpp
@@ -22,6 +22,7 @@
#include "net/tmwa/buysellhandler.h"
+#include "configuration.h"
#include "notifymanager.h"
#include "being/playerinfo.h"
@@ -29,13 +30,19 @@
#include "enums/being/attributes.h"
#include "gui/windows/buydialog.h"
+#include "gui/windows/chatwindow.h"
+#include "gui/windows/shopwindow.h"
+#include "net/chathandler.h"
#include "net/serverfeatures.h"
#include "net/tmwa/protocol.h"
#include "resources/notifytypes.h"
+#include "utils/stringutils.h"
+#include "utils/timer.h"
+
#include "debug.h"
extern Net::BuySellHandler *buySellHandler;
@@ -136,4 +143,22 @@ void BuySellHandler::processNpcSellResponse(Net::MessageIn &msg)
}
}
+void BuySellHandler::requestSellList(const std::string &nick) const
+{
+ if (nick.empty() != 0 || !shopWindow)
+ return;
+
+ const std::string data("!selllist " + 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