瀏覽代碼

Fixed an issue with status point reset (#5640)

Only applies if you do not use the status point table.
Additionally replaced the hardcoded value with the one from the configuration.
While at it added a missing else.

Fixes #5634

Thanks to @zeffen
Lemongrass3110 4 年之前
父節點
當前提交
f8e703ef68
共有 1 個文件被更改,包括 8 次插入3 次删除
  1. 8 3
      src/map/pc.cpp

+ 8 - 3
src/map/pc.cpp

@@ -7976,7 +7976,7 @@ int pc_resetstate(struct map_session_data* sd)
 			return 0;
 			return 0;
 		}
 		}
 
 
-		sd->status.status_point = statp[sd->status.base_level] + ( sd->class_&JOBL_UPPER ? 52 : 0 ); // extra 52+48=100 stat points
+		sd->status.status_point = statp[sd->status.base_level];
 	}
 	}
 	else
 	else
 	{
 	{
@@ -7991,6 +7991,10 @@ int pc_resetstate(struct map_session_data* sd)
 		sd->status.status_point+=add;
 		sd->status.status_point+=add;
 	}
 	}
 
 
+	if( ( sd->class_&JOBL_UPPER ) != 0 ){
+		sd->status.status_point += battle_config.transcendent_status_points;
+	}
+
 	pc_setstat(sd, SP_STR, 1);
 	pc_setstat(sd, SP_STR, 1);
 	pc_setstat(sd, SP_AGI, 1);
 	pc_setstat(sd, SP_AGI, 1);
 	pc_setstat(sd, SP_VIT, 1);
 	pc_setstat(sd, SP_VIT, 1);
@@ -9403,9 +9407,10 @@ bool pc_jobchange(struct map_session_data *sd,int job, char upper)
 		if( sd->status.status_point < battle_config.transcendent_status_points ){
 		if( sd->status.status_point < battle_config.transcendent_status_points ){
 			// The player already used his bonus points, so we have to reset his status points
 			// The player already used his bonus points, so we have to reset his status points
 			pc_resetstate(sd);
 			pc_resetstate(sd);
+		}else{
+			sd->status.status_point -= battle_config.transcendent_status_points;
+			clif_updatestatus(sd,SP_STATUSPOINT);
 		}
 		}
-		sd->status.status_point -= battle_config.transcendent_status_points;
-		clif_updatestatus(sd,SP_STATUSPOINT);
 	}
 	}
 
 
 	if ( (b_class&MAPID_UPPERMASK) != (sd->class_&MAPID_UPPERMASK) ) { //Things to remove when changing class tree.
 	if ( (b_class&MAPID_UPPERMASK) != (sd->class_&MAPID_UPPERMASK) ) { //Things to remove when changing class tree.