summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-10-30 18:42:58 -0200
committershennetsind <ind@henn.et>2013-10-30 18:42:58 -0200
commitc159a3c4ffd414d7423b3504a282cce1111b7874 (patch)
tree0d7051a90bcd0b9ba229ff16d52a9dea0bbee743 /src/map/mob.c
parent7fefefdde386f13f8fefa8db3ffe9ed140c8aa10 (diff)
downloadhercules-c159a3c4ffd414d7423b3504a282cce1111b7874.tar.gz
hercules-c159a3c4ffd414d7423b3504a282cce1111b7874.tar.bz2
hercules-c159a3c4ffd414d7423b3504a282cce1111b7874.tar.xz
hercules-c159a3c4ffd414d7423b3504a282cce1111b7874.zip
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 <ind@henn.et>
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c6
1 files changed, 6 insertions, 0 deletions
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;