From e6d41bc71fcc2ddc2e9370f5325f67c07d347ccf Mon Sep 17 00:00:00 2001 From: shennetsind Date: Wed, 31 Oct 2012 19:41:20 +0000 Subject: Fixed bugreport:6838 pc_level_penalty_mod would return 0 when no player was attached to the kill and scream a nullpo report at console. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16853 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/mob.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/map/mob.c') diff --git a/src/map/mob.c b/src/map/mob.c index ddb138d68..e423f7548 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -2326,7 +2326,10 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) struct item_data* it = NULL; int drop_rate; #ifdef RENEWAL_DROP - int drop_modifier = pc_level_penalty_mod(mvp_sd?mvp_sd:second_sd?second_sd:third_sd, md, 2); + int drop_modifier = mvp_sd ? pc_level_penalty_mod(mvp_sd, md, 2) : + second_sd ? pc_level_penalty_mod(second_sd, md, 2): + third_sd ? pc_level_penalty_mod(third_sd, md, 2) : + 100;/* no player was attached, we dont use any modifier (100 = rates are not touched) */ #endif dlist->m = md->bl.m; dlist->x = md->bl.x; -- cgit v1.2.3-60-g2f50