diff options
author | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-10-31 19:41:20 +0000 |
---|---|---|
committer | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-10-31 19:41:20 +0000 |
commit | e6d41bc71fcc2ddc2e9370f5325f67c07d347ccf (patch) | |
tree | 55c88930728aac4a95ecd6565954720f5816baca /src | |
parent | ad7fd8d73b392f6ca664437d54e4769e7c96b88a (diff) | |
download | hercules-e6d41bc71fcc2ddc2e9370f5325f67c07d347ccf.tar.gz hercules-e6d41bc71fcc2ddc2e9370f5325f67c07d347ccf.tar.bz2 hercules-e6d41bc71fcc2ddc2e9370f5325f67c07d347ccf.tar.xz hercules-e6d41bc71fcc2ddc2e9370f5325f67c07d347ccf.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/map/mob.c | 5 |
1 files changed, 4 insertions, 1 deletions
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; |