diff options
author | Lance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-06-17 07:48:10 +0000 |
---|---|---|
committer | Lance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-06-17 07:48:10 +0000 |
commit | f1af15f7af3118a718a2a2ea02156e778b96a16f (patch) | |
tree | e470f7e9361cca9df5f0c4c4a682e8d63ba9d0da /src/map/mob.c | |
parent | 50d4640a538e16e718e8192ca12bc5ade1a7387f (diff) | |
download | hercules-f1af15f7af3118a718a2a2ea02156e778b96a16f.tar.gz hercules-f1af15f7af3118a718a2a2ea02156e778b96a16f.tar.bz2 hercules-f1af15f7af3118a718a2a2ea02156e778b96a16f.tar.xz hercules-f1af15f7af3118a718a2a2ea02156e778b96a16f.zip |
* [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
Diffstat (limited to 'src/map/mob.c')
-rw-r--r-- | src/map/mob.c | 8 |
1 files changed, 4 insertions, 4 deletions
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; } // |