diff options
-rw-r--r-- | src/net/buyingstorehandler.h | 4 | ||||
-rw-r--r-- | src/net/eathena/buyingstorehandler.cpp | 10 | ||||
-rw-r--r-- | src/net/eathena/buyingstorehandler.h | 2 | ||||
-rw-r--r-- | src/net/eathena/packets.h | 2 | ||||
-rw-r--r-- | src/net/eathena/protocol.h | 1 | ||||
-rw-r--r-- | src/net/tmwa/buyingstorehandler.cpp | 4 | ||||
-rw-r--r-- | src/net/tmwa/buyingstorehandler.h | 2 |
7 files changed, 24 insertions, 1 deletions
diff --git a/src/net/buyingstorehandler.h b/src/net/buyingstorehandler.h index ac153b790..984fd0d98 100644 --- a/src/net/buyingstorehandler.h +++ b/src/net/buyingstorehandler.h @@ -26,6 +26,7 @@ #include "localconsts.h" +class Being; class ShopItem; namespace Net @@ -37,10 +38,13 @@ class BuyingStoreHandler notfinal virtual ~BuyingStoreHandler() { } + virtual void open(const Being *const being) const = 0; + virtual void create(const std::string &name, const int maxMoney, const bool flag, std::vector<ShopItem*> &items) const = 0; + virtual void close() const = 0; }; diff --git a/src/net/eathena/buyingstorehandler.cpp b/src/net/eathena/buyingstorehandler.cpp index efcdc6d0c..44a8a7d4b 100644 --- a/src/net/eathena/buyingstorehandler.cpp +++ b/src/net/eathena/buyingstorehandler.cpp @@ -23,6 +23,8 @@ #include "notifymanager.h" #include "shopitem.h" +#include "being/being.h" + #include "net/ea/eaprotocol.h" #include "net/eathena/messageout.h" @@ -157,4 +159,12 @@ void BuyingStoreHandler::close() const createOutPacket(CMSG_BUYINGSTORE_CLOSE); } +void BuyingStoreHandler::open(const Being *const being) const +{ + if (!being) + return; + createOutPacket(SMSG_BUYINGSTORE_OPEN); + outMsg.writeInt32(being->getId(), "account id"); +} + } // namespace EAthena diff --git a/src/net/eathena/buyingstorehandler.h b/src/net/eathena/buyingstorehandler.h index 8d6fe4255..ae38bffa8 100644 --- a/src/net/eathena/buyingstorehandler.h +++ b/src/net/eathena/buyingstorehandler.h @@ -44,6 +44,8 @@ class BuyingStoreHandler final : public MessageHandler, void close() const override final; + void open(const Being *const being) const override final; + protected: static void processBuyingStoreOpen(Net::MessageIn &msg); diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h index 147e6ac67..8dac54b14 100644 --- a/src/net/eathena/packets.h +++ b/src/net/eathena/packets.h @@ -112,7 +112,7 @@ int16_t packet_lengths[] = // #0x0340 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // #0x0380 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index afea06b62..c2be70ec0 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -553,5 +553,6 @@ #define CMSG_BUYINGSTORE_CREATE 0x0815 #define CMSG_BUYINGSTORE_CLOSE 0x0817 +#define CMSG_BUYINGSTORE_OPEN 0x0360 #endif // NET_EATHENA_PROTOCOL_H diff --git a/src/net/tmwa/buyingstorehandler.cpp b/src/net/tmwa/buyingstorehandler.cpp index c4b473ad6..a0f3d9194 100644 --- a/src/net/tmwa/buyingstorehandler.cpp +++ b/src/net/tmwa/buyingstorehandler.cpp @@ -53,4 +53,8 @@ void BuyingStoreHandler::close() const { } +void BuyingStoreHandler::open(const Being *const being A_UNUSED) const +{ +} + } // namespace TmwAthena diff --git a/src/net/tmwa/buyingstorehandler.h b/src/net/tmwa/buyingstorehandler.h index 04ede95a7..205e30ecc 100644 --- a/src/net/tmwa/buyingstorehandler.h +++ b/src/net/tmwa/buyingstorehandler.h @@ -44,6 +44,8 @@ class BuyingStoreHandler final : public MessageHandler, std::vector<ShopItem*> &items) const; void close() const override final; + + void open(const Being *const being) const override final; }; } // namespace TmwAthena |