diff options
author | shennetsind <ind@henn.et> | 2013-04-11 16:05:27 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-04-11 16:05:27 -0300 |
commit | c2797dc5080c0b65dee81d3ad7770208daf6f7d9 (patch) | |
tree | 9c34e70f352077b682a13273e2544dd2a54c9e70 /src/map/party.c | |
parent | 14a406ee0e5c6ba25539cc98f27ff9c2b8047e2e (diff) | |
download | hercules-c2797dc5080c0b65dee81d3ad7770208daf6f7d9.tar.gz hercules-c2797dc5080c0b65dee81d3ad7770208daf6f7d9.tar.bz2 hercules-c2797dc5080c0b65dee81d3ad7770208daf6f7d9.tar.xz hercules-c2797dc5080c0b65dee81d3ad7770208daf6f7d9.zip |
Fixed renewal_exp
modifier was affecting party members as well as self instead of only self.
Modified version from a43cf4c84488d343a74e75722fee9a46a9dddebc
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/party.c')
-rw-r--r-- | src/map/party.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/map/party.c b/src/map/party.c index f69a843fc..0d1048699 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -910,6 +910,9 @@ int party_exp_share(struct party_data* p, struct block_list* src, unsigned int b { struct map_session_data* sd[MAX_PARTY]; unsigned int i, c; +#ifdef RENEWAL_EXP + unsigned int job_exp_bonus, base_exp_bonus; +#endif nullpo_ret(p); @@ -926,8 +929,7 @@ int party_exp_share(struct party_data* p, struct block_list* src, unsigned int b job_exp/=c; zeny/=c; - if (battle_config.party_even_share_bonus && c > 1) - { + if (battle_config.party_even_share_bonus && c > 1) { double bonus = 100 + battle_config.party_even_share_bonus*(c-1); if (base_exp) base_exp = (unsigned int) cap_value(base_exp * bonus/100, 0, UINT_MAX); @@ -937,12 +939,17 @@ int party_exp_share(struct party_data* p, struct block_list* src, unsigned int b zeny = (unsigned int) cap_value(zeny * bonus/100, INT_MIN, INT_MAX); } +#ifdef RENEWAL_EXP + base_exp_bonus = base_exp; + job_exp_bonus = job_exp; +#endif + for (i = 0; i < c; i++) { #ifdef RENEWAL_EXP if( !(src && src->type == BL_MOB && ((TBL_MOB*)src)->db->mexp) ){ int rate = pc_level_penalty_mod(sd[i], (TBL_MOB*)src, 1); - base_exp = (unsigned int)cap_value(base_exp * rate / 100, 1, UINT_MAX); - job_exp = (unsigned int)cap_value(job_exp * rate / 100, 1, UINT_MAX); + base_exp = (unsigned int)cap_value(base_exp_bonus * rate / 100, 1, UINT_MAX); + job_exp = (unsigned int)cap_value(job_exp_bonus * rate / 100, 1, UINT_MAX); } #endif pc_gainexp(sd[i], src, base_exp, job_exp, false); |