diff options
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index 34c07dd51..1279aa822 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1349,7 +1349,7 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int break; case TK_TURNKICK: case MO_BALKYOUNG: //Note: attack_type is passed as BF_WEAPON for the actual target, BF_MISC for the splash-affected mobs. - if(attack_type == BF_MISC) //70% base stun chance... + if(attack_type&BF_MISC) //70% base stun chance... sc_start(bl,SC_STUN,70,skilllv,skill_get_time2(skillid,skilllv)); break; case GS_BULLSEYE: //0.1% coma rate. @@ -1410,18 +1410,18 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int src = sd?&sd->bl:src; } - //Reports say that autospell effects get triggered on skills and pretty much everything including splash attacks. [Skotlex] - //But Gravity Patched this silently, and it now seems to trigger only on - //weapon attacks. + // Autospell when attacking if(sd && !status_isdead(bl) && src != bl && sd->autospell[0].id) { struct block_list *tbl; struct unit_data *ud; int i, skilllv; + for (i = 0; i < MAX_PC_BONUS && sd->autospell[i].id; i++) { - if(!(sd->autospell[i].flag&attack_type&BF_RANGEMASK && - sd->autospell[i].flag&attack_type&BF_WEAPONMASK)) - continue; //Attack type or range type did not match. + if(!(sd->autospell[i].flag&attack_type&BF_WEAPONMASK && + sd->autospell[i].flag&attack_type&BF_RANGEMASK && + sd->autospell[i].flag&attack_type&BF_SKILLMASK)) + continue; // one or more trigger conditions were not fulfilled skill = (sd->autospell[i].id > 0) ? sd->autospell[i].id : -sd->autospell[i].id; @@ -1583,7 +1583,7 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list * } } - //Trigger counter-spells to retaliate against damage causing skills. [Skotlex] + // Trigger counter-spells to retaliate against damage causing skills. if(dstsd && !status_isdead(bl) && src != bl && dstsd->autospell2[0].id && !(skillid && skill_get_nk(skillid)&NK_NO_DAMAGE)) { @@ -1593,9 +1593,10 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list * for (i = 0; i < MAX_PC_BONUS && dstsd->autospell2[i].id; i++) { - if(!(dstsd->autospell2[i].flag&attack_type&BF_RANGEMASK && - dstsd->autospell2[i].flag&attack_type&BF_WEAPONMASK)) - continue; //Attack type or range type did not match. + if(!(dstsd->autospell2[i].flag&attack_type&BF_WEAPONMASK && + dstsd->autospell2[i].flag&attack_type&BF_RANGEMASK && + dstsd->autospell2[i].flag&attack_type&BF_SKILLMASK)) + continue; // one or more trigger conditions were not fulfilled skillid = (dstsd->autospell2[i].id > 0) ? dstsd->autospell2[i].id : -dstsd->autospell2[i].id; skilllv = dstsd->autospell2[i].lv?dstsd->autospell2[i].lv:1; |