From 1ab01e47c19cea70b4ce9aa8ceb4e6eb3c273b08 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 5 Feb 2015 18:43:59 +0300 Subject: eathena: add packet CMSG_BUYINGSTORE_CLOSE 0x0817. --- src/net/buyingstorehandler.h | 1 + src/net/eathena/buyingstorehandler.cpp | 5 +++++ src/net/eathena/buyingstorehandler.h | 2 ++ src/net/eathena/protocol.h | 1 + src/net/tmwa/buyingstorehandler.cpp | 4 ++++ src/net/tmwa/buyingstorehandler.h | 2 ++ 6 files changed, 15 insertions(+) diff --git a/src/net/buyingstorehandler.h b/src/net/buyingstorehandler.h index bc7f6177c..ac153b790 100644 --- a/src/net/buyingstorehandler.h +++ b/src/net/buyingstorehandler.h @@ -41,6 +41,7 @@ class BuyingStoreHandler notfinal const int maxMoney, const bool flag, std::vector &items) const = 0; + virtual void close() const = 0; }; } // namespace Net diff --git a/src/net/eathena/buyingstorehandler.cpp b/src/net/eathena/buyingstorehandler.cpp index 519c30aae..7801fb5f4 100644 --- a/src/net/eathena/buyingstorehandler.cpp +++ b/src/net/eathena/buyingstorehandler.cpp @@ -142,4 +142,9 @@ void BuyingStoreHandler::create(const std::string &name, } } +void BuyingStoreHandler::close() const +{ + createOutPacket(CMSG_BUYINGSTORE_CLOSE); +} + } // namespace EAthena diff --git a/src/net/eathena/buyingstorehandler.h b/src/net/eathena/buyingstorehandler.h index 1a647a67c..4e1d0dcd0 100644 --- a/src/net/eathena/buyingstorehandler.h +++ b/src/net/eathena/buyingstorehandler.h @@ -42,6 +42,8 @@ class BuyingStoreHandler final : public MessageHandler, const bool flag, std::vector &items) const override final; + void close() const override final; + protected: static void processBuyingStoreOpen(Net::MessageIn &msg); diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index 1f5d913a3..e6a599cf7 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -551,5 +551,6 @@ #define CMSG_VENDING_CREATE_SHOP 0x01b2 #define CMSG_BUYINGSTORE_CREATE 0x0815 +#define CMSG_BUYINGSTORE_CLOSE 0x0817 #endif // NET_EATHENA_PROTOCOL_H diff --git a/src/net/tmwa/buyingstorehandler.cpp b/src/net/tmwa/buyingstorehandler.cpp index 160a6b270..c4b473ad6 100644 --- a/src/net/tmwa/buyingstorehandler.cpp +++ b/src/net/tmwa/buyingstorehandler.cpp @@ -49,4 +49,8 @@ void BuyingStoreHandler::create(const std::string &name A_UNUSED, { } +void BuyingStoreHandler::close() const +{ +} + } // namespace TmwAthena diff --git a/src/net/tmwa/buyingstorehandler.h b/src/net/tmwa/buyingstorehandler.h index 821bae865..04ede95a7 100644 --- a/src/net/tmwa/buyingstorehandler.h +++ b/src/net/tmwa/buyingstorehandler.h @@ -42,6 +42,8 @@ class BuyingStoreHandler final : public MessageHandler, const int maxMoney, const bool flag, std::vector &items) const; + + void close() const override final; }; } // namespace TmwAthena -- cgit v1.2.3-70-g09d2