Fixed "int format, long unsigned int arg" warning

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8391 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
toms 2006-08-20 20:56:08 +00:00
parent e059803326
commit 5dffc4b45e
4 changed files with 6 additions and 5 deletions

View File

@ -3,6 +3,7 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK. AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/08/20 2006/08/20
* Fixed "int format, long unsigned int arg" warning [Toms]
* Fixed a warning when using cap_value(x, 0, x) on an unsigned value [Toms] * Fixed a warning when using cap_value(x, 0, x) on an unsigned value [Toms]
* Added clif_skill_fail for homunc to skill_castend_id & skill_castend_pos [Toms] * Added clif_skill_fail for homunc to skill_castend_id & skill_castend_pos [Toms]
* Fixed homunc skill 8016 not considered as homunc skill [Toms] * Fixed homunc skill 8016 not considered as homunc skill [Toms]

View File

@ -119,14 +119,14 @@ int mapif_save_homunculus(int fd, int account_id, struct s_homunculus *hd)
sprintf(tmp_sql, "INSERT INTO `homunculus` " sprintf(tmp_sql, "INSERT INTO `homunculus` "
"(`char_id`, `class`,`name`,`level`,`exp`,`intimacy`,`hunger`, `str`, `agi`, `vit`, `int`, `dex`, `luk`, `hp`,`max_hp`,`sp`,`max_sp`,`skill_point`, `rename_flag`, `vaporize`) " "(`char_id`, `class`,`name`,`level`,`exp`,`intimacy`,`hunger`, `str`, `agi`, `vit`, `int`, `dex`, `luk`, `hp`,`max_hp`,`sp`,`max_sp`,`skill_point`, `rename_flag`, `vaporize`) "
"VALUES ('%d', '%d', '%s', '%d', '%lu', '%lu', '%d', '%d', %d, '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d')", "VALUES ('%d', '%d', '%s', '%d', '%u', '%u', '%d', '%d', %d, '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d')",
hd->char_id, hd->class_,t_name,hd->level,hd->exp,hd->intimacy,hd->hunger, hd->str, hd->agi, hd->vit, hd->int_, hd->dex, hd->luk, hd->char_id, hd->class_,t_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->hp,hd->max_hp,hd->sp,hd->max_sp, hd->skillpts, hd->rename_flag, hd->vaporize);
} }
else else
{ {
sprintf(tmp_sql, "UPDATE `homunculus` SET `char_id`='%d', `class`='%d',`name`='%s',`level`='%d',`exp`='%lu',`intimacy`='%lu',`hunger`='%d', `str`='%d', `agi`='%d', `vit`='%d', `int`='%d', `dex`='%d', `luk`='%d', `hp`='%d',`max_hp`='%d',`sp`='%d',`max_sp`='%d',`skill_point`='%d', `rename_flag`='%d', `vaporize`='%d' WHERE `homun_id`='%d'", sprintf(tmp_sql, "UPDATE `homunculus` SET `char_id`='%d', `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`='%d',`max_hp`='%d',`sp`='%d',`max_sp`='%d',`skill_point`='%d', `rename_flag`='%d', `vaporize`='%d' WHERE `homun_id`='%d'",
hd->char_id, hd->class_,t_name,hd->level,hd->exp,hd->intimacy,hd->hunger, hd->str, hd->agi, hd->vit, hd->int_, hd->dex, hd->luk, hd->char_id, hd->class_,t_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->hom_id); hd->hp,hd->max_hp,hd->sp,hd->max_sp, hd->skillpts, hd->rename_flag, hd->vaporize, hd->hom_id);
} }

View File

@ -174,12 +174,12 @@ struct s_homunculus { //[orn]
int char_id; int char_id;
short class_; short class_;
int hp,max_hp,sp,max_sp; int hp,max_hp,sp,max_sp;
unsigned long intimacy; //[orn] unsigned int intimacy; //[orn]
short hunger; short hunger;
struct skill hskill[MAX_HOMUNSKILL]; //albator struct skill hskill[MAX_HOMUNSKILL]; //albator
short skillpts; short skillpts;
short level; short level;
unsigned long exp; unsigned int exp;
short rename_flag; short rename_flag;
short vaporize; //albator short vaporize; //albator
int str ; int str ;

View File

@ -9953,7 +9953,7 @@ int atcommand_hominfo(
snprintf(atcmd_output, sizeof(atcmd_output) ,"ATK : %d - MATK : %d~%d", sd->hd->battle_status.rhw.atk2+sd->hd->battle_status.batk, sd->hd->battle_status.matk_min, sd->hd->battle_status.matk_max); snprintf(atcmd_output, sizeof(atcmd_output) ,"ATK : %d - MATK : %d~%d", sd->hd->battle_status.rhw.atk2+sd->hd->battle_status.batk, sd->hd->battle_status.matk_min, sd->hd->battle_status.matk_max);
clif_displaymessage(fd, atcmd_output); clif_displaymessage(fd, atcmd_output);
snprintf(atcmd_output, sizeof(atcmd_output) ,"Hungry : %d - Intimacy : %d", sd->homunculus.hunger, sd->homunculus.intimacy); snprintf(atcmd_output, sizeof(atcmd_output) ,"Hungry : %d - Intimacy : %u", sd->homunculus.hunger, sd->homunculus.intimacy);
clif_displaymessage(fd, atcmd_output); clif_displaymessage(fd, atcmd_output);
return 0; return 0;