@@ -93,10 +93,10 @@ bool mapif_homunculus_save(struct s_homunculus* hd)
9393 if ( hd->hom_id == 0 )
9494 {// new homunculus
9595 if ( SQL_ERROR == Sql_Query (sql_handle, " INSERT INTO `%s` "
96- " (`char_id`, `class`,`prev_class`,`name`,`level`,`exp`,`intimacy`,`hunger`, `str`, `agi`, `vit`, `int`, `dex`, `luk`, `hp`,`max_hp`,`sp`,`max_sp`,`skill_point`, `rename_flag`, `vaporize`) "
97- " VALUES ('%d', '%d', '%d', '%s', '%d', '%u', '%u', '%d', '%d', %d, '%d', '%d', '%d', '%d', '%u', '%u', '%u', '%u', '%d', '%d', '%d')" ,
96+ " (`char_id`, `class`,`prev_class`,`name`,`level`,`exp`,`intimacy`,`hunger`, `str`, `agi`, `vit`, `int`, `dex`, `luk`, `hp`,`max_hp`,`sp`,`max_sp`,`skill_point`, `rename_flag`, `vaporize`, `autofeed` ) "
97+ " VALUES ('%d', '%d', '%d', '%s', '%d', '%u', '%u', '%d', '%d', %d, '%d', '%d', '%d', '%d', '%u', '%u', '%u', '%u', '%d', '%d', '%d', '%d' )" ,
9898 schema_config.homunculus_db , hd->char_id , hd->class_ , hd->prev_class , esc_name, hd->level , hd->exp , hd->intimacy , hd->hunger , hd->str , hd->agi , hd->vit , hd->int_ , hd->dex , hd->luk ,
99- hd->hp , hd->max_hp , hd->sp , hd->max_sp , hd->skillpts , hd->rename_flag , hd->vaporize ) )
99+ hd->hp , hd->max_hp , hd->sp , hd->max_sp , hd->skillpts , hd->rename_flag , hd->vaporize , hd-> autofeed ) )
100100 {
101101 Sql_ShowDebug (sql_handle);
102102 flag = false ;
@@ -108,9 +108,9 @@ bool mapif_homunculus_save(struct s_homunculus* hd)
108108 }
109109 else
110110 {
111- if ( SQL_ERROR == Sql_Query (sql_handle, " UPDATE `%s` SET `char_id`='%d', `class`='%d',`prev_class`='%d',`name`='%s',`level`='%d',`exp`='%u',`intimacy`='%u',`hunger`='%d', `str`='%d', `agi`='%d', `vit`='%d', `int`='%d', `dex`='%d', `luk`='%d', `hp`='%u',`max_hp`='%u',`sp`='%u',`max_sp`='%u',`skill_point`='%d', `rename_flag`='%d', `vaporize`='%d' WHERE `homun_id`='%d'" ,
111+ if ( SQL_ERROR == Sql_Query (sql_handle, " UPDATE `%s` SET `char_id`='%d', `class`='%d',`prev_class`='%d',`name`='%s',`level`='%d',`exp`='%u',`intimacy`='%u',`hunger`='%d', `str`='%d', `agi`='%d', `vit`='%d', `int`='%d', `dex`='%d', `luk`='%d', `hp`='%u',`max_hp`='%u',`sp`='%u',`max_sp`='%u',`skill_point`='%d', `rename_flag`='%d', `vaporize`='%d', `autofeed`='%d' WHERE `homun_id`='%d'" ,
112112 schema_config.homunculus_db , hd->char_id , hd->class_ , hd->prev_class , esc_name, hd->level , hd->exp , hd->intimacy , hd->hunger , hd->str , hd->agi , hd->vit , hd->int_ , hd->dex , hd->luk ,
113- hd->hp , hd->max_hp , hd->sp , hd->max_sp , hd->skillpts , hd->rename_flag , hd->vaporize , hd->hom_id ) )
113+ hd->hp , hd->max_hp , hd->sp , hd->max_sp , hd->skillpts , hd->rename_flag , hd->vaporize , hd->autofeed , hd-> hom_id ) )
114114 {
115115 Sql_ShowDebug (sql_handle);
116116 flag = false ;
@@ -155,7 +155,7 @@ bool mapif_homunculus_load(int homun_id, struct s_homunculus* hd)
155155
156156 memset (hd, 0 , sizeof (*hd));
157157
158- if ( SQL_ERROR == Sql_Query (sql_handle, " SELECT `homun_id`,`char_id`,`class`,`prev_class`,`name`,`level`,`exp`,`intimacy`,`hunger`, `str`, `agi`, `vit`, `int`, `dex`, `luk`, `hp`,`max_hp`,`sp`,`max_sp`,`skill_point`,`rename_flag`, `vaporize` FROM `%s` WHERE `homun_id`='%u'" ,
158+ if ( SQL_ERROR == Sql_Query (sql_handle, " SELECT `homun_id`,`char_id`,`class`,`prev_class`,`name`,`level`,`exp`,`intimacy`,`hunger`, `str`, `agi`, `vit`, `int`, `dex`, `luk`, `hp`,`max_hp`,`sp`,`max_sp`,`skill_point`,`rename_flag`, `vaporize`, `autofeed` FROM `%s` WHERE `homun_id`='%u'" ,
159159 schema_config.homunculus_db , homun_id) )
160160 {
161161 Sql_ShowDebug (sql_handle);
@@ -196,6 +196,7 @@ bool mapif_homunculus_load(int homun_id, struct s_homunculus* hd)
196196 Sql_GetData (sql_handle, 19 , &data, NULL ); hd->skillpts = atoi (data);
197197 Sql_GetData (sql_handle, 20 , &data, NULL ); hd->rename_flag = atoi (data);
198198 Sql_GetData (sql_handle, 21 , &data, NULL ); hd->vaporize = atoi (data);
199+ Sql_GetData (sql_handle, 22 , &data, NULL ); hd->autofeed = atoi (data);
199200 Sql_FreeResult (sql_handle);
200201
201202 hd->intimacy = umin (hd->intimacy ,100000 );
0 commit comments