summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authoreuphyy <euphyy@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-12-27 06:11:18 +0000
committereuphyy <euphyy@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-12-27 06:11:18 +0000
commit847a41f41dc4296c8c2aa42a79c23336f55e665b (patch)
tree4010b867b2060861d519babb6da86c0879825ff9 /src/map/pc.c
parentf4867954028b6c7b4d37c9860696578b27d6dbd1 (diff)
downloadhercules-847a41f41dc4296c8c2aa42a79c23336f55e665b.tar.gz
hercules-847a41f41dc4296c8c2aa42a79c23336f55e665b.tar.bz2
hercules-847a41f41dc4296c8c2aa42a79c23336f55e665b.tar.xz
hercules-847a41f41dc4296c8c2aa42a79c23336f55e665b.zip
> Follow-up r17048:
- Renamed 'useskilltopc' to 'npcskill'; - Removed cast time from NPC objects, code by mkbu95 (suspected official behavior); - Documented 'npcskill'; - Replaced all instances in scripts. * Fixed max level bypass, code by malufett (bugreport:5800). * Updated Malangdo spawns to official. * Some standardization of npc/quests/first_class/. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@17049 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 017944942..378c44ab5 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -7231,6 +7231,17 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper)
sd->class_ = (unsigned short)b_class;
sd->status.job_level=1;
sd->status.job_exp=0;
+
+ if (sd->status.base_level > pc_maxbaselv(sd)) {
+ sd->status.base_level = pc_maxbaselv(sd);
+ sd->status.base_exp=0;
+ pc_resetstate(sd);
+ clif_updatestatus(sd,SP_STATUSPOINT);
+ clif_updatestatus(sd,SP_BASELEVEL);
+ clif_updatestatus(sd,SP_BASEEXP);
+ clif_updatestatus(sd,SP_NEXTBASEEXP);
+ }
+
clif_updatestatus(sd,SP_JOBLEVEL);
clif_updatestatus(sd,SP_JOBEXP);
clif_updatestatus(sd,SP_NEXTJOBEXP);