diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-28 16:03:23 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-28 16:03:23 +0000 |
commit | 71c735ac06d62215df3dd6f33ec5ae38cd8397a2 (patch) | |
tree | 046c104b76c6929198d968bf8ca641eab5d2233f /src/map/mob.c | |
parent | 110493234092936699654cc74accd377b9fc1352 (diff) | |
download | hercules-71c735ac06d62215df3dd6f33ec5ae38cd8397a2.tar.gz hercules-71c735ac06d62215df3dd6f33ec5ae38cd8397a2.tar.bz2 hercules-71c735ac06d62215df3dd6f33ec5ae38cd8397a2.tar.xz hercules-71c735ac06d62215df3dd6f33ec5ae38cd8397a2.zip |
- Fixed exp bonuses applying twice for the job-exp
- Magic damage adjustment per number of hits is now performed before mdef reductions.
- @reloadbattleconf will now also update the ragsrvinfo table on the char-server.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8518 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.c')
-rw-r--r-- | src/map/mob.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/map/mob.c b/src/map/mob.c index 8c38374ef..3ceb8287c 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1781,6 +1781,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) int flag=1,zeny=0; unsigned int base_exp,job_exp; double per; //Your share of the mob's exp + double jper; //For the job-exp int bonus; //Bonus on top of your share. if (status_isdead(tmpbl[i]) || tmpbl[i]->m != md->bl.m) @@ -1814,11 +1815,11 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) zeny=(int) ((md->level+rand()%md->level)*per*bonus/100.); if(md->db->mexp > 0) zeny*=rand()%250; - } + + jper = per; if (map[md->bl.m].flag.nobaseexp) base_exp=0; - else { temp = bonus; //Do not alter bonus for the jExp section below. if (map[md->bl.m].bexp != 100) temp = map[md->bl.m].bexp*temp/100; @@ -1842,14 +1843,14 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) if (map[md->bl.m].jexp != 100) bonus = map[md->bl.m].jexp*bonus/100; if (bonus != 100) - per = per*bonus/100.; + jper = jper*bonus/100.; job_exp = md->db->job_exp; - if (job_exp*per > UINT_MAX) + if (job_exp*jper > UINT_MAX) job_exp = UINT_MAX; else - job_exp = (unsigned int)(job_exp*per); + job_exp = (unsigned int)(job_exp*jper); if (job_exp < 1) job_exp = 1; |