From c159a3c4ffd414d7423b3504a282cce1111b7874 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Wed, 30 Oct 2013 18:42:58 -0200 Subject: Account-wide Exp/Drop/Death Modifiers Attempting to mimic the official as suggested in http://hercules.ws/board/topic/250-official-vip-system/ The variables can be read and modified thru scripting as well as sql, the patch introduces 3 new pc-arams 'ModExp','ModDrop' and 'ModDeath' for that purpose. The OnLogin modifier display is not the real deal though -- wasn't able to get it to output properly (though that might have been my client files failt) Up for review. Signed-off-by: shennetsind --- src/map/mob.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/map/mob.c') diff --git a/src/map/mob.c b/src/map/mob.c index 97f8ea6c1..778fc1dfa 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -2332,6 +2332,12 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) { drop_rate = 1; } #endif + if( sd && sd->status.mod_drop != 100 ) { + drop_rate = drop_rate * sd->status.mod_drop / 100; + if( drop_rate < 1 ) + drop_rate = 1; + } + // attempt to drop the item if (rnd() % 10000 >= drop_rate) continue; -- cgit v1.2.3-60-g2f50