Browse Source

Fixed items don't grant skill if you had this skill before and then changed your job.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14219 54d463be-8e91-2dee-dedb-b68131a5f0ec
Inkfish 15 years ago
parent
commit
5d56b669e9
2 changed files with 4 additions and 2 deletions
  1. 2 0
      Changelog-Trunk.txt
  2. 2 2
      src/map/pc.c

+ 2 - 0
Changelog-Trunk.txt

@@ -3,6 +3,8 @@ Date	Added
 AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
+2010/01/16
+	* Fixed items don't grant skill if you had this skill before and then changed your job. [Inkfish]
 2010/01/14
 	* Fixed change cart packet doesn't check for skill. [Inkfish]
 	* Added new packets for Plagiarism. [Inkfish]

+ 2 - 2
src/map/pc.c

@@ -2981,9 +2981,9 @@ int pc_skill(TBL_PC* sd, int id, int level, int flag)
 		sd->status.skill[id].lv += level;
 	break;
 	case 1: //Item bonus skill.
-		if( sd->status.skill[id].lv >= level )
-			return 0;
 		if( sd->status.skill[id].id == id ){
+			if( sd->status.skill[id].lv >= level )
+				return 0;
 			if( !sd->status.skill[id].flag ) //Non-granted skill, store it's level.
 				sd->status.skill[id].flag = sd->status.skill[id].lv + 2;
 		} else {