summaryrefslogtreecommitdiff
path: root/src/net/eathena/searchstorehandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-02-09 15:56:35 +0300
committerAndrei Karas <akaras@inbox.ru>2015-02-09 15:56:35 +0300
commit4ae0cd0b3838cc3354702af2ca6d669a91afdd8d (patch)
treedbe404305af741b10114b2b9fd0a618a53dbed90 /src/net/eathena/searchstorehandler.cpp
parent49540a3cac67413e8639ba371782e3635ece74df (diff)
downloadplus-4ae0cd0b3838cc3354702af2ca6d669a91afdd8d.tar.gz
plus-4ae0cd0b3838cc3354702af2ca6d669a91afdd8d.tar.bz2
plus-4ae0cd0b3838cc3354702af2ca6d669a91afdd8d.tar.xz
plus-4ae0cd0b3838cc3354702af2ca6d669a91afdd8d.zip
eathena: add packet CMSG_SEARCHSTORE_SEARCH 0x0819.
Diffstat (limited to 'src/net/eathena/searchstorehandler.cpp')
-rw-r--r--src/net/eathena/searchstorehandler.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/net/eathena/searchstorehandler.cpp b/src/net/eathena/searchstorehandler.cpp
index 38baadd6d..4ddad3148 100644
--- a/src/net/eathena/searchstorehandler.cpp
+++ b/src/net/eathena/searchstorehandler.cpp
@@ -20,6 +20,9 @@
#include "net/eathena/searchstorehandler.h"
+#include "net/eathena/messageout.h"
+#include "net/eathena/protocol.h"
+
#include "debug.h"
extern Net::SearchStoreHandler *searchStoreHandler;
@@ -47,4 +50,19 @@ void SearchStoreHandler::handleMessage(Net::MessageIn &msg)
}
}
+void SearchStoreHandler::search(const StoreSearchType::Type type,
+ const int minPrice,
+ const int maxPrice,
+ const int itemId) const
+{
+ createOutPacket(CMSG_SEARCHSTORE_SEARCH);
+ outMsg.writeInt16(23, "len");
+ outMsg.writeInt8(static_cast<uint8_t>(type), "search type");
+ outMsg.writeInt32(maxPrice, "max price");
+ outMsg.writeInt32(minPrice, "min price");
+ outMsg.writeInt32(1, "items count");
+ outMsg.writeInt32(0, "cards count");
+ outMsg.writeInt16(itemId, "item id");
+}
+
} // namespace EAthena