summaryrefslogtreecommitdiff
path: root/src/char/int_mercenary.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/char/int_mercenary.c')
-rw-r--r--src/char/int_mercenary.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/char/int_mercenary.c b/src/char/int_mercenary.c
index 11cc47062..aecb3844a 100644
--- a/src/char/int_mercenary.c
+++ b/src/char/int_mercenary.c
@@ -81,7 +81,7 @@ bool mapif_mercenary_save(struct s_mercenary* merc)
flag = false;
}
else
- merc->mercenary_id = (int)SQL->NumRows(sql_handle);
+ merc->mercenary_id = (int)SQL->LastInsertId(sql_handle);
}
else if( SQL_ERROR == SQL->Query(sql_handle,
"UPDATE `%s` SET `char_id` = '%d', `class` = '%d', `hp` = '%d', `sp` = '%d', `kill_counter` = '%u', `life_time` = '%u' WHERE `mer_id` = '%d'",