From 79f89b00e06f7878797d3b9033ae178e18b9277a Mon Sep 17 00:00:00 2001 From: skotlex Date: Mon, 29 May 2006 20:20:42 +0000 Subject: - Fixed pc_gainexp resetting your exp to 0 rather than adding it in... -.- git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6828 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/mob.c | 2 +- src/map/pc.c | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/map/mob.c b/src/map/mob.c index 677e7fbd3..9b18dcd15 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1791,7 +1791,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) if(sd) { if (sd->expaddrace[status->race]) bonus += sd->expaddrace[status->race]; - bonus += sd->expaddrace[status->mode&MD_BOSS?10:11]; + bonus += sd->expaddrace[status->mode&MD_BOSS?RC_BOSS:RC_NONBOSS]; } if (battle_config.pk_mode && (int)(md->db->lv - tmpsd[i]->status.base_level) >= 20) //Needed due to unsigned checks diff --git a/src/map/pc.c b/src/map/pc.c index 21ed024cf..1d5cd2d28 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -3843,10 +3843,8 @@ int pc_gainexp(struct map_session_data *sd,unsigned int base_exp,unsigned int jo } //Overflow checks... think we'll ever really need'em? [Skotlex] - if (base_exp > 0 && sd->status.base_exp > UINT_MAX - base_exp) + if (base_exp && sd->status.base_exp > UINT_MAX - base_exp) sd->status.base_exp = UINT_MAX; - else if (sd->status.base_exp > base_exp) - sd->status.base_exp = 0; else sd->status.base_exp += base_exp; @@ -3854,11 +3852,8 @@ int pc_gainexp(struct map_session_data *sd,unsigned int base_exp,unsigned int jo clif_updatestatus(sd,SP_BASEEXP); - //Overflow checks... think we'll ever really need'em? [Skotlex] if (job_exp > 0 && sd->status.job_exp > UINT_MAX - job_exp) sd->status.job_exp = UINT_MAX; - else if (sd->status.job_exp > job_exp) - sd->status.job_exp = 0; else sd->status.job_exp += job_exp; -- cgit v1.2.3-70-g09d2