- Modified battle_check_range to use check_range_bl rather than range_bl for range checking, as the range_bl aproximations can lead to situations where battle_check_range returns true while the attack function range check fails >.>

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5223 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
skotlex 2006-02-08 03:20:08 +00:00
parent e8a88c2271
commit 7964763fb7
2 changed files with 5 additions and 6 deletions

View File

@ -5,6 +5,8 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. EV
GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
2006/02/07 2006/02/07
* Modified battle_check_distance, mobs should no longer find a diagonal
spot on which they lock onto their target, yet fail to attack from. [Skotlex]
* Removed the max level configs from battle/exp.txt [Skotlex] * Removed the max level configs from battle/exp.txt [Skotlex]
* Now NPC_POWERUP uses SC_INCATKRATE instead of SC_EXPLOSIONSPIRITS for * Now NPC_POWERUP uses SC_INCATKRATE instead of SC_EXPLOSIONSPIRITS for
enhancing damage. Instead of +1k atk per skilllv, it is +50% atk per enhancing damage. Instead of +1k atk per skilllv, it is +50% atk per

View File

@ -3494,19 +3494,16 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
*/ */
int battle_check_range(struct block_list *src,struct block_list *bl,int range) int battle_check_range(struct block_list *src,struct block_list *bl,int range)
{ {
int arange;
nullpo_retr(0, src); nullpo_retr(0, src);
nullpo_retr(0, bl); nullpo_retr(0, bl);
if(src->m != bl->m) // 違うマップ if(src->m != bl->m) // 違うマップ
return 0; return 0;
arange = distance_bl(src, bl); if (!check_distance_bl(src, bl, range))
if( range>0 && range < arange)
return 0; return 0;
if( arange<2 ) //No need for path checking. if(distance_bl(src, bl) < 3) //No need for path checking.
return 1; return 1;
// ?瘧Q物判定 // ?瘧Q物判定