Browse Source

- Fixed the normalizing function not sending first classes back to novice if they do not have basic skill maxed.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9719 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex 18 years ago
parent
commit
76381834f5
2 changed files with 9 additions and 4 deletions
  1. 2 0
      Changelog-Trunk.txt
  2. 7 4
      src/map/pc.c

+ 2 - 0
Changelog-Trunk.txt

@@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
 2007/01/26
+	* Fixed the normalizing function not sending first classes back to novice
+	  if they do not have basic skill maxed.
 	* Added a wrapper to delete_timer so it prints out from where the
 	  invocation was done.
 	* Fixed Splash attacks consuming 2 ammo on each attack. [Skotlex]

+ 7 - 4
src/map/pc.c

@@ -1081,14 +1081,17 @@ int pc_calc_skilltree_normalize_job(struct map_session_data *sd) {
 	int skill_point;
 	int c = sd->class_;
 	
-	if (!battle_config.skillup_limit || !(sd->class_&JOBL_2) || (sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE)
-		return c; //Only Normalize non-first classes (and non-super novice)
+	if (!battle_config.skillup_limit)
+		return c;
 	
 	skill_point = pc_calc_skillpoint(sd);
 	if(pc_checkskill(sd, NV_BASIC) < 9) //Consider Novice Tree when you don't have NV_BASIC maxed.
 		c = MAPID_NOVICE;
-	else if (sd->status.skill_point >= (int)sd->status.job_level
-		&& ((sd->change_level > 0 && skill_point < sd->change_level+8) || skill_point < 58)) {
+	else
+	//Do not send S. Novices to first class (Novice)
+	if ((sd->class_&JOBL_2) && (sd->class_&MAPID_UPPERMASK) != MAPID_SUPER_NOVICE &&
+		sd->status.skill_point >= (int)sd->status.job_level &&
+		((sd->change_level > 0 && skill_point < sd->change_level+8) || skill_point < 58)) {
 		//Send it to first class.
 		c &= MAPID_BASEMASK;
 	}