diff options
author | zephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-09-01 22:19:18 +0000 |
---|---|---|
committer | zephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-09-01 22:19:18 +0000 |
commit | c9181667d0cea7e6cfe99745d18c760c4a797912 (patch) | |
tree | 78f32c3f99a5e11ff7ee4b3af70035f0e5235e6b /src/map/battle.c | |
parent | de683beed6af67c57efd4b762a9797f98d4e28c6 (diff) | |
download | hercules-c9181667d0cea7e6cfe99745d18c760c4a797912.tar.gz hercules-c9181667d0cea7e6cfe99745d18c760c4a797912.tar.bz2 hercules-c9181667d0cea7e6cfe99745d18c760c4a797912.tar.xz hercules-c9181667d0cea7e6cfe99745d18c760c4a797912.zip |
- 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
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 14 |
1 files changed, 7 insertions, 7 deletions
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); } |