From 0dbd25bacb312932e343f154001531b6be84a6ac Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 12 Sep 2016 23:44:47 +0300 Subject: Fix version for packet CMSG_SEARCHSTORE_CLOSE. --- src/net/eathena/packetsout.inc | 3 ++- src/net/eathena/searchstorehandler.cpp | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/net/eathena/packetsout.inc b/src/net/eathena/packetsout.inc index f3e5eb006..edf80c934 100644 --- a/src/net/eathena/packetsout.inc +++ b/src/net/eathena/packetsout.inc @@ -240,7 +240,6 @@ packet(CMSG_VENDING_BUY, 0x0134, -1, clif->pPurchaseReq); packet(CMSG_VENDING_BUY2, 0x0801, -1, clif->pPurchaseReq2); packet(CMSG_VENDING_CREATE_SHOP, 0x01b2, -1, clif->pOpenVending); -packet(CMSG_SEARCHSTORE_CLOSE, 0x083b, 2, clif->pCloseSearchStoreInfo); packet(CMSG_MERGE_ITEM_ACK, 0x096e, -1, clif->ackmergeitems); packet(CMSG_MERGE_ITEM_CANCEL, 0x0974, 2, clif->cancelmergeitem); @@ -262,6 +261,7 @@ packet(CMSG_BUYINGSTORE_CLOSE, 0x0000, 0, nullptr); packet(CMSG_BUYINGSTORE_CREATE, 0x0000, 0, nullptr); packet(CMSG_BUYINGSTORE_SELL, 0x0000, 0, nullptr); packet(CMSG_SEARCHSTORE_SEARCH, 0x0000, 0, nullptr); +packet(CMSG_SEARCHSTORE_CLOSE, 0x0000, 0, nullptr); packet(CMSG_HOMUNCULUS_MENU, 0x0000, 0, nullptr); packet(CMSG_SEARCHSTORE_CLICK, 0x0000, 0, nullptr); packet(CMSG_BUYINGSTORE_OPEN, 0x0000, 0, nullptr); @@ -540,6 +540,7 @@ if (packetVersion >= 20100608) { packet(CMSG_SEARCHSTORE_CLICK, 0x083c, 12, clif->pSearchStoreInfoListItemClick); packet(CMSG_SEARCHSTORE_NEXT_PAGE, 0x0838, 2, clif->pSearchStoreInfoNextPage); + packet(CMSG_SEARCHSTORE_CLOSE, 0x083b, 2, clif->pCloseSearchStoreInfo); } // 20101124 diff --git a/src/net/eathena/searchstorehandler.cpp b/src/net/eathena/searchstorehandler.cpp index 93e199286..513e9010e 100644 --- a/src/net/eathena/searchstorehandler.cpp +++ b/src/net/eathena/searchstorehandler.cpp @@ -26,6 +26,7 @@ #include "debug.h" extern Net::SearchStoreHandler *searchStoreHandler; +extern int packetVersion; namespace EAthena { @@ -40,6 +41,9 @@ void SearchStoreHandler::search(const StoreSearchTypeT type, const int maxPrice, const int itemId) const { + if (packetVersion < 20100601) + return; + createOutPacket(CMSG_SEARCHSTORE_SEARCH); outMsg.writeInt16(23, "len"); outMsg.writeInt8(CAST_U8(type), "search type"); @@ -52,11 +56,15 @@ void SearchStoreHandler::search(const StoreSearchTypeT type, void SearchStoreHandler::nextPage() const { + if (packetVersion < 20100608) + return; createOutPacket(CMSG_SEARCHSTORE_NEXT_PAGE); } void SearchStoreHandler::close() const { + if (packetVersion < 20100608) + return; createOutPacket(CMSG_SEARCHSTORE_CLOSE); } @@ -64,6 +72,8 @@ void SearchStoreHandler::select(const int accountId, const int storeId, const int itemId) const { + if (packetVersion < 20100608) + return; createOutPacket(CMSG_SEARCHSTORE_CLICK); outMsg.writeInt32(accountId, "account id"); outMsg.writeInt32(storeId, "store id"); -- cgit v1.2.3-70-g09d2