summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-01-07 14:02:51 +0300
committerAndrei Karas <akaras@inbox.ru>2015-01-07 14:02:51 +0300
commit9d195207af67df767233ff6128f5b1df0421f83e (patch)
tree2251ed2b3c1c1c79ac34d5d11eca18ef07c87206 /src
parent29a7ea1d119f87b381dc36c5be3726dbd3fae92d (diff)
downloadmanaplus-9d195207af67df767233ff6128f5b1df0421f83e.tar.gz
manaplus-9d195207af67df767233ff6128f5b1df0421f83e.tar.bz2
manaplus-9d195207af67df767233ff6128f5b1df0421f83e.tar.xz
manaplus-9d195207af67df767233ff6128f5b1df0421f83e.zip
eathena: add packet CMSG_VENDING_CLOSE 0x012e.
Diffstat (limited to 'src')
-rw-r--r--src/net/eathena/protocol.h2
-rw-r--r--src/net/eathena/vendinghandler.cpp6
-rw-r--r--src/net/eathena/vendinghandler.h2
-rw-r--r--src/net/tmwa/vendinghandler.cpp4
-rw-r--r--src/net/tmwa/vendinghandler.h2
-rw-r--r--src/net/vendinghandler.h2
6 files changed, 18 insertions, 0 deletions
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index 0d3954d7b..a6f14c109 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -533,4 +533,6 @@
#define CMSG_AUCTION_SEARCH 0x0251
#define CMSG_AUCTION_BUY_SELL 0x025c
+#define CMSG_VENDING_CLOSE 0x012e
+
#endif // NET_EATHENA_PROTOCOL_H
diff --git a/src/net/eathena/vendinghandler.cpp b/src/net/eathena/vendinghandler.cpp
index 991bcdf10..dd1d7e7cc 100644
--- a/src/net/eathena/vendinghandler.cpp
+++ b/src/net/eathena/vendinghandler.cpp
@@ -20,6 +20,7 @@
#include "net/eathena/vendinghandler.h"
+#include "net/eathena/messageout.h"
#include "net/eathena/protocol.h"
#include "debug.h"
@@ -151,4 +152,9 @@ void VendingHandler::processReport(Net::MessageIn &msg)
msg.readInt16("amount");
}
+void VendingHandler::close() const
+{
+ createOutPacket(CMSG_VENDING_CLOSE);
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/vendinghandler.h b/src/net/eathena/vendinghandler.h
index d775f7958..cf451e8fa 100644
--- a/src/net/eathena/vendinghandler.h
+++ b/src/net/eathena/vendinghandler.h
@@ -37,6 +37,8 @@ class VendingHandler final : public MessageHandler,
void handleMessage(Net::MessageIn &msg) override final;
+ void close() const override final;
+
protected:
static void processOpenReq(Net::MessageIn &msg);
diff --git a/src/net/tmwa/vendinghandler.cpp b/src/net/tmwa/vendinghandler.cpp
index 2250f2f1e..459acfaa5 100644
--- a/src/net/tmwa/vendinghandler.cpp
+++ b/src/net/tmwa/vendinghandler.cpp
@@ -42,4 +42,8 @@ void VendingHandler::handleMessage(Net::MessageIn &msg A_UNUSED)
{
}
+void VendingHandler::close() const
+{
+}
+
} // namespace TmwAthena
diff --git a/src/net/tmwa/vendinghandler.h b/src/net/tmwa/vendinghandler.h
index 567494110..961f3c8df 100644
--- a/src/net/tmwa/vendinghandler.h
+++ b/src/net/tmwa/vendinghandler.h
@@ -37,6 +37,8 @@ class VendingHandler final : public MessageHandler,
A_DELETE_COPY(VendingHandler)
void handleMessage(Net::MessageIn &msg) override final;
+
+ void close() const override final;
};
} // namespace TmwAthena
diff --git a/src/net/vendinghandler.h b/src/net/vendinghandler.h
index d0bff9198..e07e2c246 100644
--- a/src/net/vendinghandler.h
+++ b/src/net/vendinghandler.h
@@ -33,6 +33,8 @@ class VendingHandler notfinal
public:
virtual ~VendingHandler()
{ }
+
+ virtual void close() const = 0;
};
} // namespace Net