summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
authorL0ne_W0lf <L0ne_W0lf@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-06-10 15:49:18 +0000
committerL0ne_W0lf <L0ne_W0lf@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-06-10 15:49:18 +0000
commitc405daa5223c0f6d0f74bf98a89d918263d4de08 (patch)
treee1a206fe09df961f0b66c690711bacaeacbd4876 /src/map/mob.c
parent3afe53b2e0037df26ade1057f4e6064b90376f74 (diff)
downloadhercules-c405daa5223c0f6d0f74bf98a89d918263d4de08.tar.gz
hercules-c405daa5223c0f6d0f74bf98a89d918263d4de08.tar.bz2
hercules-c405daa5223c0f6d0f74bf98a89d918263d4de08.tar.xz
hercules-c405daa5223c0f6d0f74bf98a89d918263d4de08.zip
* Updated SC_ITEMBOOST to work similar to how it used to in r11351.
- Will not boost drop rates past 90%, but ignores those already greater than. - Now uses val2 in the sc_start as the drop rate modifier, see item_db for example. * Corrected number of slots on several newer items. * Added HE Bubble Gum and adjusted existing gum bonuses. * Removed monster chat for porings npc_emotion skill use. * Updated several modes for monsters episode 13.1+ git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14336 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index 0bf07003d..b41f0db66 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -2219,12 +2219,13 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
(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));
+
// attempt to drop the item
if (rand() % 10000 >= drop_rate)
- { // Double try by Bubble Gum
- if (!(mvp_sd && mvp_sd->sc.data[SC_ITEMBOOST] && rand() % 10000 < drop_rate))
continue;
- }
ditem = mob_setdropitem(md->db->dropitem[i].nameid, 1);