summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-03-26 21:48:29 +0300
committerAndrei Karas <akaras@inbox.ru>2015-03-26 21:48:29 +0300
commitd6f607842bb91d2f76b6d677e4e899de50fa27cf (patch)
treee9f16601d04bbc4cca41ba30320baa579dcf52e2 /src
parent25dff985b6415335536a2df2e901098ebc3369e3 (diff)
downloadmanaplus-d6f607842bb91d2f76b6d677e4e899de50fa27cf.tar.gz
manaplus-d6f607842bb91d2f76b6d677e4e899de50fa27cf.tar.bz2
manaplus-d6f607842bb91d2f76b6d677e4e899de50fa27cf.tar.xz
manaplus-d6f607842bb91d2f76b6d677e4e899de50fa27cf.zip
eathena: add packet CMSG_NPC_SHOP_CLOSE 0x09d4.
Diffstat (limited to 'src')
-rw-r--r--src/net/buysellhandler.h2
-rw-r--r--src/net/eathena/buysellhandler.cpp6
-rw-r--r--src/net/eathena/buysellhandler.h2
-rw-r--r--src/net/eathena/protocol.h1
-rw-r--r--src/net/tmwa/buysellhandler.cpp4
-rw-r--r--src/net/tmwa/buysellhandler.h2
6 files changed, 17 insertions, 0 deletions
diff --git a/src/net/buysellhandler.h b/src/net/buysellhandler.h
index 2b073f7ef..ebb42d2a4 100644
--- a/src/net/buysellhandler.h
+++ b/src/net/buysellhandler.h
@@ -49,6 +49,8 @@ class BuySellHandler notfinal
virtual void sendSellRequest(const std::string &nick,
const ShopItem *const item,
const int amount) const = 0;
+
+ virtual void close() const = 0;
};
} // namespace Net
diff --git a/src/net/eathena/buysellhandler.cpp b/src/net/eathena/buysellhandler.cpp
index 1d1b81788..a810feac7 100644
--- a/src/net/eathena/buysellhandler.cpp
+++ b/src/net/eathena/buysellhandler.cpp
@@ -30,6 +30,7 @@
#include "gui/windows/buydialog.h"
+#include "net/eathena/messageout.h"
#include "net/eathena/protocol.h"
#include "resources/notifytypes.h"
@@ -148,4 +149,9 @@ void BuySellHandler::sendSellRequest(const std::string &nick A_UNUSED,
{
}
+void BuySellHandler::close() const
+{
+ createOutPacket(CMSG_NPC_SHOP_CLOSE);
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/buysellhandler.h b/src/net/eathena/buysellhandler.h
index 5e09d0abe..5a967a55f 100644
--- a/src/net/eathena/buysellhandler.h
+++ b/src/net/eathena/buysellhandler.h
@@ -53,6 +53,8 @@ class BuySellHandler final : public MessageHandler, public Ea::BuySellHandler
const ShopItem *const item,
const int amount) const override final;
+ void close() const override final;
+
protected:
static void processNpcBuy(Net::MessageIn &msg);
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index c55afa3ac..81c062f79 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -613,6 +613,7 @@
#define CMSG_NPC_IDENTIFY 0x0178
#define CMSG_NPC_SELECT_ARROW 0x01ae
#define CMSG_NPC_SELECT_AUTO_SPELL 0x01ce
+#define CMSG_NPC_SHOP_CLOSE 0x09d4
#define CMSG_PLAYER_MAPMOVE 0x0140
#define CMSG_REMOVE_OPTION 0x012a
diff --git a/src/net/tmwa/buysellhandler.cpp b/src/net/tmwa/buysellhandler.cpp
index bbf5ca3e7..e63559d20 100644
--- a/src/net/tmwa/buysellhandler.cpp
+++ b/src/net/tmwa/buysellhandler.cpp
@@ -217,4 +217,8 @@ void BuySellHandler::sendSellRequest(const std::string &nick,
chatWindow->addWhisper(nick, data, ChatMsgType::BY_PLAYER);
}
+void BuySellHandler::close() const
+{
+}
+
} // namespace TmwAthena
diff --git a/src/net/tmwa/buysellhandler.h b/src/net/tmwa/buysellhandler.h
index 8730cab7e..6547ef05b 100644
--- a/src/net/tmwa/buysellhandler.h
+++ b/src/net/tmwa/buysellhandler.h
@@ -53,6 +53,8 @@ class BuySellHandler final : public MessageHandler, public Ea::BuySellHandler
const ShopItem *const item,
const int amount) const override final;
+ void close() const override final;
+
protected:
static void processNpcBuy(Net::MessageIn &msg);