From b30258ea45f150bd1d55178de66e3853c7b6ece1 Mon Sep 17 00:00:00 2001 From: lemongrass3110 Date: Sun, 24 Mar 2013 20:44:38 +0000 Subject: [PATCH] Found an issue with pc_jobchange. Not a problem if you use the standard job changing actions, but if you switch jobs via @job command. Might be related to bugreport:7388 git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@17208 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/pc.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/map/pc.c b/src/map/pc.c index 6a4e8b012f..365a1617e8 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -7384,6 +7384,19 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper) pc_setglobalreg(sd, "REPRODUCE_SKILL_LV",0); } + // Give or reduce transcendent status points + if( (b_class&JOBL_UPPER) && !(sd->class_&JOBL_UPPER) ){ // Change from a non t class to a t class -> give points + sd->status.status_point += 52; + clif_updatestatus(sd,SP_STATUSPOINT); + }else if( !(b_class&JOBL_UPPER) && (sd->class_&JOBL_UPPER) ){ // Change from a t class to a non t class -> remove points + if( sd->status.status_point < 52 ){ + // The player already used his bonus points, so we have to reset his status points + pc_resetstate(sd); + } + sd->status.status_point -= 52; + clif_updatestatus(sd,SP_STATUSPOINT); + } + if ( (b_class&MAPID_UPPERMASK) != (sd->class_&MAPID_UPPERMASK) ) { //Things to remove when changing class tree. const int class_ = pc_class2idx(sd->status.class_); short id;