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/script.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/map/script.c') diff --git a/src/map/script.c b/src/map/script.c index f0ce4f200..41d84a92a 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -5732,11 +5732,11 @@ int buildin_killmonster_sub(struct block_list *bl,va_list ap) if(!allflag){ if(strcmp(event,md->npc_event)==0) - unit_remove_map(bl,1); + status_kill(bl); return 0; }else{ if(!md->spawn) - unit_remove_map(bl,1); + status_kill(bl); return 0; } return 0; @@ -5760,7 +5760,7 @@ int buildin_killmonster(struct script_state *st) int buildin_killmonsterall_sub(struct block_list *bl,va_list ap) { - unit_remove_map(bl,1); + status_kill(bl); return 0; } int buildin_killmonsterall(struct script_state *st) -- cgit v1.2.3-70-g09d2