summaryrefslogtreecommitdiff
path: root/src/char_sql
diff options
context:
space:
mode:
authorzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-08-31 22:56:05 +0000
committerzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-08-31 22:56:05 +0000
commit08c870656aeb76d839a8ad2fd071818b8618f899 (patch)
tree3ac8cc1544cd0a60f00312cdb6c8c21f62f287a8 /src/char_sql
parent409cb0381295716d654fd2ee5021e1011a45ab80 (diff)
downloadhercules-08c870656aeb76d839a8ad2fd071818b8618f899.tar.gz
hercules-08c870656aeb76d839a8ad2fd071818b8618f899.tar.bz2
hercules-08c870656aeb76d839a8ad2fd071818b8618f899.tar.xz
hercules-08c870656aeb76d839a8ad2fd071818b8618f899.zip
- A proper mercenary lifetime calculation.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13165 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char_sql')
-rw-r--r--src/char_sql/int_homun.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/char_sql/int_homun.c b/src/char_sql/int_homun.c
index 17633ef4a..77753f04a 100644
--- a/src/char_sql/int_homun.c
+++ b/src/char_sql/int_homun.c
@@ -303,7 +303,7 @@ bool mapif_mercenary_save(struct s_mercenary* merc)
{ // Create new DB entry
if( SQL_ERROR == Sql_Query(sql_handle,
"INSERT INTO `mercenary` (`char_id`,`class`,`hp`,`sp`,`kill_counter`,`life_time`) VALUES ('%d','%d','%d','%d','%u','%u')",
- merc->char_id, merc->class_, merc->hp, merc->sp, merc->kill_count, merc->remain_life_time) )
+ merc->char_id, merc->class_, merc->hp, merc->sp, merc->kill_count, merc->life_time) )
{
Sql_ShowDebug(sql_handle);
flag = false;
@@ -313,7 +313,7 @@ bool mapif_mercenary_save(struct s_mercenary* merc)
}
else if( SQL_ERROR == Sql_Query(sql_handle,
"UPDATE `mercenary` SET `char_id` = '%d', `class` = '%d', `hp` = '%d', `sp` = '%d', `kill_counter` = '%u', `life_time` = '%u' WHERE `mer_id` = '%d'",
- merc->char_id, merc->class_, merc->hp, merc->sp, merc->kill_count, merc->remain_life_time, merc->mercenary_id) )
+ merc->char_id, merc->class_, merc->hp, merc->sp, merc->kill_count, merc->life_time, merc->mercenary_id) )
{ // Update DB entry
Sql_ShowDebug(sql_handle);
flag = false;
@@ -346,7 +346,7 @@ bool mapif_mercenary_load(int merc_id, int char_id, struct s_mercenary *merc)
Sql_GetData(sql_handle, 1, &data, NULL); merc->hp = atoi(data);
Sql_GetData(sql_handle, 2, &data, NULL); merc->sp = atoi(data);
Sql_GetData(sql_handle, 3, &data, NULL); merc->kill_count = atoi(data);
- Sql_GetData(sql_handle, 4, &data, NULL); merc->remain_life_time = atoi(data);
+ Sql_GetData(sql_handle, 4, &data, NULL); merc->life_time = atoi(data);
Sql_FreeResult(sql_handle);
if( save_log )
ShowInfo("Mercenary loaded (%d - %d).\n", merc->mercenary_id, merc->char_id);