From 6eb12f07e8d1c813e094097dd94bf4fc450bace3 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 6 Jan 2015 22:18:08 +0300 Subject: eathena: add packet CMSG_AUCTION_BUY_SELL 0x025c. --- src/net/auctionhandler.h | 4 ++++ src/net/eathena/auctionhandler.cpp | 12 ++++++++++++ src/net/eathena/auctionhandler.h | 4 ++++ src/net/eathena/protocol.h | 1 + src/net/tmwa/auctionhandler.cpp | 8 ++++++++ src/net/tmwa/auctionhandler.h | 4 ++++ 6 files changed, 33 insertions(+) diff --git a/src/net/auctionhandler.h b/src/net/auctionhandler.h index 1dd4c32aa..c1a3dc8a8 100644 --- a/src/net/auctionhandler.h +++ b/src/net/auctionhandler.h @@ -58,6 +58,10 @@ class AuctionHandler notfinal const int auctionId, const std::string &text, const int page) const = 0; + + virtual void buy() const = 0; + + virtual void sell() const = 0; }; } // namespace Net diff --git a/src/net/eathena/auctionhandler.cpp b/src/net/eathena/auctionhandler.cpp index d95cc3c6e..6ef2ca81c 100644 --- a/src/net/eathena/auctionhandler.cpp +++ b/src/net/eathena/auctionhandler.cpp @@ -181,4 +181,16 @@ void AuctionHandler::search(const AuctionSearchType::Type type, outMsg.writeInt16(page, "page"); } +void AuctionHandler::buy() const +{ + createOutPacket(CMSG_AUCTION_BUY_SELL); + outMsg.writeInt16(1, "buy/sell type"); +} + +void AuctionHandler::sell() const +{ + createOutPacket(CMSG_AUCTION_BUY_SELL); + outMsg.writeInt16(0, "buy/sell type"); +} + } // namespace EAthena diff --git a/src/net/eathena/auctionhandler.h b/src/net/eathena/auctionhandler.h index de2574e4b..c393a6798 100644 --- a/src/net/eathena/auctionhandler.h +++ b/src/net/eathena/auctionhandler.h @@ -57,6 +57,10 @@ class AuctionHandler final : public MessageHandler, public Net::AuctionHandler const std::string &text, const int page) const override final; + void buy() const override final; + + void sell() 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 dda0cf4cd..8e37d376f 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -523,5 +523,6 @@ #define CMSG_AUCTION_CLOSE 0x025d #define CMSG_AUCTION_BID 0x024f #define CMSG_AUCTION_SEARCH 0x0251 +#define CMSG_AUCTION_BUY_SELL 0x025c #endif // NET_EATHENA_PROTOCOL_H diff --git a/src/net/tmwa/auctionhandler.cpp b/src/net/tmwa/auctionhandler.cpp index 2c1dd981f..773c95f1d 100644 --- a/src/net/tmwa/auctionhandler.cpp +++ b/src/net/tmwa/auctionhandler.cpp @@ -77,4 +77,12 @@ void AuctionHandler::search(const AuctionSearchType::Type type A_UNUSED, { } +void AuctionHandler::buy() const +{ +} + +void AuctionHandler::sell() const +{ +} + } // namespace TmwAthena diff --git a/src/net/tmwa/auctionhandler.h b/src/net/tmwa/auctionhandler.h index 47f942aa8..f3c1fe9c8 100644 --- a/src/net/tmwa/auctionhandler.h +++ b/src/net/tmwa/auctionhandler.h @@ -57,6 +57,10 @@ class AuctionHandler final : public MessageHandler, public Net::AuctionHandler const int auctionId, const std::string &text, const int page) const override final; + + void buy() const override final; + + void sell() const override final; }; } // namespace TmwAthena -- cgit v1.2.3-60-g2f50