summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-11-14 13:13:06 +0300
committerAndrei Karas <akaras@inbox.ru>2014-11-14 13:13:06 +0300
commita64d627afaf3c2211de164cc25325323092db3cc (patch)
tree58f4e8d2206b825c42539307cded54b2f9ac6488 /src/map/pc.c
parentfd3ff79b70accad28179fdc23049daec0bec9997 (diff)
downloadevol-hercules-a64d627afaf3c2211de164cc25325323092db3cc.tar.gz
evol-hercules-a64d627afaf3c2211de164cc25325323092db3cc.tar.bz2
evol-hercules-a64d627afaf3c2211de164cc25325323092db3cc.tar.xz
evol-hercules-a64d627afaf3c2211de164cc25325323092db3cc.zip
Add internal variable with client version.
New variable: ClientVersion
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
new file mode 100644
index 0000000..d1ad03c
--- /dev/null
+++ b/src/map/pc.c
@@ -0,0 +1,29 @@
+// Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// Copyright (c) 2014 Evol developers
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "../../../common/HPMi.h"
+#include "../../../common/malloc.h"
+#include "../../../common/mmo.h"
+#include "../../../common/socket.h"
+#include "../../../common/strlib.h"
+
+#include "map/pc.h"
+#include "map/session.h"
+#include "map/sessionext.h"
+
+int epc_readparam_pre(struct map_session_data* sd, int *type)
+{
+ if (*type == Const_ClientVersion)
+ {
+ hookStop();
+ struct SessionExt *data = session_get_bysd(sd);
+ if (!data)
+ return 0;
+ return data->clientVersion;
+ }
+ return 0;
+}