summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 2f2d3b5a4..ba4c0f213 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -9530,7 +9530,8 @@ BUILDIN_FUNC(mapwarp) // Added by RoVeRT
static int buildin_mobcount_sub(struct block_list *bl,va_list ap) // Added by RoVeRT
{
char *event=va_arg(ap,char *);
- if(strcmp(event,((struct mob_data *)bl)->npc_event)==0)
+ struct mob_data *md = ((struct mob_data *)bl);
+ if(strcmp(event,md->npc_event)==0 && md->status.hp > 0)
return 1;
return 0;
}