summaryrefslogtreecommitdiff
path: root/src/net/tmwa/buysellhandler.cpp
diff options
context:
space:
mode:
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