diff options
author | Michieru <Michieru@users.noreply.github.com> | 2014-09-08 09:17:28 +0200 |
---|---|---|
committer | Michieru <Michieru@users.noreply.github.com> | 2014-09-08 09:17:28 +0200 |
commit | 3a79f91a7792425855b3cf0bd1fe66cbba506848 (patch) | |
tree | 21693d4eee2d1034864e6bb6acc7fb6b1f0bdc8a /src | |
parent | 1c71c00b96bfc6674a544e9f88e0ccc0dbe2aae4 (diff) | |
parent | 41f28c0b9c6f1a285c0dba458e582209a1710fdb (diff) | |
download | hercules-3a79f91a7792425855b3cf0bd1fe66cbba506848.tar.gz hercules-3a79f91a7792425855b3cf0bd1fe66cbba506848.tar.bz2 hercules-3a79f91a7792425855b3cf0bd1fe66cbba506848.tar.xz hercules-3a79f91a7792425855b3cf0bd1fe66cbba506848.zip |
Merge pull request #339 from csnv/skillchecks
Fixes CR_DEVOTION and MG_STONECURSE behaviour, hiding behaviour.
Diffstat (limited to 'src')
-rw-r--r-- | src/map/skill.c | 2 | ||||
-rw-r--r-- | src/map/status.c | 11 | ||||
-rw-r--r-- | src/map/unit.c | 11 |
3 files changed, 14 insertions, 10 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index b263a8169..b6a7e91f0 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -6360,7 +6360,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin if (tsc->data[SC_STONE]) { status_change_end(bl, SC_STONE, INVALID_TIMER); - if (sd) clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); + clif->skill_nodamage(src,bl,skill_id,skill_lv,1); break; } if (sc_start4(src,bl,SC_STONE,(skill_lv*4+20)+brate, diff --git a/src/map/status.c b/src/map/status.c index 4b22251e6..1748b44cb 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1790,16 +1790,8 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, uin hide_flag = flag?OPTION_HIDE:(OPTION_HIDE|OPTION_CLOAK|OPTION_CHASEWALK); //You cannot hide from ground skills. - if( skill->get_ele(skill_id,1) == ELE_EARTH ) //TODO: Need Skill Lv here :/ + if( skill->get_ele(skill_id,1) == ELE_EARTH && skill_id != MG_STONECURSE) hide_flag &= ~OPTION_HIDE; - else { - switch ( skill_id ) { - case MO_ABSORBSPIRITS: // it works when already casted and target suddenly hides. - case SA_DISPELL: - hide_flag &= ~OPTION_HIDE; - break; - } - } switch( target->type ) { case BL_PC: { @@ -1810,6 +1802,7 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, uin return 0; if( tsc ) { if (tsc->option&hide_flag && !is_boss && + !(flag&1 && skill->get_nk(skill_id)&NK_NO_DAMAGE) && // Buff/debuff skills that started casting before hiding still applies ((sd->special_state.perfect_hiding || !is_detect) || (tsc->data[SC_CLOAKINGEXCEED] && is_detect))) return 0; diff --git a/src/map/unit.c b/src/map/unit.c index af0c0a948..519427635 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -1241,6 +1241,17 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui casttime = -1; temp = 1; break; + case CR_DEVOTION: + if (sd) { + int i = 0, count = min(skill_lv, 5); + ARR_FIND(0, count, i, sd->devotion[i] == target_id); + if (i == count) { + ARR_FIND(0, count, i, sd->devotion[i] == 0); + if(i == count) + return 0; // Can't cast on other characters when limit is reached + } + } + break; case SR_GATEOFHELL: case SR_TIGERCANNON: if (sc && sc->data[SC_COMBOATTACK] && |