浏览代码

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!

aleos89 8 年之前
父节点
当前提交
623d845717
共有 2 个文件被更改,包括 3 次插入1 次删除
  1. 2 0
      doc/item_bonus.txt
  2. 1 1
      src/map/pc.c

+ 2 - 0
doc/item_bonus.txt

@@ -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

+ 1 - 1
src/map/pc.c

@@ -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;