summaryrefslogtreecommitdiff
path: root/src/net/eathena/searchstorehandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/eathena/searchstorehandler.cpp')
-rw-r--r--src/net/eathena/searchstorehandler.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/net/eathena/searchstorehandler.cpp b/src/net/eathena/searchstorehandler.cpp
index 4ddad3148..22f892a8a 100644
--- a/src/net/eathena/searchstorehandler.cpp
+++ b/src/net/eathena/searchstorehandler.cpp
@@ -35,6 +35,7 @@ SearchStoreHandler::SearchStoreHandler() :
{
static const uint16_t _messages[] =
{
+ SMSG_SEARCHSTORE_SEARCH_ACK,
0
};
handledMessages = _messages;
@@ -45,6 +46,10 @@ void SearchStoreHandler::handleMessage(Net::MessageIn &msg)
{
switch (msg.getId())
{
+ case SMSG_SEARCHSTORE_SEARCH_ACK:
+ processSearchAck(msg);
+ break;
+
default:
break;
}
@@ -65,4 +70,25 @@ void SearchStoreHandler::search(const StoreSearchType::Type type,
outMsg.writeInt16(itemId, "item id");
}
+void SearchStoreHandler::processSearchAck(Net::MessageIn &msg)
+{
+ const int count = (msg.readInt16("len") - 7) / 106;
+ msg.readUInt8("is first page");
+ msg.readUInt8("is next page");
+ msg.readUInt8("remain uses");
+ for (int f = 0; f < count; f ++)
+ {
+ msg.readInt32("store id");
+ msg.readInt32("aoount id");
+ msg.readString(80, "store name");
+ msg.readInt16("item id");
+ msg.readUInt8("item type");
+ msg.readInt32("price");
+ msg.readInt16("amount");
+ msg.readUInt8("refine");
+ for (int f = 0; f < 4; f++)
+ msg.readInt16("card");
+ }
+}
+
} // namespace EAthena