summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-09-12 23:44:47 +0300
committerAndrei Karas <akaras@inbox.ru>2016-09-12 23:44:47 +0300
commit0dbd25bacb312932e343f154001531b6be84a6ac (patch)
treef9698b2eb827fdca9f8bbdc990cf45dbecf961e6
parentf6f6683177abd0f786b34d3d2bd689d615c899e0 (diff)
downloadplus-0dbd25bacb312932e343f154001531b6be84a6ac.tar.gz
plus-0dbd25bacb312932e343f154001531b6be84a6ac.tar.bz2
plus-0dbd25bacb312932e343f154001531b6be84a6ac.tar.xz
plus-0dbd25bacb312932e343f154001531b6be84a6ac.zip
Fix version for packet CMSG_SEARCHSTORE_CLOSE.
-rw-r--r--src/net/eathena/packetsout.inc3
-rw-r--r--src/net/eathena/searchstorehandler.cpp10
2 files changed, 12 insertions, 1 deletions
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");