From 4002c63e4164fa496038dee0e9cad2f5e1598772 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 6 Jan 2015 15:08:22 +0300 Subject: eathena: add packet CMSG_AUCTION_CLOSE 0x025d. --- src/net/auctionhandler.h | 2 ++ src/net/eathena/auctionhandler.cpp | 6 ++++++ src/net/eathena/auctionhandler.h | 2 ++ src/net/eathena/protocol.h | 1 + src/net/tmwa/auctionhandler.cpp | 4 ++++ src/net/tmwa/auctionhandler.h | 2 ++ 6 files changed, 17 insertions(+) (limited to 'src/net') diff --git a/src/net/auctionhandler.h b/src/net/auctionhandler.h index b8b51b7f1..b803f6bf6 100644 --- a/src/net/auctionhandler.h +++ b/src/net/auctionhandler.h @@ -46,6 +46,8 @@ class AuctionHandler notfinal const int hours) const = 0; virtual void cancel(const int auctionId) const = 0; + + virtual void close(const int auctionId) const = 0; }; } // namespace Net diff --git a/src/net/eathena/auctionhandler.cpp b/src/net/eathena/auctionhandler.cpp index 45b1e2dbb..afb5adbb5 100644 --- a/src/net/eathena/auctionhandler.cpp +++ b/src/net/eathena/auctionhandler.cpp @@ -155,4 +155,10 @@ void AuctionHandler::cancel(const int auctionId) const outMsg.writeInt32(auctionId, "auction id"); } +void AuctionHandler::close(const int auctionId) const +{ + createOutPacket(CMSG_AUCTION_CLOSE); + outMsg.writeInt32(auctionId, "auction id"); +} + } // namespace EAthena diff --git a/src/net/eathena/auctionhandler.h b/src/net/eathena/auctionhandler.h index 1c20b5317..e8406f317 100644 --- a/src/net/eathena/auctionhandler.h +++ b/src/net/eathena/auctionhandler.h @@ -47,6 +47,8 @@ class AuctionHandler final : public MessageHandler, public Net::AuctionHandler void cancel(const int auctionId) const override final; + void close(const int auctionId) const override final; + protected: static void processOpenWindow(Net::MessageIn &msg); diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index e2651a4f6..e1c3f4775 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -520,5 +520,6 @@ #define CMSG_AUCTION_SET_ITEM 0x024c #define CMSG_AUCTION_REGISTER 0x024d #define CMSG_AUCTION_CANCEL 0x024e +#define CMSG_AUCTION_CLOSE 0x025d #endif // NET_EATHENA_PROTOCOL_H diff --git a/src/net/tmwa/auctionhandler.cpp b/src/net/tmwa/auctionhandler.cpp index fe67264ac..2909881f5 100644 --- a/src/net/tmwa/auctionhandler.cpp +++ b/src/net/tmwa/auctionhandler.cpp @@ -61,4 +61,8 @@ void AuctionHandler::cancel(const int auctionId A_UNUSED) const { } +void AuctionHandler::close(const int auctionId A_UNUSED) const +{ +} + } // namespace TmwAthena diff --git a/src/net/tmwa/auctionhandler.h b/src/net/tmwa/auctionhandler.h index 0ccba887b..f36c07fa8 100644 --- a/src/net/tmwa/auctionhandler.h +++ b/src/net/tmwa/auctionhandler.h @@ -47,6 +47,8 @@ class AuctionHandler final : public MessageHandler, public Net::AuctionHandler const int hours) const override final; void cancel(const int auctionId) const override final; + + void close(const int auctionId) const override final; }; } // namespace TmwAthena -- cgit v1.2.3-70-g09d2