diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-02-20 22:05:51 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-02-20 22:05:51 +0300 |
commit | c74d1843675c20f958fb71d2bdf9fd5c79fe835e (patch) | |
tree | de8704515c3f84a58d6d72f074bb4ff70441f945 /src/echar/char.c | |
parent | 97d6d72723f0ff3ba89025261cf1174615fdc80d (diff) | |
download | evol-hercules-c74d1843675c20f958fb71d2bdf9fd5c79fe835e.tar.gz evol-hercules-c74d1843675c20f958fb71d2bdf9fd5c79fe835e.tar.bz2 evol-hercules-c74d1843675c20f958fb71d2bdf9fd5c79fe835e.tar.xz evol-hercules-c74d1843675c20f958fb71d2bdf9fd5c79fe835e.zip |
Force save char gender to db after char creation.
Diffstat (limited to 'src/echar/char.c')
-rw-r--r-- | src/echar/char.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/echar/char.c b/src/echar/char.c index fb5ebdc..f8a003e 100644 --- a/src/echar/char.c +++ b/src/echar/char.c @@ -77,6 +77,16 @@ void echar_parse_char_create_new_char(int *fdPtr, struct char_session_data* sd) char_dat.clothes_color = look; chr->mmo_char_tosql(result, &char_dat); + char cSex = 'U'; + if (sex == SEX_MALE) + cSex = 'M'; + else if (sex == SEX_FEMALE) + cSex = 'F'; + + if (SQL_ERROR == SQL->Query(inter->sql_handle, "UPDATE `%s` SET `sex` = '%c' WHERE `char_id` = '%d'", "char", cSex, char_dat.char_id)) + { + Sql_ShowDebug(inter->sql_handle); + } } chr->creation_ok(fd, &char_dat); |