summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-03-23 07:57:51 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-03-23 07:57:51 +0000
commit6064cd97c66f5471cebe3ab7d41711233ee711e3 (patch)
tree2952ec6b9a22d8e8ab0f1f0647c7ad164a3f257e /src/map/mob.c
parent9b68ab5698a641e9ffa8b1f90cd0c5edfa6ce812 (diff)
downloadhercules-6064cd97c66f5471cebe3ab7d41711233ee711e3.tar.gz
hercules-6064cd97c66f5471cebe3ab7d41711233ee711e3.tar.bz2
hercules-6064cd97c66f5471cebe3ab7d41711233ee711e3.tar.xz
hercules-6064cd97c66f5471cebe3ab7d41711233ee711e3.zip
Fixed bugreport:3574 Ice Walls finally are able to stop mobs chasing caster, and they now act as walls meaning mobs will not turn around to attack you unless they were already chasing you
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15777 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index c2270afb3..bdc661f58 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -1016,7 +1016,9 @@ 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)
+ 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) ) )
) { //Pick closest target?
(*target) = bl;
md->target_id=bl->id;