diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-08-13 22:53:12 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-08-13 22:53:12 +0300 |
commit | f8b3342f690816022d26038389431002e9cf3648 (patch) | |
tree | 1553caed418b7fc6496b196eb70894e460bec0e5 /src/echar/char.c | |
parent | a38eb2a333972481d99c5fe0c152ba6d59fba839 (diff) | |
download | plugin-f8b3342f690816022d26038389431002e9cf3648.tar.gz plugin-f8b3342f690816022d26038389431002e9cf3648.tar.bz2 plugin-f8b3342f690816022d26038389431002e9cf3648.tar.xz plugin-f8b3342f690816022d26038389431002e9cf3648.zip |
Fix and restore client version in login and char server.
Diffstat (limited to 'src/echar/char.c')
-rw-r--r-- | src/echar/char.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/echar/char.c b/src/echar/char.c index 6a01e8f..409da75 100644 --- a/src/echar/char.c +++ b/src/echar/char.c @@ -88,6 +88,20 @@ void echar_parse_char_create_new_char(int *fdPtr, struct char_session_data* sd) hookStop(); } +static int tmpVersion = 0; + +void echar_parse_char_connect_pre(int *fdPtr, struct char_session_data *sd, uint32 *ipl) +{ + tmpVersion = RFIFOW(*fdPtr, 14); +} + +void echar_parse_char_connect_post(int *fdPtr, struct char_session_data *sd, uint32 *ipl) +{ + sd = (struct char_session_data*)session[*fdPtr]->session_data; + if (sd) + sd->version = tmpVersion; +} + void echar_creation_failed(int *fdPtr, int *result) { const int fd = *fdPtr; |