From f1af15f7af3118a718a2a2ea02156e778b96a16f Mon Sep 17 00:00:00 2001 From: Lance Date: Sat, 17 Jun 2006 07:48:10 +0000 Subject: * [Added]: - buildin_checkcell, buildin_mobwarp, buildin_pcattack. * [Improved]: - buildin_skilluseid and buildin_skillusepos to accept a few more arguments. - mob_script_callback to return sucess value. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7219 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/mob.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/map/mob.c') diff --git a/src/map/mob.c b/src/map/mob.c index 686cb71d3..c4cedad2d 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -771,10 +771,8 @@ static int mob_ai_sub_hard_activesearch(struct block_list *bl,va_list ap) if ((*target) == bl || !status_check_skilluse(&md->bl, bl, 0, 0)) return 0; - if(md->nd){ - mob_script_callback(md, bl, CALLBACK_DETECT); + if(md->nd && mob_script_callback(md, bl, CALLBACK_DETECT)) return 1; // We have script handling the work. - } if(battle_check_target(&md->bl,bl,BCT_ENEMY)<=0) return 0; @@ -2992,7 +2990,7 @@ int mob_clone_delete(int class_) return 0; } -void mob_script_callback(struct mob_data *md, struct block_list *target, unsigned char action_type) +int mob_script_callback(struct mob_data *md, struct block_list *target, unsigned char action_type) { // I will not add any protection here since I assume everything is checked before coming here. if(md->callback_flag&action_type){ @@ -3003,7 +3001,9 @@ void mob_script_callback(struct mob_data *md, struct block_list *target, unsigne } setd_sub(NULL, NULL, ".ai_action", 3, (void *)md->bl.id, &md->nd->u.scr.script->script_vars); run_script(md->nd->u.scr.script, 0, 0, md->nd->bl.id); + return 1; } + return 0; } // -- cgit v1.2.3-60-g2f50