summaryrefslogtreecommitdiff
path: root/src/net/eathena/searchstorerecv.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-07-26 03:02:37 +0300
committerAndrei Karas <akaras@inbox.ru>2018-07-26 22:01:35 +0300
commitde90520de303659fe639794544c2e19d462b3907 (patch)
tree36b306a26e2c9dd422aede36f2f9ca3158ffbae2 /src/net/eathena/searchstorerecv.cpp
parent45527f8597dfac68e914a798184282faeb1493f2 (diff)
downloadplus-de90520de303659fe639794544c2e19d462b3907.tar.gz
plus-de90520de303659fe639794544c2e19d462b3907.tar.bz2
plus-de90520de303659fe639794544c2e19d462b3907.tar.xz
plus-de90520de303659fe639794544c2e19d462b3907.zip
Add support for changed item id size in packets.
From some packet version hercules support item id fields as int32.
Diffstat (limited to 'src/net/eathena/searchstorerecv.cpp')
-rw-r--r--src/net/eathena/searchstorerecv.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/net/eathena/searchstorerecv.cpp b/src/net/eathena/searchstorerecv.cpp
index 22fdec26b..b0dacb263 100644
--- a/src/net/eathena/searchstorerecv.cpp
+++ b/src/net/eathena/searchstorerecv.cpp
@@ -31,13 +31,15 @@
#include "debug.h"
+extern int itemIdLen;
+
namespace EAthena
{
void SearchStoreRecv::processSearchAck(Net::MessageIn &msg)
{
UNIMPLEMENTEDPACKET;
- const int count = (msg.readInt16("len") - 7) / 106;
+ const int count = (msg.readInt16("len") - 7) / (104 + itemIdLen);
msg.readUInt8("is first page");
msg.readUInt8("is next page");
msg.readUInt8("remain uses");
@@ -46,13 +48,13 @@ void SearchStoreRecv::processSearchAck(Net::MessageIn &msg)
msg.readInt32("store id");
msg.readInt32("aoount id");
msg.readString(80, "store name");
- msg.readInt16("item id");
+ msg.readItemId("item id");
msg.readUInt8("item type");
msg.readInt32("price");
msg.readInt16("amount");
msg.readUInt8("refine");
for (int d = 0; d < maxCards; d++)
- msg.readUInt16("card");
+ msg.readItemId("card");
if (msg.getVersion() >= 20150226)
{
for (int d = 0; d < 5; d ++)