diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-10-07 06:38:10 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-10-07 06:38:10 +0000 |
commit | eeca8349fac28ebbda94ea7093d6bc9d4161abae (patch) | |
tree | 3a4536dac83179559200d5891a029fee58afafe2 /src/map | |
parent | d4093db5208073bfde366fd225ba05408da4a1b7 (diff) | |
download | hercules-eeca8349fac28ebbda94ea7093d6bc9d4161abae.tar.gz hercules-eeca8349fac28ebbda94ea7093d6bc9d4161abae.tar.bz2 hercules-eeca8349fac28ebbda94ea7093d6bc9d4161abae.tar.xz hercules-eeca8349fac28ebbda94ea7093d6bc9d4161abae.zip |
Fixed the 'exp calculation overflow fix' from r10291 which wasn't really working properly.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13265 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/pc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index f01451c99..ca395d955 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -4334,7 +4334,7 @@ static void pc_calcexp(struct map_session_data *sd, unsigned int *base_exp, unsi if (sd->expaddrace[status->race]) bonus += sd->expaddrace[status->race]; bonus += sd->expaddrace[status->mode&MD_BOSS?RC_BOSS:RC_NONBOSS]; - + if (battle_config.pk_mode && (int)(status_get_lv(src) - sd->status.base_level) >= 20) bonus += 15; // pk_mode additional exp if monster >20 levels [Valaris] @@ -4344,9 +4344,9 @@ static void pc_calcexp(struct map_session_data *sd, unsigned int *base_exp, unsi if (!bonus) return; - - *base_exp += (unsigned int) cap_value((double)*base_exp * bonus/100., 1, UINT_MAX); - *job_exp += (unsigned int) cap_value((double)*job_exp * bonus/100., 1, UINT_MAX); + + *base_exp = (unsigned int) cap_value(*base_exp + (double)*base_exp * bonus/100., 1, UINT_MAX); + *job_exp = (unsigned int) cap_value(*job_exp + (double)*job_exp * bonus/100., 1, UINT_MAX); return; } |