summaryrefslogtreecommitdiff
path: root/src/char_sql/int_homun.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-12-12 09:55:13 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-12-12 09:55:13 +0000
commited87621c65d7c13ddd4993101a5b7c2287b6609e (patch)
treea035e4d010d2b9a690c82114dff33dfa36d9f889 /src/char_sql/int_homun.c
parent1c5fab35e935b870939bcae24ea95e957ed76d5a (diff)
downloadhercules-ed87621c65d7c13ddd4993101a5b7c2287b6609e.tar.gz
hercules-ed87621c65d7c13ddd4993101a5b7c2287b6609e.tar.bz2
hercules-ed87621c65d7c13ddd4993101a5b7c2287b6609e.tar.xz
hercules-ed87621c65d7c13ddd4993101a5b7c2287b6609e.zip
* Some preparations for the guild script update
- cleaned up npc event execution code - cleaned up guild data loading/saving code; to be improved later - removed dummy 'account name' expulsion list management code - removed columns 'rsv1' and 'rsv2' from guild member data - removed columns 'rsv1' 'rsv2' 'rsv3' and 'acc' from guild expulsion data - added upgrade_svn11895.sql for SQL git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11895 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char_sql/int_homun.c')
-rw-r--r--src/char_sql/int_homun.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/char_sql/int_homun.c b/src/char_sql/int_homun.c
index 25637c6e7..a838ebf1d 100644
--- a/src/char_sql/int_homun.c
+++ b/src/char_sql/int_homun.c
@@ -27,12 +27,12 @@ void inter_homunculus_sql_final(void){
return;
}
-int mapif_saved_homunculus(int fd, int account_id, unsigned char flag)
+static int mapif_saved_homunculus(int fd, int account_id, bool flag)
{
WFIFOHEAD(fd, 7);
WFIFOW(fd,0) = 0x3892;
WFIFOL(fd,2) = account_id;
- WFIFOB(fd,6) = flag;
+ WFIFOB(fd,6) = flag; // 1:success, 0:failure
WFIFOSET(fd, 7);
return 0;
}
@@ -71,7 +71,7 @@ int mapif_homunculus_created(int fd, int account_id, struct s_homunculus *sh, un
}
// Save/Update Homunculus Skills
-int mapif_save_homunculus_skills(struct s_homunculus *hd)
+static bool mapif_save_homunculus_skills(struct s_homunculus *hd)
{
SqlStmt* stmt;
int i;
@@ -89,18 +89,18 @@ int mapif_save_homunculus_skills(struct s_homunculus *hd)
{
SqlStmt_ShowDebug(stmt);
SqlStmt_Free(stmt);
- return 0;
+ return false;
}
}
}
SqlStmt_Free(stmt);
- return 1;
+ return true;
}
-int mapif_save_homunculus(int fd, int account_id, struct s_homunculus *hd)
+static bool mapif_save_homunculus(int fd, int account_id, struct s_homunculus *hd)
{
- int flag = 1;
+ bool flag = true;
char esc_name[NAME_LENGTH*2+1];
Sql_EscapeStringLen(sql_handle, esc_name, hd->name, strnlen(hd->name, NAME_LENGTH));
@@ -114,7 +114,7 @@ int mapif_save_homunculus(int fd, int account_id, struct s_homunculus *hd)
hd->hp, hd->max_hp, hd->sp, hd->max_sp, hd->skillpts, hd->rename_flag, hd->vaporize) )
{
Sql_ShowDebug(sql_handle);
- flag = 0;
+ flag = false;
}
else
{
@@ -128,7 +128,7 @@ int mapif_save_homunculus(int fd, int account_id, struct s_homunculus *hd)
hd->hp, hd->max_hp, hd->sp, hd->max_sp, hd->skillpts, hd->rename_flag, hd->vaporize, hd->hom_id) )
{
Sql_ShowDebug(sql_handle);
- flag = 0;
+ flag = false;
}
else
{