summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 4e4cf1734..4629e9f6e 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1112,13 +1112,10 @@ int skill_onskillusage(struct map_session_data *sd, struct block_list *bl, int s
continue; // No target
if( rand()%1000 > sd->autospell3[i].rate )
continue;
- if( !battle_check_range(&sd->bl, bl, skill_get_range2(&sd->bl, skill,skilllv) + (skill == RG_CLOSECONFINE?0:1)) )
- continue;
+ tbl = (sd->autospell3[i].id < 0) ? &sd->bl : bl;
- if( sd->autospell3[i].id < 0 )
- tbl = &sd->bl;
- else
- tbl = bl;
+ if( !battle_check_range(&sd->bl, tbl, skill_get_range2(&sd->bl, skill,skilllv) + (skill == RG_CLOSECONFINE?0:1)) )
+ continue;
sd->state.autocast = 1;
skill_consume_requirement(sd,skill,skilllv,1);