From ae8ba784493e6ca191921e27deedad5253bbbc57 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 Date: Sat, 5 Mar 2016 13:35:51 +0100 Subject: [PATCH] Fixed multi level up exploit, which allowed going over the defined maximum levels Fixed #1010 --- src/map/pc.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/map/pc.c b/src/map/pc.c index 0e690183dd..80365702af 100755 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -6267,6 +6267,10 @@ int pc_checkbaselevelup(struct map_session_data *sd) { sd->status.base_level ++; sd->status.status_point += next; + if( pc_is_maxbaselv(sd) ){ + sd->status.base_exp = u32min(sd->status.base_exp,MAX_LEVEL_BASE_EXP); + break; + } } while ((next=pc_nextbaseexp(sd)) > 0 && sd->status.base_exp >= next); if (battle_config.pet_lv_rate && sd->pd) // update pet's level @@ -6329,6 +6333,10 @@ int pc_checkjoblevelup(struct map_session_data *sd) sd->status.job_level ++; sd->status.skill_point ++; + if( pc_is_maxjoblv(sd) ){ + sd->status.job_exp = u32min(sd->status.job_exp,MAX_LEVEL_JOB_EXP); + break; + } } while ((next=pc_nextjobexp(sd)) > 0 && sd->status.job_exp >= next); clif_updatestatus(sd,SP_JOBLEVEL);