summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-11-14 22:13:01 +0300
committerAndrei Karas <akaras@inbox.ru>2014-11-14 22:13:01 +0300
commitc5bbc349b176c045dab7e9ddea12cb18eee7a176 (patch)
tree8b2a7e4f0fa2640cfae1971511cf263604de1724 /src/map/pc.c
parenta9d772ec217d54879183685b92b4790ba8c5185d (diff)
downloadevol-hercules-c5bbc349b176c045dab7e9ddea12cb18eee7a176.tar.gz
evol-hercules-c5bbc349b176c045dab7e9ddea12cb18eee7a176.tar.bz2
evol-hercules-c5bbc349b176c045dab7e9ddea12cb18eee7a176.tar.xz
evol-hercules-c5bbc349b176c045dab7e9ddea12cb18eee7a176.zip
store character language in script variables.
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index d1ad03c..b07f187 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -15,6 +15,8 @@
#include "map/session.h"
#include "map/sessionext.h"
+int langScriptId;
+
int epc_readparam_pre(struct map_session_data* sd, int *type)
{
if (*type == Const_ClientVersion)
@@ -27,3 +29,17 @@ int epc_readparam_pre(struct map_session_data* sd, int *type)
}
return 0;
}
+
+int epc_setregistry(struct map_session_data *sd, int64 *reg, int *val)
+{
+ if (*reg == langScriptId)
+ {
+ struct SessionExt *data = session_get_bysd(sd);
+ if (!data)
+ return 0;
+
+ data->language = *val;
+ }
+
+ return 0;
+}