summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-09-09 22:15:54 +0300
committerAndrei Karas <akaras@inbox.ru>2015-09-09 22:15:54 +0300
commit09b99b7109475d341250971ae11941cbc46bcbca (patch)
treed9e9f681452ea21b50b4f8de66116023f83c8bf1 /src
parentba1f86da74b30f7a81f6b1293eff18ea19855aa6 (diff)
downloadevol-hercules-09b99b7109475d341250971ae11941cbc46bcbca.tar.gz
evol-hercules-09b99b7109475d341250971ae11941cbc46bcbca.tar.bz2
evol-hercules-09b99b7109475d341250971ae11941cbc46bcbca.tar.xz
evol-hercules-09b99b7109475d341250971ae11941cbc46bcbca.zip
Change server version to 8. Send packet version to client.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am9
-rw-r--r--src/ecommon/serverversion.h11
-rw-r--r--src/elogin/send.c7
3 files changed, 22 insertions, 5 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index f17f16a..97cda9b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -8,7 +8,8 @@ CHAR_SRC = echar/char.c \
ecommon/config.c \
ecommon/config.h \
ecommon/init.c \
- ecommon/init.h
+ ecommon/init.h \
+ ecommon/serverversion.h
LOGIN_SRC = elogin/config.c \
elogin/config.h \
@@ -26,7 +27,8 @@ LOGIN_SRC = elogin/config.c \
ecommon/config.c \
ecommon/config.h \
ecommon/init.c \
- ecommon/init.h
+ ecommon/init.h \
+ ecommon/serverversion.h
MAP_SRC = emap/atcommand.c \
emap/atcommand.h \
@@ -81,7 +83,8 @@ MAP_SRC = emap/atcommand.c \
ecommon/config.c \
ecommon/config.h \
ecommon/init.c \
- ecommon/init.h
+ ecommon/init.h \
+ ecommon/serverversion.h
# need remove -Wno-unused
diff --git a/src/ecommon/serverversion.h b/src/ecommon/serverversion.h
new file mode 100644
index 0000000..f516515
--- /dev/null
+++ b/src/ecommon/serverversion.h
@@ -0,0 +1,11 @@
+// Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// Copyright (c) 2014 Evol developers
+
+#ifndef EVOL_COMMON_SERVERVERSION
+#define EVOL_COMMON_SERVERVERSION
+
+// must be same with version from server build
+
+const int serverPacketVersion = 20150000;
+
+#endif // EVOL_COMMON_SERVERVERSION
diff --git a/src/elogin/send.c b/src/elogin/send.c
index 021d40f..d19dc6b 100644
--- a/src/elogin/send.c
+++ b/src/elogin/send.c
@@ -14,6 +14,7 @@
#include "common/strlib.h"
#include "login/login.h"
+#include "ecommon/serverversion.h"
#include "elogin/config.h"
#include "elogin/send.h"
@@ -21,9 +22,11 @@ void send_server_version(int fd)
{
WFIFOHEAD(fd, 4 + 8);
WFIFOW(fd, 0) = 0x7531;
- WFIFOW(fd, 2) = 4 + 8;
+ WFIFOW(fd, 2) = 16;
WFIFOL(fd, 4) = 0; // unused
- WFIFOL(fd, 8) = 7; // server version
+ WFIFOL(fd, 8) = 8; // plugin version
+ WFIFOL(fd, 12) = serverPacketVersion; // server packet version
+
WFIFOSET(fd, WFIFOW(fd,2));
}