|
@@ -4949,7 +4949,7 @@ int battle_check_range(struct block_list *src,struct block_list *bl,int range)
|
|
int dx,dy;
|
|
int dx,dy;
|
|
struct walkpath_data wpd;
|
|
struct walkpath_data wpd;
|
|
int arange;
|
|
int arange;
|
|
-
|
|
|
|
|
|
+
|
|
nullpo_retr(0, src);
|
|
nullpo_retr(0, src);
|
|
nullpo_retr(0, bl);
|
|
nullpo_retr(0, bl);
|
|
|
|
|
|
@@ -4962,10 +4962,14 @@ int battle_check_range(struct block_list *src,struct block_list *bl,int range)
|
|
|
|
|
|
if( range>0 && range < arange ) {// 遠すぎる
|
|
if( range>0 && range < arange ) {// 遠すぎる
|
|
// be lenient if the skill was cast before we have moved to the correct position [Celest]
|
|
// be lenient if the skill was cast before we have moved to the correct position [Celest]
|
|
- if (src->type != BL_PC ||
|
|
|
|
- (bl->type == BL_PC && ((struct map_session_data *)bl)->walktimer != -1 &&
|
|
|
|
- !((arange-=battle_config.skill_range_leniency)<=range)))
|
|
|
|
|
|
+ if (src->type != BL_PC)
|
|
return 0;
|
|
return 0;
|
|
|
|
+ else if (src->type == BL_PC) {
|
|
|
|
+ struct map_session_data *sd;
|
|
|
|
+ nullpo_retr(0, (sd=(struct map_session_data *)bl));
|
|
|
|
+ if (sd->walktimer != -1 && !((arange-=battle_config.skill_range_leniency)<=range))
|
|
|
|
+ return 0;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
if( arange<2 ) // 同じマスか隣接
|
|
if( arange<2 ) // 同じマスか隣接
|