Skip to content

Commit

Permalink
Fixed Bug #7014 and Bug #7077
Browse files Browse the repository at this point in the history
-where Chorus/Ensemble skill checks are not working properly.
-NJ_SUITON should now work properly with Kagerou/Oboro.

Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
  • Loading branch information
malufett committed Feb 26, 2013
1 parent ad792f4 commit b9c79ce
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 16 deletions.
5 changes: 5 additions & 0 deletions src/map/skill.c
Original file line number Diff line number Diff line change
Expand Up @@ -9227,6 +9227,11 @@ int skill_castend_id(int tid, unsigned int tick, int id, intptr_t data)
inf &= ~BCT_NEUTRAL;
}

if( sd && (inf2&INF2_CHORUS_SKILL) && skill_check_pc_partner(sd, ud->skill_id, &ud->skill_lv, 1, 0) < 1 ) {
clif_skill_fail(sd, ud->skill_id, USESKILL_FAIL_NEED_HELPER, 0);
break;
}

if( ud->skill_id >= SL_SKE && ud->skill_id <= SL_SKA && target->type == BL_MOB )
{
if( ((TBL_MOB*)target)->class_ == MOBID_EMPERIUM )
Expand Down
2 changes: 1 addition & 1 deletion src/map/status.c
Original file line number Diff line number Diff line change
Expand Up @@ -7344,7 +7344,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
#endif
break;
case SC_SUITON:
if (!val2 || (sd && (sd->class_&MAPID_UPPERMASK) == MAPID_NINJA)) {
if (!val2 || (sd && (sd->class_&MAPID_BASEMASK) == MAPID_NINJA)) {
//No penalties.
val2 = 0; //Agi penalty
val3 = 0; //Walk speed penalty
Expand Down
21 changes: 6 additions & 15 deletions src/map/unit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1119,6 +1119,12 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui
tstatus = status_get_status_data(target);
// 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);
return 0;
}

switch(skill_id){
case SA_CASTCANCEL:
if(ud->skill_id != skill_id){
Expand All @@ -1134,21 +1140,6 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui
}
sd->skill_id_old = skill_id;
break;
case BD_LULLABY:
case BD_RICHMANKIM:
case BD_ETERNALCHAOS:
case BD_DRUMBATTLEFIELD:
case BD_RINGNIBELUNGEN:
case BD_ROKISWEIL:
case BD_INTOABYSS:
case BD_SIEGFRIED:
case CG_MOONLIT:
if (skill_check_pc_partner(sd, skill_id, &skill_lv, 1, 0) < 1)
{
clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
return 0;
}
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);
Expand Down

0 comments on commit b9c79ce

Please sign in to comment.