diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-02-10 04:06:03 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-02-10 04:06:03 +0000 |
commit | d92bb1109213e08b42b9f4103eabf1f6d52389a5 (patch) | |
tree | 17125cc33febbfcda3551959843c0547b597f1b5 /src/map/pc.c | |
parent | feb238739734f3679c872150a5cc8a641543d081 (diff) | |
download | hercules-d92bb1109213e08b42b9f4103eabf1f6d52389a5.tar.gz hercules-d92bb1109213e08b42b9f4103eabf1f6d52389a5.tar.bz2 hercules-d92bb1109213e08b42b9f4103eabf1f6d52389a5.tar.xz hercules-d92bb1109213e08b42b9f4103eabf1f6d52389a5.zip |
- Fixed setting setting SP_BASELEVEL
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5245 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 3b226c122..ab07bc3ad 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -5782,9 +5782,9 @@ int pc_setparam(struct map_session_data *sd,int type,int val) switch(type){
case SP_BASELEVEL:
- if ((val+ sd->status.base_level) > pc_maxbaselv(sd)) //Capping to max
- val = pc_maxbaselv(sd) - sd->status.base_level;
- if (val > (int)sd->status.base_level) {
+ if (val > pc_maxbaselv(sd)) //Capping to max
+ val = pc_maxbaselv(sd);
+ if (val > sd->status.base_level) {
for (i = 1; i <= (val - (int)sd->status.base_level); i++)
sd->status.status_point += (sd->status.base_level + i + 14) / 5 ;
}
@@ -5801,22 +5801,15 @@ int pc_setparam(struct map_session_data *sd,int type,int val) if (val >= (int)sd->status.job_level) {
if (val > pc_maxjoblv(sd)) val = pc_maxjoblv(sd);
sd->status.skill_point += (val-sd->status.job_level);
- sd->status.job_level = val;
- sd->status.job_exp = 0;
- clif_updatestatus(sd, SP_JOBLEVEL);
- clif_updatestatus(sd, SP_NEXTJOBEXP);
- clif_updatestatus(sd, SP_JOBEXP);
clif_updatestatus(sd, SP_SKILLPOINT);
- status_calc_pc(sd, 0);
clif_misceffect(&sd->bl, 1);
- } else {
- sd->status.job_level = val;
- sd->status.job_exp = 0;
- clif_updatestatus(sd, SP_JOBLEVEL);
- clif_updatestatus(sd, SP_NEXTJOBEXP);
- clif_updatestatus(sd, SP_JOBEXP);
- status_calc_pc(sd, 0);
}
+ sd->status.job_level = val;
+ sd->status.job_exp = 0;
+ clif_updatestatus(sd, SP_JOBLEVEL);
+ clif_updatestatus(sd, SP_NEXTJOBEXP);
+ clif_updatestatus(sd, SP_JOBEXP);
+ status_calc_pc(sd, 0);
clif_updatestatus(sd,type);
break;
case SP_SKILLPOINT:
|