From 4ef11952653e142f8a6f28194fa56eb615860339 Mon Sep 17 00:00:00 2001 From: skotlex Date: Tue, 30 May 2006 17:06:55 +0000 Subject: - Removed the on-die specific code from unit_remove_map and placed it on the corresponding *_dead functions. unit_remove_map should never assume the char died, it is just a "remove from map" function. - Updated status_damage to handle the general death code (clearing status changes, clearing skill related data, sending death packet, etc). The return value from the *_dead functions will tell it what to do or not with the object (death aborted, clear it from map/memory, etc) - Cleaned up pc_dead to take advantage of the fact that status changes are not ended until after the function. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6852 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/mercenary.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/map/mercenary.c') diff --git a/src/map/mercenary.c b/src/map/mercenary.c index d6e2c06be..335bd54fa 100644 --- a/src/map/mercenary.c +++ b/src/map/mercenary.c @@ -102,14 +102,8 @@ void merc_damage(struct homun_data *hd,struct block_list *src,int hp,int sp) int merc_dead(struct homun_data *hd, struct block_list *src) { //dead lol - clif_clearchar((struct block_list*)hd,1); - hd->bl.m = 0; - hd->bl.x = 0; - hd->bl.y = 0; //send it somewhere where it doesn't bother us merc_save(hd); - clif_clearchar_area(&hd->bl,0); - map_delblock(&hd->bl); - return 1; + return 3; //Remove it from map. } void merc_skillup(struct map_session_data *sd,short skillnum) -- cgit v1.2.3-60-g2f50