int party_skill_check(struct map_session_data *sd, int party_id, uint16 skill_id, uint16 skill_lv) { struct party_data *p; struct map_session_data *p_sd; int i; if(!party_id || (p = party_search(party_id)) == NULL) return 0; party_check_state(p); switch(skill_id) { case TK_COUNTER: //Increase Triple Attack rate of Monks. if (!p->state.monk) return 0; break; case MO_COMBOFINISH: //Increase Counter rate of Star Gladiators if (!p->state.sg) return 0; break; case AM_TWILIGHT2: //Twilight Pharmacy, requires Super Novice return p->state.snovice; case AM_TWILIGHT3: //Twilight Pharmacy, Requires Taekwon return p->state.tk; default: return 0; //Unknown case? } for(i = 0; i < MAX_PARTY; i++) { if ((p_sd = p->data[i].sd) == NULL) continue; if (sd->bl.m != p_sd->bl.m) continue; switch(skill_id) { case TK_COUNTER: //Increase Triple Attack rate of Monks. if((p_sd->class_&MAPID_UPPERMASK) == MAPID_MONK && pc_checkskill(p_sd,MO_TRIPLEATTACK)) { sc_start4(&p_sd->bl,&p_sd->bl,SC_SKILLRATE_UP,100,MO_TRIPLEATTACK, 50+50*skill_lv, //+100/150/200% rate 0,0,skill_get_time(SG_FRIEND, 1)); } break; case MO_COMBOFINISH: //Increase Counter rate of Star Gladiators if((p_sd->class_&MAPID_UPPERMASK) == MAPID_STAR_GLADIATOR && sd->sc.data[SC_READYCOUNTER] && pc_checkskill(p_sd,SG_FRIEND)) { sc_start4(&p_sd->bl,&p_sd->bl,SC_SKILLRATE_UP,100,TK_COUNTER, 50+50*pc_checkskill(p_sd,SG_FRIEND), //+100/150/200% rate 0,0,skill_get_time(SG_FRIEND, 1)); } break; } } return 0; }
int party_skill_check(struct map_session_data *sd, int party_id, int skillid, int skilllv) { struct party *p; struct map_session_data *p_sd; int i; if(!party_id || (p=party_search(party_id))==NULL) return 0; for(i=0;i<MAX_PARTY;i++){ if ((p_sd = p->member[i].sd) == NULL) continue; switch(skillid) { case TK_COUNTER: //Increase Triple Attack rate of Monks. if((p_sd->class_&MAPID_UPPERMASK) == MAPID_MONK && sd->bl.m == p_sd->bl.m && pc_checkskill(p_sd,MO_TRIPLEATTACK)) { int rate = 50 +50*skilllv; //+100/150/200% success rate sc_start4(&p_sd->bl,SC_SKILLRATE_UP,100,MO_TRIPLEATTACK,rate,0,0,skill_get_time(SG_FRIEND, 1)); } break; case MO_TRIPLEATTACK: //Increase Counter rate of Star Gladiators if((p_sd->class_&MAPID_UPPERMASK) == MAPID_STAR_GLADIATOR && sd->bl.m == p_sd->bl.m && pc_checkskill(p_sd,TK_COUNTER)) { int rate = 50 +50*pc_checkskill(p_sd,TK_COUNTER); //+100/150/200% success rate sc_start4(&p_sd->bl,SC_SKILLRATE_UP,100,TK_COUNTER,rate,0,0,skill_get_time(SG_FRIEND, 1)); } break; case AM_TWILIGHT2: //Twilight Pharmacy, requires Super Novice if ((p_sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE && sd->bl.m == p_sd->bl.m) return 1; break; case AM_TWILIGHT3: //Twilight Pharmacy, Requires Taekwon if ((p_sd->class_&MAPID_UPPERMASK) == MAPID_TAEKWON && sd->bl.m == p_sd->bl.m) return 1; break; } } return 0; }