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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index 84764627e..2d10dc61e 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -1824,9 +1824,11 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
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
+ else {
//eAthena's exp formula based on max hp.
per = (double)md->dmglog[i].dmg/(double)status->max_hp;
+ if (per > 2) per = 2; // prevents unlimited exp gain
+ }
if (count>1 && battle_config.exp_bonus_attacker) {
//Exp bonus per additional attacker.