summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-02 23:51:20 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-02 23:51:20 +0000
commitdf9868064a36bb4e9f61736d0371d25baf6198e2 (patch)
treee71047946297ce0548fce0a945d17463bca81f82 /src/map/skill.c
parentdc23bd8455888368d20b0e667dc77afef126fa6f (diff)
downloadhercules-df9868064a36bb4e9f61736d0371d25baf6198e2.tar.gz
hercules-df9868064a36bb4e9f61736d0371d25baf6198e2.tar.bz2
hercules-df9868064a36bb4e9f61736d0371d25baf6198e2.tar.xz
hercules-df9868064a36bb4e9f61736d0371d25baf6198e2.zip
- status_check_skilluse cleanup. Some status will only block skills when they are first used, not on cast-end (which includes auto-spells and ground-skill checks). Added flag 2 to signal splash/aoe effects (skill already casted, but target just affected)
- Gravitation now only affects the caster, should have also fixed the skill not doing damage when skill_caster_check is set. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5437 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 213d56415..0a08e459e 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1580,17 +1580,16 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
if(src->prev == NULL || dsrc->prev == NULL || bl->prev == NULL)
return 0;
- //When caster is not the src of attack, this is a ground skill, and as such, do the relevant target checking. [Skotlex]
- if (
- (src != dsrc || battle_config.skill_caster_check) &&
- !status_check_skilluse(battle_config.skill_caster_check?src:NULL, bl, skillid, 1)
- )
- return 0;
+ if (src != dsrc) {
+ //When caster is not the src of attack, this is a ground skill, and as such, do the relevant target checking. [Skotlex]
+ if (!status_check_skilluse(battle_config.skill_caster_check?src:NULL, bl, skillid, 2))
+ return 0;
+ } else if (flag && skill_get_nk(skillid)&NK_SPLASH) {
+ //Note that splash attacks often only check versus the targetted mob, those around the splash area normally don't get checked for being hidden/cloaked/etc. [Skotlex]
+ if (!status_check_skilluse(dsrc, bl, skillid, 2))
+ return 0;
+ }
- //Note that splash attacks often only check versus the targetted mob, those around the splash area normally don't get checked for being hidden/cloaked/etc. [Skotlex]
- if (flag && skill_get_nk(skillid)&NK_SPLASH
- && !status_check_skilluse(dsrc, bl, skillid, 1))
- return 0;
//uncomment the following to do a check between caster and target. [Skotlex]
//eg: if you want storm gust to do no damage if the caster runs to another map after invoking the skill.