diff options
author | shennetsind <ind@henn.et> | 2013-04-11 16:01:51 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-04-11 16:01:51 -0300 |
commit | 14a406ee0e5c6ba25539cc98f27ff9c2b8047e2e (patch) | |
tree | 4e506c7df37bcc1f00d434814ee342853ec11a7f | |
parent | 0e6dcf7291164716aa47940e5967489e13cebfb6 (diff) | |
download | hercules-14a406ee0e5c6ba25539cc98f27ff9c2b8047e2e.tar.gz hercules-14a406ee0e5c6ba25539cc98f27ff9c2b8047e2e.tar.bz2 hercules-14a406ee0e5c6ba25539cc98f27ff9c2b8047e2e.tar.xz hercules-14a406ee0e5c6ba25539cc98f27ff9c2b8047e2e.zip |
Fixed Chorus skill partner check
Improved from the merge 2fec7b3c41bd3b1c5a94ba31789c433350ff98c8
Signed-off-by: shennetsind <ind@henn.et>
-rw-r--r-- | src/map/unit.c | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/src/map/unit.c b/src/map/unit.c index 798a6ef6f..a6d8fcf53 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -1148,41 +1148,41 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui // Record the status of the previous skill) if(sd) { - if( (skill->get_inf2(skill_id)&INF2_ENSEMBLE_SKILL) && skill->check_pc_partner(sd, skill_id, &skill_lv, 1, 0) < 1 ) { - clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); + if( (skill->get_inf2(skill_id)&(INF2_ENSEMBLE_SKILL|INF2_CHORUS_SKILL)) && skill->check_pc_partner(sd, skill_id, &skill_lv, 1, 0) < 1 ) { + clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); return 0; - } - + } + switch(skill_id){ - case SA_CASTCANCEL: - if(ud->skill_id != skill_id){ - sd->skill_id_old = ud->skill_id; - sd->skill_lv_old = ud->skill_lv; - } - break; - case BD_ENCORE: - //Prevent using the dance skill if you no longer have the skill in your tree. - if(!sd->skill_id_dance || pc_checkskill(sd,sd->skill_id_dance)<=0){ - clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); - return 0; + case SA_CASTCANCEL: + if(ud->skill_id != skill_id){ + sd->skill_id_old = ud->skill_id; + sd->skill_lv_old = ud->skill_lv; + } + break; + case BD_ENCORE: + //Prevent using the dance skill if you no longer have the skill in your tree. + if(!sd->skill_id_dance || pc_checkskill(sd,sd->skill_id_dance)<=0){ + clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); + return 0; + } + sd->skill_id_old = skill_id; + break; + case WL_WHITEIMPRISON: + if( battle->check_target(src,target,BCT_SELF|BCT_ENEMY) < 0 ) { + clif->skill_fail(sd,skill_id,USESKILL_FAIL_TOTARGET,0); + return 0; + } + break; + case MG_FIREBOLT: + case MG_LIGHTNINGBOLT: + case MG_COLDBOLT: + sd->skill_id_old = skill_id; + sd->skill_lv_old = skill_lv; + break; } - sd->skill_id_old = skill_id; - break; - case WL_WHITEIMPRISON: - if( battle->check_target(src,target,BCT_SELF|BCT_ENEMY) < 0 ) { - clif->skill_fail(sd,skill_id,USESKILL_FAIL_TOTARGET,0); + if (!skill->check_condition_castbegin(sd, skill_id, skill_lv)) return 0; - } - break; - case MG_FIREBOLT: - case MG_LIGHTNINGBOLT: - case MG_COLDBOLT: - sd->skill_id_old = skill_id; - sd->skill_lv_old = skill_lv; - break; - } - if (!skill->check_condition_castbegin(sd, skill_id, skill_lv)) - return 0; } if( src->type == BL_MOB ) |