From d12294702a4abd46a3fab0f2ea5b9aa3f8ef824a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 6 Jan 2015 22:12:43 +0300 Subject: eathena: add packet CMSG_AUCTION_SEARCH 0x0251. --- src/net/auctionhandler.h | 7 +++++++ src/net/eathena/auctionhandler.cpp | 12 ++++++++++++ src/net/eathena/auctionhandler.h | 5 +++++ src/net/eathena/protocol.h | 1 + src/net/tmwa/auctionhandler.cpp | 7 +++++++ src/net/tmwa/auctionhandler.h | 5 +++++ 6 files changed, 37 insertions(+) diff --git a/src/net/auctionhandler.h b/src/net/auctionhandler.h index 815393056..1dd4c32aa 100644 --- a/src/net/auctionhandler.h +++ b/src/net/auctionhandler.h @@ -21,6 +21,8 @@ #ifndef NET_AUCTIONHANDLER_H #define NET_AUCTIONHANDLER_H +#include "enums/net/auctionsearchtype.h" + #include #include "localconsts.h" @@ -51,6 +53,11 @@ class AuctionHandler notfinal virtual void bid(const int auctionId, const int money) const = 0; + + virtual void search(const AuctionSearchType::Type type, + const int auctionId, + const std::string &text, + const int page) const = 0; }; } // namespace Net diff --git a/src/net/eathena/auctionhandler.cpp b/src/net/eathena/auctionhandler.cpp index 0afe441a9..d95cc3c6e 100644 --- a/src/net/eathena/auctionhandler.cpp +++ b/src/net/eathena/auctionhandler.cpp @@ -169,4 +169,16 @@ void AuctionHandler::bid(const int auctionId, outMsg.writeInt32(money, "money"); } +void AuctionHandler::search(const AuctionSearchType::Type type, + const int auctionId, + const std::string &text, + const int page) const +{ + createOutPacket(CMSG_AUCTION_SEARCH); + outMsg.writeInt16(static_cast(type), "search type"); + outMsg.writeInt32(auctionId, "auction id"); + outMsg.writeString(text, 24, "search text"); + outMsg.writeInt16(page, "page"); +} + } // namespace EAthena diff --git a/src/net/eathena/auctionhandler.h b/src/net/eathena/auctionhandler.h index 4cf336b96..de2574e4b 100644 --- a/src/net/eathena/auctionhandler.h +++ b/src/net/eathena/auctionhandler.h @@ -52,6 +52,11 @@ class AuctionHandler final : public MessageHandler, public Net::AuctionHandler void bid(const int auctionId, const int money) const override final; + void search(const AuctionSearchType::Type type, + const int auctionId, + const std::string &text, + const int page) 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 dd53a12f0..dda0cf4cd 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -522,5 +522,6 @@ #define CMSG_AUCTION_CANCEL 0x024e #define CMSG_AUCTION_CLOSE 0x025d #define CMSG_AUCTION_BID 0x024f +#define CMSG_AUCTION_SEARCH 0x0251 #endif // NET_EATHENA_PROTOCOL_H diff --git a/src/net/tmwa/auctionhandler.cpp b/src/net/tmwa/auctionhandler.cpp index a52a01b36..2c1dd981f 100644 --- a/src/net/tmwa/auctionhandler.cpp +++ b/src/net/tmwa/auctionhandler.cpp @@ -70,4 +70,11 @@ void AuctionHandler::bid(const int auctionId A_UNUSED, { } +void AuctionHandler::search(const AuctionSearchType::Type type A_UNUSED, + const int auctionId A_UNUSED, + const std::string &text A_UNUSED, + const int page A_UNUSED) const +{ +} + } // namespace TmwAthena diff --git a/src/net/tmwa/auctionhandler.h b/src/net/tmwa/auctionhandler.h index 4abe9f514..47f942aa8 100644 --- a/src/net/tmwa/auctionhandler.h +++ b/src/net/tmwa/auctionhandler.h @@ -52,6 +52,11 @@ class AuctionHandler final : public MessageHandler, public Net::AuctionHandler void bid(const int auctionId, const int money) const override final; + + void search(const AuctionSearchType::Type type, + const int auctionId, + const std::string &text, + const int page) const override final; }; } // namespace TmwAthena -- cgit v1.2.3-60-g2f50