diff options
author | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-03-23 08:27:26 +0000 |
---|---|---|
committer | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-03-23 08:27:26 +0000 |
commit | 0352df880b0e71766ce0c3886355e285e329429d (patch) | |
tree | e8e0b75a6d6c711e9bbab3c7856ee3886114d73e /src/map/mob.c | |
parent | 1cea8ffc2a3d8f3d8eb8245df0042122436fff17 (diff) | |
download | hercules-0352df880b0e71766ce0c3886355e285e329429d.tar.gz hercules-0352df880b0e71766ce0c3886355e285e329429d.tar.bz2 hercules-0352df880b0e71766ce0c3886355e285e329429d.tar.xz hercules-0352df880b0e71766ce0c3886355e285e329429d.zip |
Follow up r15777, reworked skill_icewall_block so that it stops any attacks against anyone who got blocked off the wall, not only caster. Modified iw block algorithim on mob_ai_sub_hard_activesearch
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15779 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.c')
-rw-r--r-- | src/map/mob.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/map/mob.c b/src/map/mob.c index bdc661f58..27d696f88 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1016,10 +1016,14 @@ static int mob_ai_sub_hard_activesearch(struct block_list *bl,va_list ap) dist = distance_bl(&md->bl, bl); if( ((*target) == NULL || !check_distance_bl(&md->bl, *target, dist)) && - battle_check_range(&md->bl,bl,md->db->range2) && ( map[bl->m].icewall_num && ( - check_distance_bl(&md->bl, bl, status_get_range(&md->bl) ) || - path_search_long(NULL,bl->m,md->bl.x,md->bl.y,bl->x,bl->y,CELL_CHKICEWALL) ) ) + battle_check_range(&md->bl,bl,md->db->range2) ) { //Pick closest target? + if( map[bl->m].icewall_num && + !path_search_long(NULL,bl->m,md->bl.x,md->bl.y,bl->x,bl->y,CELL_CHKICEWALL) ) { + + if( !check_distance_bl(&md->bl, bl, status_get_range(&md->bl) ) ) + return 0; + } (*target) = bl; md->target_id=bl->id; md->min_chase= dist + md->db->range3; |