Follow up to b307ae8

* MD_FIXED_ITEMDROP only applies to renewal level penalty mod.
This commit is contained in:
aleos89 2016-02-13 08:27:19 -05:00
parent 719c43fb07
commit 95a8d656a2
2 changed files with 26 additions and 28 deletions

View File

@ -2459,35 +2459,33 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
drop_rate = 1; drop_rate = 1;
} }
if (!(md->status.mode&MD_FIXED_ITEMDROP)) { // change drops depending on monsters size [Valaris]
// change drops depending on monsters size [Valaris] if (battle_config.mob_size_influence) {
if (battle_config.mob_size_influence) { if (md->special_state.size == SZ_MEDIUM && drop_rate >= 2)
if (md->special_state.size == SZ_MEDIUM && drop_rate >= 2) drop_rate /= 2;
drop_rate /= 2; else if( md->special_state.size == SZ_BIG)
else if( md->special_state.size == SZ_BIG) drop_rate *= 2;
drop_rate *= 2; }
}
if (src) { if (src) {
//Drops affected by luk as a fixed increase [Valaris] //Drops affected by luk as a fixed increase [Valaris]
if (battle_config.drops_by_luk) if (battle_config.drops_by_luk)
drop_rate += status_get_luk(src)*battle_config.drops_by_luk/100; drop_rate += status_get_luk(src)*battle_config.drops_by_luk/100;
//Drops affected by luk as a % increase [Skotlex] //Drops affected by luk as a % increase [Skotlex]
if (battle_config.drops_by_luk2) if (battle_config.drops_by_luk2)
drop_rate += (int)(0.5+drop_rate*status_get_luk(src)*battle_config.drops_by_luk2/10000.); drop_rate += (int)(0.5+drop_rate*status_get_luk(src)*battle_config.drops_by_luk2/10000.);
} }
if (sd && battle_config.pk_mode && if (sd && battle_config.pk_mode &&
(int)(md->level - sd->status.base_level) >= 20) (int)(md->level - sd->status.base_level) >= 20)
drop_rate = (int)(drop_rate*1.25); // pk_mode increase drops if 20 level difference [Valaris] drop_rate = (int)(drop_rate*1.25); // pk_mode increase drops if 20 level difference [Valaris]
// Increase drop rate if user has SC_ITEMBOOST // 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%. 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)); 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. // Increase item drop rate for VIP.
if (battle_config.vip_drop_increase && (sd && pc_isvip(sd))) { 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 += (int)(0.5 + (drop_rate * battle_config.vip_drop_increase) / 100);
drop_rate = min(drop_rate,10000); //cap it to 100% drop_rate = min(drop_rate,10000); //cap it to 100%
}
} }
#ifdef RENEWAL_DROP #ifdef RENEWAL_DROP
if( drop_modifier != 100 ) { if( drop_modifier != 100 ) {

View File

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