summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-06-12 01:08:05 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-06-12 01:08:05 +0000
commit9cf756c11d39101b139ed585e4d5891768a20a45 (patch)
tree2814272466940688dd18245a689fe4a9c7438eae /src/map/mob.c
parent49586af4b75b96010380576fe9ce0a9b67a83ac2 (diff)
downloadhercules-9cf756c11d39101b139ed585e4d5891768a20a45.tar.gz
hercules-9cf756c11d39101b139ed585e4d5891768a20a45.tar.bz2
hercules-9cf756c11d39101b139ed585e4d5891768a20a45.tar.xz
hercules-9cf756c11d39101b139ed585e4d5891768a20a45.zip
Improved bonus-adding processes by no longer having to add it to the zero'd memset bullshit, replaced it by moving the first set of bonus into its own struct and simply zeroing the struct prior to recalc.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16272 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index d7e94d0d9..8924ae6eb 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -2427,9 +2427,8 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
}
// process script-granted zeny bonus (get_zeny_num) [Skotlex]
- if(sd->get_zeny_num && rnd()%100 < sd->get_zeny_rate)
- {
- i = sd->get_zeny_num > 0?sd->get_zeny_num:-md->level*sd->get_zeny_num;
+ if( sd->bonus.get_zeny_num && rnd()%100 < sd->bonus.get_zeny_rate ) {
+ i = sd->bonus.get_zeny_num > 0 ? sd->bonus.get_zeny_num : -md->level * sd->bonus.get_zeny_num;
if (!i) i = 1;
pc_getzeny(sd, 1+rnd()%i);
}