From c9181667d0cea7e6cfe99745d18c760c4a797912 Mon Sep 17 00:00:00 2001 From: zephyrus Date: Mon, 1 Sep 2008 22:19:18 +0000 Subject: - More code for mercenaries and starting work on restrictions. * Heal and Sanctuary skills have their effectiveness on mercenaries reduced by 50%. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13183 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/battle.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/map/battle.c') diff --git a/src/map/battle.c b/src/map/battle.c index 2ea509299..150a6a39b 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -99,6 +99,7 @@ int battle_gettarget(struct block_list* bl) case BL_MOB: return ((struct mob_data*)bl)->target_id; case BL_PET: return ((struct pet_data*)bl)->target_id; case BL_HOM: return ((struct homun_data*)bl)->ud.target; + case BL_MER: return ((struct mercenary_data*)bl)->ud.target; } return 0; } @@ -3315,19 +3316,18 @@ bool battle_check_range(struct block_list *src,struct block_list *bl,int range) nullpo_retr(false, src); nullpo_retr(false, bl); - if(src->m != bl->m) // 違うマップ + if( src->m != bl->m ) return false; - if (!check_distance_bl(src, bl, range)) + if( !check_distance_bl(src, bl, range) ) return false; - if((d=distance_bl(src, bl)) < 2) //No need for path checking. - return true; + if( (d = distance_bl(src, bl)) < 2 ) + return true; // No need for path checking. - if (d> AREA_SIZE) - return false; //Avoid targetting objects beyond your range of sight. + if( d > AREA_SIZE ) + return false; // Avoid targetting objects beyond your range of sight. - // ?瘧Q物判定 return path_search_long(NULL,src->m,src->x,src->y,bl->x,bl->y,CELL_CHKWALL); } -- cgit v1.2.3-70-g09d2