summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-02-09 21:28:08 +0300
committerAndrei Karas <akaras@inbox.ru>2015-02-09 21:28:08 +0300
commit76bbb31b1d9b1b8c22614ac91e765519194257d8 (patch)
tree2eccf36c757bb024efbcad754313e227742902cb /src
parent020e34363763d9cd0d691ae3b3da1ead52defa4e (diff)
downloadplus-76bbb31b1d9b1b8c22614ac91e765519194257d8.tar.gz
plus-76bbb31b1d9b1b8c22614ac91e765519194257d8.tar.bz2
plus-76bbb31b1d9b1b8c22614ac91e765519194257d8.tar.xz
plus-76bbb31b1d9b1b8c22614ac91e765519194257d8.zip
eathena: add packet CMSG_SEARCHSTORE_CLICK 0x0835.
Diffstat (limited to 'src')
-rw-r--r--src/net/eathena/protocol.h1
-rw-r--r--src/net/eathena/searchstorehandler.cpp10
-rw-r--r--src/net/eathena/searchstorehandler.h4
-rw-r--r--src/net/searchstorehandler.h4
-rw-r--r--src/net/tmwa/searchstorehandler.cpp6
-rw-r--r--src/net/tmwa/searchstorehandler.h4
6 files changed, 29 insertions, 0 deletions
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index 1128172a0..1d34f158a 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -568,5 +568,6 @@
#define CMSG_SEARCHSTORE_SEARCH 0x0819
#define CMSG_SEARCHSTORE_NEXT_PAGE 0x0940
#define CMSG_SEARCHSTORE_CLOSE 0x083b
+#define CMSG_SEARCHSTORE_CLICK 0x0835
#endif // NET_EATHENA_PROTOCOL_H
diff --git a/src/net/eathena/searchstorehandler.cpp b/src/net/eathena/searchstorehandler.cpp
index fdea20615..a90a1d299 100644
--- a/src/net/eathena/searchstorehandler.cpp
+++ b/src/net/eathena/searchstorehandler.cpp
@@ -94,6 +94,16 @@ void SearchStoreHandler::close() const
createOutPacket(CMSG_SEARCHSTORE_CLOSE);
}
+void SearchStoreHandler::select(const int accountId,
+ const int storeId,
+ const int itemId) const
+{
+ createOutPacket(CMSG_SEARCHSTORE_CLICK);
+ outMsg.writeInt32(accountId, "account id");
+ outMsg.writeInt32(storeId, "store id");
+ outMsg.writeInt16(itemId, "item id");
+}
+
void SearchStoreHandler::processSearchAck(Net::MessageIn &msg)
{
const int count = (msg.readInt16("len") - 7) / 106;
diff --git a/src/net/eathena/searchstorehandler.h b/src/net/eathena/searchstorehandler.h
index 2b2f5af08..7a6b82024 100644
--- a/src/net/eathena/searchstorehandler.h
+++ b/src/net/eathena/searchstorehandler.h
@@ -46,6 +46,10 @@ class SearchStoreHandler final : public MessageHandler,
void close() const override final;
+ void select(const int accountId,
+ const int storeId,
+ const int itemId) const override final;
+
protected:
static void processSearchAck(Net::MessageIn &msg);
diff --git a/src/net/searchstorehandler.h b/src/net/searchstorehandler.h
index 8ea7660d9..3f65730fd 100644
--- a/src/net/searchstorehandler.h
+++ b/src/net/searchstorehandler.h
@@ -44,6 +44,10 @@ class SearchStoreHandler notfinal
virtual void nextPage() const = 0;
virtual void close() const = 0;
+
+ virtual void select(const int accountId,
+ const int storeId,
+ const int itemId) const = 0;
};
} // namespace Net
diff --git a/src/net/tmwa/searchstorehandler.cpp b/src/net/tmwa/searchstorehandler.cpp
index 3cd3798a5..b4c304573 100644
--- a/src/net/tmwa/searchstorehandler.cpp
+++ b/src/net/tmwa/searchstorehandler.cpp
@@ -62,4 +62,10 @@ void SearchStoreHandler::close() const
{
}
+void SearchStoreHandler::select(const int accountId A_UNUSED,
+ const int storeId A_UNUSED,
+ const int itemId A_UNUSED) const
+{
+}
+
} // namespace TmwAthena
diff --git a/src/net/tmwa/searchstorehandler.h b/src/net/tmwa/searchstorehandler.h
index fc7946a86..4f2f9a6de 100644
--- a/src/net/tmwa/searchstorehandler.h
+++ b/src/net/tmwa/searchstorehandler.h
@@ -45,6 +45,10 @@ class SearchStoreHandler final : public MessageHandler,
void nextPage() const override final;
void close() const override final;
+
+ void select(const int accountId,
+ const int storeId,
+ const int itemId) const override final;
};
} // namespace TmwAthena