summaryrefslogtreecommitdiff
path: root/src/char_sql/int_homun.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-01-29 22:00:51 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-01-29 22:00:51 +0000
commit8a9600ded15d1846c9e38de0b660a0f6a72e20a9 (patch)
tree2f580058851d7028bef31d2c570aa62c1f955141 /src/char_sql/int_homun.c
parent9d6ca2f45f252753ae27650565dd3728f14d3bf3 (diff)
downloadhercules-8a9600ded15d1846c9e38de0b660a0f6a72e20a9.tar.gz
hercules-8a9600ded15d1846c9e38de0b660a0f6a72e20a9.tar.bz2
hercules-8a9600ded15d1846c9e38de0b660a0f6a72e20a9.tar.xz
hercules-8a9600ded15d1846c9e38de0b660a0f6a72e20a9.zip
- Corrected the homunculus deletion functions so that the homunculus is deleted together with the character.
- Added npc_check_areanpc so that Wand of Hermod will correctly check for nearby warps. - Emergency avoid now stacks with other speed boost statuses - Item skills and skills that bring up a menu now are cleared on death. - Minor cleanings git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9742 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char_sql/int_homun.c')
-rw-r--r--src/char_sql/int_homun.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/src/char_sql/int_homun.c b/src/char_sql/int_homun.c
index 3fc0ca8a4..427559d30 100644
--- a/src/char_sql/int_homun.c
+++ b/src/char_sql/int_homun.c
@@ -212,27 +212,33 @@ int mapif_load_homunculus(int fd){
return mapif_info_homunculus(fd, RFIFOL(fd,2), homun_pt);
}
-
-
-int mapif_delete_homunculus(int fd)
+int inter_delete_homunculus(int hom_id)
{
- RFIFOHEAD(fd);
- sprintf(tmp_sql, "DELETE FROM `homunculus` WHERE `homun_id` = '%u'", RFIFOL(fd,2));
+ sprintf(tmp_sql, "DELETE FROM `homunculus` WHERE `homun_id` = '%u'", hom_id);
if(mysql_query(&mysql_handle, tmp_sql))
{
ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
- return mapif_homunculus_deleted(fd, 0);
+ mapif_homunculus_deleted(fd, 0);
+ return 0;
}
- sprintf(tmp_sql, "DELETE FROM `skill_homunculus` WHERE `homun_id` = '%u'", RFIFOL(fd,2));
+ sprintf(tmp_sql, "DELETE FROM `skill_homunculus` WHERE `homun_id` = '%u'", hom_id);
if(mysql_query(&mysql_handle, tmp_sql))
{
ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
- return mapif_homunculus_deleted(fd, 0);
+ mapif_homunculus_deleted(fd, 0);
+ return 0;
}
- return mapif_homunculus_deleted(fd, 1);
+ mapif_homunculus_deleted(fd, 1);
+ return 1;
+}
+
+int mapif_delete_homunculus(int fd)
+{
+ RFIFOHEAD(fd);
+ inter_delete_homunculus(RFIFOL(fd,2));
}
int mapif_rename_homun_ack(int fd, int account_id, int char_id, unsigned char flag, char *name){