summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-21 18:53:39 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-21 18:53:39 +0000
commit9709008e5343b2d749196976e713ec9556f02099 (patch)
tree9288e5a76da11272ebe8862b24ca29ca88fb9fb7 /src/map/skill.c
parent20021b23572611b0179ca63678de011af07db54f (diff)
downloadhercules-9709008e5343b2d749196976e713ec9556f02099.tar.gz
hercules-9709008e5343b2d749196976e713ec9556f02099.tar.bz2
hercules-9709008e5343b2d749196976e713ec9556f02099.tar.xz
hercules-9709008e5343b2d749196976e713ec9556f02099.zip
Recommit - added some changes for skill_range_leniency
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@707 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index b5f5d072e..b206209bc 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -7618,7 +7618,10 @@ int skill_use_id( struct map_session_data *sd, int target_id,
range = skill_get_range(skill_num,skill_lv);
if(range < 0)
range = battle_get_range(&sd->bl) - (range + 1);
- if(!battle_check_range(&sd->bl,bl,range + 1) )
+ // be lenient if the skill was cast before we have moved to the correct position [Celest]
+ if (sd->walktimer != -1)
+ range += battle_config.skill_range_leniency;
+ if(!battle_check_range(&sd->bl,bl,range) )
return 0;
if(bl->type==BL_PC) {