diff options
author | Haru <haru@dotalux.com> | 2018-11-13 16:44:23 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2018-11-13 16:44:23 +0100 |
commit | 612fa0db4f0310abde19c946a0c6d4291139a1f5 (patch) | |
tree | 95e477d06e41a8a7ea1ea64f8c70fd7cb06e6420 /src/char/char.c | |
parent | d2e2173c6fb4804a90aeacf43560571d8f7ec645 (diff) | |
download | hercules-612fa0db4f0310abde19c946a0c6d4291139a1f5.tar.gz hercules-612fa0db4f0310abde19c946a0c6d4291139a1f5.tar.bz2 hercules-612fa0db4f0310abde19c946a0c6d4291139a1f5.tar.xz hercules-612fa0db4f0310abde19c946a0c6d4291139a1f5.zip |
Add the available information to the charlog when selecting a character
All the necessary information was already available (the full character
data is loaded by `char_parse_char_select()`), but it wasn't used by the
charlog insert query.
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/char/char.c')
-rw-r--r-- | src/char/char.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/char/char.c b/src/char/char.c index 29d7c21e1..8c3618887 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -4577,8 +4577,19 @@ static void char_parse_char_select(int fd, struct char_session_data *sd, uint32 // FIXME: Why are we re-escaping the name if it was already escaped in rename/make_new_char? [Panikon] SQL->EscapeStringLen(inter->sql_handle, esc_name, char_dat.name, strnlen(char_dat.name, NAME_LENGTH)); if (SQL_ERROR == SQL->Query(inter->sql_handle, - "INSERT INTO `%s`(`time`, `account_id`, `char_id`, `char_num`, `name`) VALUES (NOW(), '%d', '%d', '%d', '%s')", - charlog_db, sd->account_id, cd->char_id, slot, esc_name)) + "INSERT INTO `%s`(" + " `time`, `char_msg`, `account_id`, `char_id`, `char_num`, `class`, `name`," + " `str`, `agi`, `vit`, `int`, `dex`, `luk`," + " `hair`, `hair_color`" + ") VALUES (" + " NOW(), 'char select', '%d', '%d', '%d', '%d', '%s'," + " '%d', '%d', '%d', '%d', '%d', '%d'," + " '%d', '%d')", + charlog_db, + sd->account_id, cd->char_id, slot, char_dat.class, esc_name, + char_dat.str, char_dat.agi, char_dat.vit, char_dat.int_, char_dat.dex, char_dat.luk, + char_dat.hair, char_dat.hair_color + )) Sql_ShowDebug(inter->sql_handle); } ShowInfo("Selected char: (Account %d: %d - %s)\n", sd->account_id, slot, char_dat.name); |