summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2018-08-25 01:17:45 +0200
committerGitHub <noreply@github.com>2018-08-25 01:17:45 +0200
commit234189f34e5f055c82654b8cd35330822e8aa4d7 (patch)
tree8b93cfdd5073009d60b650d1f58c3459f02bfe7e /src/common
parentc15704ae7a9c06589cb7cf509e77cd539eb6fc8c (diff)
parent552424e9e74b446aded6dfd732a9c7de15371290 (diff)
downloadhercules-234189f34e5f055c82654b8cd35330822e8aa4d7.tar.gz
hercules-234189f34e5f055c82654b8cd35330822e8aa4d7.tar.bz2
hercules-234189f34e5f055c82654b8cd35330822e8aa4d7.tar.xz
hercules-234189f34e5f055c82654b8cd35330822e8aa4d7.zip
Merge pull request #2185 from 4144/clienttypes
Add support for sak/ad client messages and show packet version and client type at server startup
Diffstat (limited to 'src/common')
-rw-r--r--src/common/console.c2
-rw-r--r--src/common/mmo.h31
2 files changed, 32 insertions, 1 deletions
diff --git a/src/common/console.c b/src/common/console.c
index 55a9815f5..5923775b7 100644
--- a/src/common/console.c
+++ b/src/common/console.c
@@ -25,6 +25,7 @@
#include "common/cbasetypes.h"
#include "common/core.h"
+#include "common/mmo.h"
#include "common/nullpo.h"
#include "common/showmsg.h"
#include "common/sysinfo.h"
@@ -93,6 +94,7 @@ static void display_title(void)
ShowInfo("Compiled with %s\n", sysinfo->compiler());
ShowInfo("Compile Flags: %s\n", sysinfo->cflags());
ShowInfo("Timer Function Type: %s\n", sysinfo->time());
+ ShowInfo("Packet version: %d " PACKETTYPE "\n", PACKETVER);
}
/**
diff --git a/src/common/mmo.h b/src/common/mmo.h
index 7e0d915eb..d6946cecc 100644
--- a/src/common/mmo.h
+++ b/src/common/mmo.h
@@ -81,21 +81,50 @@
#undef ENABLE_PACKETVER_ZERO
#endif // DISABLE_PACKETVER_ZERO
-#if !defined(PACKETVER_RE) && !defined(PACKETVER_ZERO)
+//Uncomment the following line if your client is sakexe
+//#define ENABLE_PACKETVER_SAK
+#ifdef ENABLE_PACKETVER_SAK
+ #define PACKETVER_SAK
+ #undef ENABLE_PACKETVER_SAK
+#endif // DISABLE_PACKETVER_SAK
+
+//Uncomment the following line if your client is ragexeAD
+//#define ENABLE_PACKETVER_AD
+#ifdef ENABLE_PACKETVER_AD
+ #define PACKETVER_AD
+ #undef ENABLE_PACKETVER_AD
+#endif // DISABLE_PACKETVER_AD
+
+#if !defined(PACKETVER_RE) && !defined(PACKETVER_ZERO) && !defined(PACKETVER_SAK) && !defined(PACKETVER_AD)
#define PACKETVER_MAIN_NUM PACKETVER
+ #define PACKETTYPE "main"
#else
#define PACKETVER_MAIN_NUM 0
#endif
#ifdef PACKETVER_RE
#define PACKETVER_RE_NUM PACKETVER
+ #define PACKETTYPE "RE"
#else
#define PACKETVER_RE_NUM 0
#endif
#ifdef PACKETVER_ZERO
#define PACKETVER_ZERO_NUM PACKETVER
+ #define PACKETTYPE "zero"
#else
#define PACKETVER_ZERO_NUM 0
#endif
+#ifdef PACKETVER_SAK
+ #define PACKETVER_SAK_NUM PACKETVER
+ #define PACKETTYPE "sak"
+#else
+ #define PACKETVER_SAK_NUM 0
+#endif
+#ifdef PACKETVER_AD
+ #define PACKETVER_AD_NUM PACKETVER
+ #define PACKETTYPE "ad"
+#else
+ #define PACKETVER_AD_NUM 0
+#endif
// Client support for experimental RagexeRE UI present in 2012-04-10 and 2012-04-18
#if defined(PACKETVER_RE) && ( PACKETVER == 20120410 || PACKETVER == 20120418 )