From e290f7f88054c00c44e00fc1e76fb158c549051e Mon Sep 17 00:00:00 2001 From: sketchyphoenix Date: Sat, 5 Jul 2008 07:54:53 +0000 Subject: * Moved the mob killmonster flag to a more appropriate area. (bugreport:1795) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12914 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/mob.c | 2 +- src/map/mob.h | 2 +- src/map/script.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/map/mob.c b/src/map/mob.c index 5ff325ad1..9abdd54e7 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -2545,7 +2545,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) if(md->nd) mob_script_callback(md, src, CALLBACK_DEAD); else - if(md->npc_event[0] && !md->npc_killmonster) + if(md->npc_event[0] && !md->state.npc_killmonster) { md->status.hp = 0; //So that npc_event invoked functions KNOW that I am dead. if(src) diff --git a/src/map/mob.h b/src/map/mob.h index 0a65e1c42..13b9c346a 100644 --- a/src/map/mob.h +++ b/src/map/mob.h @@ -112,6 +112,7 @@ struct mob_data { unsigned spotted: 1; unsigned char attacked_count; //For rude attacked. int provoke_flag; // Celest + unsigned npc_killmonster: 1; //for new killmonster behavior } state; struct guardian_data* guardian_data; struct { @@ -141,7 +142,6 @@ struct mob_data { short skillidx; unsigned int skilldelay[MAX_MOBSKILL]; char npc_event[50]; - int npc_killmonster; //for new killmonster behavior }; diff --git a/src/map/script.c b/src/map/script.c index 0f3018ec8..449c4ba52 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -7473,7 +7473,7 @@ BUILDIN_FUNC(areamonster) char *event=va_arg(ap,char *); int allflag=va_arg(ap,int); - md->npc_killmonster = 1; + md->state.npc_killmonster = 1; if(!allflag){ if(strcmp(event,md->npc_event)==0) @@ -7482,7 +7482,7 @@ BUILDIN_FUNC(areamonster) if(!md->spawn) status_kill(bl); } - md->npc_killmonster = 0; + md->state.npc_killmonster = 0; return 0; } static int buildin_killmonster_sub(struct block_list *bl,va_list ap) -- cgit v1.2.3-70-g09d2