summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/battle.c26
-rw-r--r--src/map/mob.c5
2 files changed, 16 insertions, 15 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index a0ca94e75..a8ba51b69 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3571,19 +3571,19 @@ static const struct _battle_data {
{ "item_drop_add_max", &battle_config.item_drop_adddrop_max, 10000, 1, 10000, },
{ "item_drop_treasure_min", &battle_config.item_drop_treasure_min, 1, 1, 10000, },
{ "item_drop_treasure_max", &battle_config.item_drop_treasure_max, 10000, 1, 10000, },
- { "item_rate_mvp", &battle_config.item_rate_mvp, 100, 0, INT_MAX, },
- { "item_rate_common", &battle_config.item_rate_common, 100, 0, INT_MAX, },
- { "item_rate_common_boss", &battle_config.item_rate_common_boss, 100, 0, INT_MAX, },
- { "item_rate_equip", &battle_config.item_rate_equip, 100, 0, INT_MAX, },
- { "item_rate_equip_boss", &battle_config.item_rate_equip_boss, 100, 0, INT_MAX, },
- { "item_rate_card", &battle_config.item_rate_card, 100, 0, INT_MAX, },
- { "item_rate_card_boss", &battle_config.item_rate_card_boss, 100, 0, INT_MAX, },
- { "item_rate_heal", &battle_config.item_rate_heal, 100, 0, INT_MAX, },
- { "item_rate_heal_boss", &battle_config.item_rate_heal_boss, 100, 0, INT_MAX, },
- { "item_rate_use", &battle_config.item_rate_use, 100, 0, INT_MAX, },
- { "item_rate_use_boss", &battle_config.item_rate_use_boss, 100, 0, INT_MAX, },
- { "item_rate_adddrop", &battle_config.item_rate_adddrop, 100, 0, INT_MAX, },
- { "item_rate_treasure", &battle_config.item_rate_treasure, 100, 0, INT_MAX, },
+ { "item_rate_mvp", &battle_config.item_rate_mvp, 100, 0, 10000, },
+ { "item_rate_common", &battle_config.item_rate_common, 100, 0, 10000, },
+ { "item_rate_common_boss", &battle_config.item_rate_common_boss, 100, 0, 10000, },
+ { "item_rate_equip", &battle_config.item_rate_equip, 100, 0, 10000, },
+ { "item_rate_equip_boss", &battle_config.item_rate_equip_boss, 100, 0, 10000, },
+ { "item_rate_card", &battle_config.item_rate_card, 100, 0, 10000, },
+ { "item_rate_card_boss", &battle_config.item_rate_card_boss, 100, 0, 10000, },
+ { "item_rate_heal", &battle_config.item_rate_heal, 100, 0, 10000, },
+ { "item_rate_heal_boss", &battle_config.item_rate_heal_boss, 100, 0, 10000, },
+ { "item_rate_use", &battle_config.item_rate_use, 100, 0, 10000, },
+ { "item_rate_use_boss", &battle_config.item_rate_use_boss, 100, 0, 10000, },
+ { "item_rate_adddrop", &battle_config.item_rate_adddrop, 100, 0, 10000, },
+ { "item_rate_treasure", &battle_config.item_rate_treasure, 100, 0, 10000, },
{ "prevent_logout", &battle_config.prevent_logout, 10000, 0, 60000, },
{ "alchemist_summon_reward", &battle_config.alchemist_summon_reward, 1, 0, 2, },
{ "drops_by_luk", &battle_config.drops_by_luk, 0, 0, INT_MAX, },
diff --git a/src/map/mob.c b/src/map/mob.c
index c9b77475e..086c85380 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -3170,8 +3170,9 @@ static unsigned int mob_drop_adjust(int rate, int rate_adjust, unsigned short ra
//Equation: Droprate(x,y) = x * (5 - log(x)) ^ (ln(y) / ln(5))
//x is the normal Droprate, y is the Modificator.
rate = (int)(rate * pow((5.0 - log10(rate)), (log(rate_adjust/100.) / log(5.0))) + 0.5);
- else //Classical linear rate adjustment.
- rate = rate*rate_adjust/100;
+ else
+ //Classical linear rate adjustment.
+ rate = rate * rate_adjust/100;
return cap_value(rate,rate_min,rate_max);
}