summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql-files/main.sql2
-rw-r--r--src/char/char.c17
2 files changed, 15 insertions, 4 deletions
diff --git a/sql-files/main.sql b/sql-files/main.sql
index d918d4a35..37bfaf0ec 100644
--- a/sql-files/main.sql
+++ b/sql-files/main.sql
@@ -293,7 +293,7 @@ CREATE TABLE IF NOT EXISTS `charlog` (
`str` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`agi` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`vit` INT(11) UNSIGNED NOT NULL DEFAULT '0',
- `INT` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `int` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`dex` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`luk` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`hair` TINYINT(4) NOT NULL DEFAULT '0',
diff --git a/src/char/char.c b/src/char/char.c
index 18269aeaf..29d7c21e1 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -1548,9 +1548,20 @@ static int char_rename_char_sql(struct char_session_data *sd, int char_id)
// log change
if (chr->enable_logs) {
if (SQL_ERROR == SQL->Query(inter->sql_handle,
- "INSERT INTO `%s` (`time`, `char_msg`,`account_id`,`char_id`,`char_num`,`name`,`str`,`agi`,`vit`,`int`,`dex`,`luk`,`hair`,`hair_color`)"
- "VALUES (NOW(), '%s', '%d', '%d', '%d', '%s', '0', '0', '0', '0', '0', '0', '0', '0')",
- charlog_db, "change char name", sd->account_id, char_dat.char_id, char_dat.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(), 'change char name', '%d', '%d', '%d', '%d', '%s',"
+ " '%d', '%d', '%d', '%d', '%d', '%d',"
+ " '%d', '%d'"
+ ")",
+ charlog_db,
+ sd->account_id, char_dat.char_id, char_dat.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);
}