summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index 01679708b..1802500cc 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -2033,9 +2033,13 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
}
}
- // process script-granted zeny bonus (get_zeny_num per level +/-10%) [Skotlex]
+ // process script-granted zeny bonus (get_zeny_num) [Skotlex]
if(sd->get_zeny_num && rand()%100 < sd->get_zeny_rate)
- pc_getzeny(sd,md->level*sd->get_zeny_num*(90+rand()%21)/100);
+ {
+ i = sd->get_zeny_num > 0?sd->get_zeny_num:-md->level*sd->get_zeny_num;
+ if (!i) i = 1;
+ pc_getzeny(sd, 1+rand()%i);
+ }
}
// process items looted by the mob