From 37d7bd3163ad58391df36363b6f0135c638fbeb8 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 9 Feb 2015 21:42:03 +0300 Subject: eathena: add partial support for packet SMSG_SEARCHSTORE_CLICK_ACK 0x083d. --- src/net/eathena/packets.h | 2 +- src/net/eathena/protocol.h | 1 + src/net/eathena/searchstorehandler.cpp | 11 +++++++++++ src/net/eathena/searchstorehandler.h | 4 +++- 4 files changed, 16 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h index 2357cdf0a..6bff795cc 100644 --- a/src/net/eathena/packets.h +++ b/src/net/eathena/packets.h @@ -218,7 +218,7 @@ int16_t packet_lengths[] = -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 20, 3, 0, 8, -1, 86, -1, 0, 0, -1, 0, 4, 10, 10, 22, 8, 0, 0, 0, 0, 0, 6, 0, -1, 3, 0, 0, 0, 0, 0, -1, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 5, 0, 0, 0, 26, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 5, 0, 0, 6, 26, 0, // #0x0840 -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index 1d34f158a..c285c5667 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -346,6 +346,7 @@ #define SMSG_SEARCHSTORE_SEARCH_ACK 0x0836 #define SMSG_SEARCHSTORE_SEARCH_FAILED 0x0837 #define SMSG_SEARCHSTORE_OPEN 0x083a +#define SMSG_SEARCHSTORE_CLICK_ACK 0x083d /********************************** * Packets from client to server * diff --git a/src/net/eathena/searchstorehandler.cpp b/src/net/eathena/searchstorehandler.cpp index a90a1d299..ed23b1dda 100644 --- a/src/net/eathena/searchstorehandler.cpp +++ b/src/net/eathena/searchstorehandler.cpp @@ -42,6 +42,7 @@ SearchStoreHandler::SearchStoreHandler() : SMSG_SEARCHSTORE_SEARCH_ACK, SMSG_SEARCHSTORE_SEARCH_FAILED, SMSG_SEARCHSTORE_OPEN, + SMSG_SEARCHSTORE_CLICK_ACK, 0 }; handledMessages = _messages; @@ -64,6 +65,10 @@ void SearchStoreHandler::handleMessage(Net::MessageIn &msg) processSearchOpen(msg); break; + case SMSG_SEARCHSTORE_CLICK_ACK: + processSearchClickAck(msg); + break; + default: break; } @@ -163,4 +168,10 @@ void SearchStoreHandler::processSearchOpen(Net::MessageIn &msg) msg.readUInt8("uses"); } +void SearchStoreHandler::processSearchClickAck(Net::MessageIn &msg) +{ + msg.readInt16("x"); + msg.readInt16("y"); +} + } // namespace EAthena diff --git a/src/net/eathena/searchstorehandler.h b/src/net/eathena/searchstorehandler.h index 7a6b82024..3a449f512 100644 --- a/src/net/eathena/searchstorehandler.h +++ b/src/net/eathena/searchstorehandler.h @@ -55,7 +55,9 @@ class SearchStoreHandler final : public MessageHandler, static void processSearchFailed(Net::MessageIn &msg); - void processSearchOpen(Net::MessageIn &msg); + static void processSearchOpen(Net::MessageIn &msg); + + static void processSearchClickAck(Net::MessageIn &msg); }; } // namespace EAthena -- cgit v1.2.3-70-g09d2