Fixed IgnoreDefClassRate check (fixes #1702)

* The item bonus will now properly check for a valid Class rather than a valid Race.
* Added IgnoreDefRaceRate and IgnoreDefClassRate to the item_bonus documentation.
Thanks to @Tokeiburu!
This commit is contained in:
aleos89 2016-11-08 11:07:08 -05:00
parent 06aec011c8
commit 623d845717
2 changed files with 3 additions and 1 deletions

View File

@ -276,9 +276,11 @@ bonus bIgnoreDefRace,r; Disregard DEF against enemies of race r
bonus2 bIgnoreDefRaceRate,r,n; Disregard n% of the target's DEF if the target belongs to race r
bonus bIgnoreDefClass,c; Disregard DEF against enemies of class c
bonus bIgnoreMDefRace,r; Disregard MDEF against enemies of race r
bonus2 bIgnoreDefRaceRate,r,n; Disregard n% of the target's DEF if the target belongs to race r
bonus2 bIgnoreMdefRaceRate,r,n; Disregard n% of the target's MDEF if the target belongs to race r
bonus2 bIgnoreMdefRace2Rate,mr,n; Disregard n% of the target's MDEF if the target belongs to monster race mr
bonus bIgnoreMDefEle,e; Disregard MDEF against enemies of element e
bonus2 bIgnoreDefClassRate,c,n; Disregard n% of the target's DEF if the target belongs to class c
bonus2 bIgnoreMdefClassRate,c,n; Disregard n% of the target's MDEF if the target belongs to class c
Experience

View File

@ -3553,7 +3553,7 @@ void pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
sd->ignore_def_by_race[type2] += val;
break;
case SP_IGNORE_DEF_CLASS_RATE: // bonus2 bIgnoreDefClassRate,r,n;
PC_BONUS_CHK_RACE(type2, SP_IGNORE_DEF_CLASS_RATE);
PC_BONUS_CHK_CLASS(type2, SP_IGNORE_DEF_CLASS_RATE);
if (sd->state.lr_flag != 2)
sd->ignore_def_by_class[type2] += val;
break;