summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorL0ne_W0lf <L0ne_W0lf@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-06-28 01:10:58 +0000
committerL0ne_W0lf <L0ne_W0lf@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-06-28 01:10:58 +0000
commit9e94e8ad83d23ce2082b30217ed2f14f0b38a4bd (patch)
treede43cff93093e3324101023ce71d5a7e5f2e6fb7 /src/map/skill.c
parent79ef7d48a5db30fbd55078691d6a5ea127c4a4ee (diff)
downloadhercules-9e94e8ad83d23ce2082b30217ed2f14f0b38a4bd.tar.gz
hercules-9e94e8ad83d23ce2082b30217ed2f14f0b38a4bd.tar.bz2
hercules-9e94e8ad83d23ce2082b30217ed2f14f0b38a4bd.tar.xz
hercules-9e94e8ad83d23ce2082b30217ed2f14f0b38a4bd.zip
* Follow up to r13895, added a battle.conf setting to control if ranges should be checked with autocasts.
'autospell_check_range', by default is set to no, as this is official behavior. This does not affect autospellwhenhit. * Sonic Blow autocast now stops players attacking when it triggers. It's possible there is more depth to this on official servers, and should 'stop' attacking on regular casts as well. It appears so far that this is the only skill that behaves this way. * Modified the default value for homunculus_auto_vapor in source to 1. * pvp_points are no longer calculated in the gvg_dungeon flagged maps. * Corrected a view ID and an equip location in the item database. (bugreport:4330) * Corrected a typo in the DTS_Warper script. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14356 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 2f2a7e6b0..3e63a9211 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1010,8 +1010,11 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int
tbl = (sd->autospell[i].id < 0) ? src : bl;
- if( !battle_check_range(src, tbl, skill_get_range2(src, skill,skilllv) + (skill == RG_CLOSECONFINE?0:1)) )
- continue; //Autocasts should always fail if the target is outside the skill range or an obstacle is in between.[Inkfish]
+ if( !battle_check_range(src, tbl, skill_get_range2(src, skill,skilllv) + (skill == RG_CLOSECONFINE?0:1)) && battle_config.autospell_check_range )
+ continue; // If autospell_check_range is yes, fail the autocast.
+
+ if (skill == AS_SONICBLOW)
+ pc_stop_attack(sd); //Special case, Sonic Blow autospell should stop the player attacking.
sd->state.autocast = 1;
skill_consume_requirement(sd,skill,skilllv,1);
@@ -1109,7 +1112,7 @@ int skill_onskillusage(struct map_session_data *sd, struct block_list *bl, int s
continue;
tbl = (sd->autospell3[i].id < 0) ? &sd->bl : bl;
- if( !battle_check_range(&sd->bl, tbl, skill_get_range2(&sd->bl, skill,skilllv) + (skill == RG_CLOSECONFINE?0:1)) )
+ if( !battle_check_range(&sd->bl, tbl, skill_get_range2(&sd->bl, skill,skilllv) + (skill == RG_CLOSECONFINE?0:1)) && battle_config.autospell_check_range )
continue;
sd->state.autocast = 1;
@@ -1281,7 +1284,7 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list *
tbl = (dstsd->autospell2[i].id < 0) ? bl : src;
- if( !battle_check_range(src, tbl, skill_get_range2(src, skillid,skilllv) + (skillid == RG_CLOSECONFINE?0:1)) )
+ if( !battle_check_range(src, tbl, skill_get_range2(src, skillid,skilllv) + (skillid == RG_CLOSECONFINE?0:1)) && battle_config.autospell_check_range )
continue;
dstsd->state.autocast = 1;