瀏覽代碼

Follow up to b307ae8
* MD_FIXED_ITEMDROP only applies to renewal level penalty mod.

aleos89 9 年之前
父節點
當前提交
95a8d656a2
共有 2 個文件被更改,包括 27 次插入29 次删除
  1. 26 28
      src/map/mob.c
  2. 1 1
      src/map/pc.c

+ 26 - 28
src/map/mob.c

@@ -2459,35 +2459,33 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
 				drop_rate = 1;
 			}
 
-			if (!(md->status.mode&MD_FIXED_ITEMDROP)) {
-				// change drops depending on monsters size [Valaris]
-				if (battle_config.mob_size_influence) {
-					if (md->special_state.size == SZ_MEDIUM && drop_rate >= 2)
-						drop_rate /= 2;
-					else if( md->special_state.size == SZ_BIG)
-						drop_rate *= 2;
-				}
+			// change drops depending on monsters size [Valaris]
+			if (battle_config.mob_size_influence) {
+				if (md->special_state.size == SZ_MEDIUM && drop_rate >= 2)
+					drop_rate /= 2;
+				else if( md->special_state.size == SZ_BIG)
+					drop_rate *= 2;
+			}
 
-				if (src) {
-					//Drops affected by luk as a fixed increase [Valaris]
-					if (battle_config.drops_by_luk)
-						drop_rate += status_get_luk(src)*battle_config.drops_by_luk/100;
-					//Drops affected by luk as a % increase [Skotlex]
-					if (battle_config.drops_by_luk2)
-						drop_rate += (int)(0.5+drop_rate*status_get_luk(src)*battle_config.drops_by_luk2/10000.);
-				}
-				if (sd && battle_config.pk_mode &&
-					(int)(md->level - sd->status.base_level) >= 20)
-					drop_rate = (int)(drop_rate*1.25); // pk_mode increase drops if 20 level difference [Valaris]
-
-				// Increase drop rate if user has SC_ITEMBOOST
-				if (sd && sd->sc.data[SC_ITEMBOOST]) // now rig the drop rate to never be over 90% unless it is originally >90%.
-					drop_rate = max(drop_rate,cap_value((int)(0.5+drop_rate*(sd->sc.data[SC_ITEMBOOST]->val1)/100.),0,9000));
-				// Increase item drop rate for VIP.
-				if (battle_config.vip_drop_increase && (sd && pc_isvip(sd))) {
-					drop_rate += (int)(0.5 + (drop_rate * battle_config.vip_drop_increase) / 100);
-					drop_rate = min(drop_rate,10000); //cap it to 100%
-				}
+			if (src) {
+				//Drops affected by luk as a fixed increase [Valaris]
+				if (battle_config.drops_by_luk)
+					drop_rate += status_get_luk(src)*battle_config.drops_by_luk/100;
+				//Drops affected by luk as a % increase [Skotlex]
+				if (battle_config.drops_by_luk2)
+					drop_rate += (int)(0.5+drop_rate*status_get_luk(src)*battle_config.drops_by_luk2/10000.);
+			}
+			if (sd && battle_config.pk_mode &&
+				(int)(md->level - sd->status.base_level) >= 20)
+				drop_rate = (int)(drop_rate*1.25); // pk_mode increase drops if 20 level difference [Valaris]
+
+			// Increase drop rate if user has SC_ITEMBOOST
+			if (sd && sd->sc.data[SC_ITEMBOOST]) // now rig the drop rate to never be over 90% unless it is originally >90%.
+				drop_rate = max(drop_rate,cap_value((int)(0.5+drop_rate*(sd->sc.data[SC_ITEMBOOST]->val1)/100.),0,9000));
+			// Increase item drop rate for VIP.
+			if (battle_config.vip_drop_increase && (sd && pc_isvip(sd))) {
+				drop_rate += (int)(0.5 + (drop_rate * battle_config.vip_drop_increase) / 100);
+				drop_rate = min(drop_rate,10000); //cap it to 100%
 			}
 #ifdef RENEWAL_DROP
 			if( drop_modifier != 100 ) {

+ 1 - 1
src/map/pc.c

@@ -10400,7 +10400,7 @@ int pc_level_penalty_mod(struct map_session_data *sd, int mob_level, uint32 mob_
 
 	nullpo_ret(sd);
 
-	if (type == 2 && mode&MD_FIXED_ITEMDROP)
+	if (type == 2 && (mode&MD_FIXED_ITEMDROP))
 		return rate;
 
 	diff = mob_level - sd->status.base_level;