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, 5 insertions, 3 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index f564878ea..677e7fbd3 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -1768,10 +1768,12 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
double per; //Your share of the mob's exp
int bonus; //Bonus on top of your share.
- if (battle_config.exp_calc_type) // eAthena's exp formula based on max hp.
- per = (double)md->dmglog[i].dmg/(double)status->max_hp;
- else //jAthena's exp formula based on total damage.
+ if (!battle_config.exp_calc_type && md->tdmg)
+ //jAthena's exp formula based on total damage.
per = (double)md->dmglog[i].dmg/(double)md->tdmg;
+ else
+ //eAthena's exp formula based on max hp.
+ per = (double)md->dmglog[i].dmg/(double)status->max_hp;
if (count>1)
per *= (9.+(double)((count > 6)? 6:count))/10.; //attackers count bonus.