summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
authorrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-03 07:41:12 +0000
committerrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-03 07:41:12 +0000
commit0acd37664f6f39a1cbc0c95ec598b2c32016d9f4 (patch)
tree6950f7659bc53427a862172513df818a7887f16b /src/map/unit.c
parentff6944d6d2d9c41b543bbfba163cfd0b4d44c888 (diff)
downloadhercules-0acd37664f6f39a1cbc0c95ec598b2c32016d9f4.tar.gz
hercules-0acd37664f6f39a1cbc0c95ec598b2c32016d9f4.tar.bz2
hercules-0acd37664f6f39a1cbc0c95ec598b2c32016d9f4.tar.xz
hercules-0acd37664f6f39a1cbc0c95ec598b2c32016d9f4.zip
Fixed bugreport:6156 HT_REMOVETRAP must show a skill fail message when it fails.
Fixed bugreport:4160 after casting skills it should now check for the path if it is ok to execute same as official behavior. Fixed bugreport:5830 now caster should not hit/chase target between an obstacle same as official behavior. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16370 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index b45312949..ea114ea72 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -323,6 +323,8 @@ int unit_walktoxy( struct block_list *bl, short x, short y, int flag)
if( ud == NULL) return 0;
+ if( !path_search_long(NULL, bl->m, bl->x, bl->y, x, y, CELL_CHKWALL) ) return 0;
+
if (flag&4 && DIFF_TICK(ud->canmove_tick, gettick()) > 0 &&
DIFF_TICK(ud->canmove_tick, gettick()) < 2000)
{ // Delay walking command. [Skotlex]
@@ -1712,7 +1714,8 @@ static int unit_attack_timer_sub(struct block_list* src, int tid, unsigned int t
return 0;
if( status_isdead(src) || status_isdead(target) ||
- battle_check_target(src,target,BCT_ENEMY) <= 0 || !status_check_skilluse(src, target, 0, 0) )
+ battle_check_target(src,target,BCT_ENEMY) <= 0 || !status_check_skilluse(src, target, 0, 0) ||
+ !path_search_long(NULL, src->m, src->x, src->y, target->x, target->y, CELL_CHKWALL) )
return 0; // can't attack under these conditions
if( src->m != target->m )