From c5bbc349b176c045dab7e9ddea12cb18eee7a176 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 14 Nov 2014 22:13:01 +0300 Subject: store character language in script variables. --- src/map/pc.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/map/pc.c') 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; +} -- cgit v1.2.3-70-g09d2