summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-04-06 22:29:22 +0300
committerAndrei Karas <akaras@inbox.ru>2018-04-06 22:29:22 +0300
commit8ad5521d3bbb57040c746de4af2c82d0a8477936 (patch)
treeaa3780d612cd6fedfb9fc93f1d6b46ce187fe4eb /src
parente34a496ae3b6fbb98115b9fe524cd202ddc8f795 (diff)
downloadplus-8ad5521d3bbb57040c746de4af2c82d0a8477936.tar.gz
plus-8ad5521d3bbb57040c746de4af2c82d0a8477936.tar.bz2
plus-8ad5521d3bbb57040c746de4af2c82d0a8477936.tar.xz
plus-8ad5521d3bbb57040c746de4af2c82d0a8477936.zip
Add variables with packet versions for each packet types (main, re, zero).
Diffstat (limited to 'src')
-rw-r--r--src/net/eathena/updateprotocol.cpp25
-rw-r--r--src/progs/dyecmd/client.cpp3
-rw-r--r--src/progs/manaplus/client.cpp6
3 files changed, 34 insertions, 0 deletions
diff --git a/src/net/eathena/updateprotocol.cpp b/src/net/eathena/updateprotocol.cpp
index b1848f576..15050d099 100644
--- a/src/net/eathena/updateprotocol.cpp
+++ b/src/net/eathena/updateprotocol.cpp
@@ -28,9 +28,13 @@
#include "debug.h"
extern int packetVersion;
+extern int packetVersionMain;
+extern int packetVersionRe;
+extern int packetVersionZero;
extern int serverVersion;
extern int evolPacketOffset;
extern bool packets_main;
+extern bool packets_re;
extern bool packets_zero;
namespace EAthena
@@ -39,6 +43,27 @@ namespace EAthena
void updateProtocol()
{
logger->log("packet version: %d", packetVersion);
+ if (packets_main == true)
+ {
+ logger->log("packets version type: main");
+ packetVersionMain = packetVersion;
+ packetVersionRe = 0;
+ packetVersionZero = 0;
+ }
+ else if (packets_re == true)
+ {
+ logger->log("packets version type: re");
+ packetVersionRe = packetVersion;
+ packetVersionMain = 0;
+ packetVersionZero = 0;
+ }
+ else if (packets_zero == true)
+ {
+ logger->log("packets version type: zero");
+ packetVersionZero = packetVersion;
+ packetVersionMain = 0;
+ packetVersionRe = 0;
+ }
#define PACKETS_UPDATE
#include "net/protocoloutupdate.h"
#include "net/eathena/packetsout.inc"
diff --git a/src/progs/dyecmd/client.cpp b/src/progs/dyecmd/client.cpp
index 6d1ea8105..385a50919 100644
--- a/src/progs/dyecmd/client.cpp
+++ b/src/progs/dyecmd/client.cpp
@@ -122,6 +122,9 @@ volatile bool runCounters;
bool isSafeMode = false;
int serverVersion = 0;
int packetVersion = 0;
+int packetVersionMain = 0;
+int packetVersionRe = 0;
+int packetVersionZero = 0;
int packetsType = 0;
bool packets_main = true;
bool packets_re = false;
diff --git a/src/progs/manaplus/client.cpp b/src/progs/manaplus/client.cpp
index f2c381896..1ee563bac 100644
--- a/src/progs/manaplus/client.cpp
+++ b/src/progs/manaplus/client.cpp
@@ -191,6 +191,9 @@ volatile bool runCounters;
bool isSafeMode = false;
int serverVersion = 0;
int packetVersion = 0;
+int packetVersionMain = 0;
+int packetVersionRe = 0;
+int packetVersionZero = 0;
int packetsType = 0;
bool packets_main = true;
bool packets_re = false;
@@ -2015,6 +2018,9 @@ void Client::unloadData()
localClan.clear();
serverVersion = 0;
packetVersion = 0;
+ packetVersionMain = 0;
+ packetVersionRe = 0;
+ packetVersionZero = 0;
tmwServerVersion = 0;
evolPacketOffset = 0;
}