summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-15 14:58:04 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-15 14:58:04 +0000
commitee8093a79840edc7169291ca69ac3d256190fc83 (patch)
tree2a569814a328e229bfaa4f72ea38e5bc3b11c80f /src/map/mob.c
parent98f7e84cd7692c8cc982ea15ce26c4d546e705b5 (diff)
downloadhercules-ee8093a79840edc7169291ca69ac3d256190fc83.tar.gz
hercules-ee8093a79840edc7169291ca69ac3d256190fc83.tar.bz2
hercules-ee8093a79840edc7169291ca69ac3d256190fc83.tar.xz
hercules-ee8093a79840edc7169291ca69ac3d256190fc83.zip
- Added battle config options item_rate_adddrop, item_drop_add_min and item_drop_add_max to control drop rate of card-acquired loot bonuses.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5610 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index 6813d760e..911841cb1 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -2712,10 +2712,15 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
sd->add_drop[i].race & 1<<(mode&MD_BOSS?10:11))
{
//check if the bonus item drop rate should be multiplied with mob level/10 [Lupus]
- if(sd->add_drop[i].rate<0)
+ if(sd->add_drop[i].rate<0) {
//it's negative, then it should be multiplied. e.g. for Mimic,Myst Case Cards, etc
// rate = base_rate * (mob_level/10) + 1
drop_rate = -sd->add_drop[i].rate*(md->level/10)+1;
+ if (drop_rate < battle_config.item_drop_adddrop_min)
+ drop_rate = battle_config.item_drop_adddrop_min;
+ else if (drop_rate > battle_config.item_drop_adddrop_max)
+ drop_rate = battle_config.item_drop_adddrop_max;
+ }
else
//it's positive, then it goes as it is
drop_rate = sd->add_drop[i].rate;