* Resolves required equipment check needing all equipment given to be equipped rather than just one. Thanks to @Paoly28.
This commit is contained in:
aleos89 2015-12-11 08:47:32 -05:00
parent b2b37fc3ae
commit 27e90f8f45
2 changed files with 8 additions and 5 deletions

View File

@ -5628,11 +5628,14 @@ short pc_checkequip(struct map_session_data *sd,int pos)
* @max : see pc.h enum equip_index for @min to ?
* -return true,false
*------------------------------------------*/
bool pc_checkequip2(struct map_session_data *sd, unsigned short nameid, int min, int max){
bool pc_checkequip2(struct map_session_data *sd, unsigned short nameid, int min, int max)
{
int i;
for(i=min;i<max;i++){
if(equip_pos[i]){
for(i = min; i < max; i++) {
if(equip_pos[i]) {
int idx = sd->equip_index[i];
if (sd->status.inventory[idx].nameid == nameid)
return true;
}

View File

@ -15188,8 +15188,8 @@ bool skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_i
clif_skill_fail(sd,skill_id,USESKILL_FAIL_THIS_WEAPON,0);
return false;
}
continue;
}
} else
break; // Wearing an applicable item.
}
}