summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichieru <Michieru@users.noreply.github.com>2014-11-01 21:36:22 +0100
committerMichieru <Michieru@users.noreply.github.com>2014-11-01 21:36:22 +0100
commit19e6b0f9de7280770f0dd98d9431d3337b9a6e7c (patch)
tree24ae87f313214f973a115a53a866a153cc89c624 /src
parent8df13c48649f6a5612d1e391b80cc2aa846eac80 (diff)
downloadhercules-19e6b0f9de7280770f0dd98d9431d3337b9a6e7c.tar.gz
hercules-19e6b0f9de7280770f0dd98d9431d3337b9a6e7c.tar.bz2
hercules-19e6b0f9de7280770f0dd98d9431d3337b9a6e7c.tar.xz
hercules-19e6b0f9de7280770f0dd98d9431d3337b9a6e7c.zip
Fix clearance, should work only on mob, party or self and skill can't be cast on all players that are not in the party (bug:7050)
Diffstat (limited to 'src')
-rw-r--r--src/map/skill.c13
-rw-r--r--src/map/unit.c6
2 files changed, 7 insertions, 12 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 340fd0ec5..1fca0dfc7 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -8325,7 +8325,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
if( flag&1 || (splash = skill->get_splash(skill_id, skill_lv)) < 1 ) {
int i;
//As of the behavior in official server Clearance is just a super version of Dispell skill. [Jobbie]
- if( bl->type != BL_MOB && battle->check_target(src,bl,BCT_PARTY) <= 0 ) // Only affect mob or party.
+ if( bl->type != BL_MOB && battle->check_target(src,bl,BCT_PARTY) <= 0 && sd ) // Only affect mob, party or self.
break;
clif->skill_nodamage(src,bl,skill_id,skill_lv,1);
@@ -13174,17 +13174,6 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id
}
}
break;
- /**
- * Keeping as a note:
- * Bug Report #17 provides a link to a sep-2011 changelog that shows this requirement was removed
- **/
- //case AB_LAUDAAGNUS:
- //case AB_LAUDARAMUS:
- // if( !sd->status.party_id ) {
- // clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
- // return 0;
- // }
- // break;
case AB_ADORAMUS:
/**
diff --git a/src/map/unit.c b/src/map/unit.c
index 76a5853df..34a9dcc24 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1406,6 +1406,12 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui
}
}
break;
+ case AB_CLEARANCE:
+ if( target->type != BL_MOB && battle->check_target(src,target,BCT_PARTY) <= 0 && sd ) {
+ clif->skill_fail(sd, skill_id, USESKILL_FAIL_TOTARGET, 0);
+ return 0;
+ }
+ break;
case SR_GATEOFHELL:
case SR_TIGERCANNON:
if (sc && sc->data[SC_COMBOATTACK] &&