summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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));
}