|
@@ -94,7 +94,7 @@ bool mapif_homunculus_save(struct s_homunculus* hd)
|
|
|
{// new homunculus
|
|
|
if( SQL_ERROR == Sql_Query(sql_handle, "INSERT INTO `%s` "
|
|
|
"(`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`) "
|
|
|
- "VALUES ('%d', '%d', '%d', '%s', '%d', '%u', '%u', '%d', '%d', %d, '%d', '%d', '%d', '%d', '%u', '%u', '%u', '%u', '%d', '%d', '%d', '%d')",
|
|
|
+ "VALUES ('%d', '%d', '%d', '%s', '%d', '%" PRIu64 "', '%u', '%d', '%d', %d, '%d', '%d', '%d', '%d', '%u', '%u', '%u', '%u', '%d', '%d', '%d', '%d')",
|
|
|
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,
|
|
|
hd->hp, hd->max_hp, hd->sp, hd->max_sp, hd->skillpts, hd->rename_flag, hd->vaporize, hd->autofeed) )
|
|
|
{
|
|
@@ -108,7 +108,7 @@ bool mapif_homunculus_save(struct s_homunculus* hd)
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- 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'",
|
|
|
+ if( SQL_ERROR == Sql_Query(sql_handle, "UPDATE `%s` SET `char_id`='%d', `class`='%d',`prev_class`='%d',`name`='%s',`level`='%d',`exp`='%" PRIu64 "',`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'",
|
|
|
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,
|
|
|
hd->hp, hd->max_hp, hd->sp, hd->max_sp, hd->skillpts, hd->rename_flag, hd->vaporize, hd->autofeed, hd->hom_id) )
|
|
|
{
|
|
@@ -180,7 +180,7 @@ bool mapif_homunculus_load(int homun_id, struct s_homunculus* hd)
|
|
|
Sql_GetData(sql_handle, 3, &data, NULL); hd->prev_class = atoi(data);
|
|
|
Sql_GetData(sql_handle, 4, &data, &len); safestrncpy(hd->name, data, sizeof(hd->name));
|
|
|
Sql_GetData(sql_handle, 5, &data, NULL); hd->level = atoi(data);
|
|
|
- Sql_GetData(sql_handle, 6, &data, NULL); hd->exp = atoi(data);
|
|
|
+ Sql_GetData(sql_handle, 6, &data, NULL); hd->exp = strtoull( data, nullptr, 10 );
|
|
|
Sql_GetData(sql_handle, 7, &data, NULL); hd->intimacy = (unsigned int)strtoul(data, NULL, 10);
|
|
|
Sql_GetData(sql_handle, 8, &data, NULL); hd->hunger = atoi(data);
|
|
|
Sql_GetData(sql_handle, 9, &data, NULL); hd->str = atoi(data);
|