Fixed soul linking (#6697)

Fixes #6696

Thanks to @mazvi and @aleos89
This commit is contained in:
Lemongrass3110
2022-03-16 16:46:48 +01:00
committed by GitHub
parent 414023a14a
commit a62859fdb0
3 changed files with 73 additions and 13 deletions

View File

@@ -9968,24 +9968,21 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
case SL_STAR:
case SL_SUPERNOVICE:
case SL_WIZARD:
if (sd && tsc && (tsc->data[SC_SOULGOLEM] || tsc->data[SC_SOULSHADOW] || tsc->data[SC_SOULFALCON] || tsc->data[SC_SOULFAIRY])) { // Soul links from Soul Linker and Soul Reaper skills don't stack.
clif_skill_fail(sd, skill_id, USESKILL_FAIL,0);
break;
}
//NOTE: here, 'type' has the value of the associated MAPID, not of the SC_SPIRIT constant.
if (sd && dstsd && !((dstsd->class_&MAPID_UPPERMASK) == type)) {
clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
break;
}
if (skill_id == SL_SUPERNOVICE && dstsd && dstsd->die_counter && !(rnd()%100))
{ //Erase death count 1% of the casts
pc_setparam(dstsd, SP_PCDIECOUNTER, 0);
clif_specialeffect(bl, EF_ANGEL2, AREA);
//SC_SPIRIT invokes status_calc_pc for us.
}
clif_skill_nodamage(src,bl,skill_id,skill_lv,
sc_start4(src,bl,SC_SPIRIT,100,skill_lv,skill_id,0,0,skill_get_time(skill_id,skill_lv)));
sc_start(src,src,SC_SMA,100,skill_lv,skill_get_time(SL_SMA,skill_lv));
if( sc_start2( src, bl, type, 100, skill_lv, skill_id, skill_get_time( skill_id, skill_lv ) ) ){
clif_skill_nodamage( src, bl, skill_id, skill_lv, 1 );
sc_start( src, src, SC_SMA, 100, skill_lv, skill_get_time( SL_SMA, skill_lv ) );
}else{
if( sd ){
clif_skill_fail( sd, skill_id, USESKILL_FAIL_LEVEL, 0 );
}
}
break;
case SL_HIGH:
if (sd && tsc && (tsc->data[SC_SOULGOLEM] || tsc->data[SC_SOULSHADOW] || tsc->data[SC_SOULFALCON] || tsc->data[SC_SOULFAIRY])) { // Soul links from Soul Linker and Soul Reaper skills don't stack.