summaryrefslogtreecommitdiff
path: root/src/net/eathena/updateprotocol.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/updateprotocol.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/updateprotocol.cpp')
-rw-r--r--src/net/eathena/updateprotocol.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/net/eathena/updateprotocol.cpp b/src/net/eathena/updateprotocol.cpp
index 15050d099..21f6c001a 100644
--- a/src/net/eathena/updateprotocol.cpp
+++ b/src/net/eathena/updateprotocol.cpp
@@ -36,12 +36,14 @@ extern int evolPacketOffset;
extern bool packets_main;
extern bool packets_re;
extern bool packets_zero;
+extern int itemIdLen;
namespace EAthena
{
void updateProtocol()
{
+ itemIdLen = 2;
logger->log("packet version: %d", packetVersion);
if (packets_main == true)
{
@@ -64,6 +66,10 @@ void updateProtocol()
packetVersionMain = 0;
packetVersionRe = 0;
}
+ if (packetVersionRe >= 20180704)
+ {
+ itemIdLen = 4;
+ }
#define PACKETS_UPDATE
#include "net/protocoloutupdate.h"
#include "net/eathena/packetsout.inc"