Index: src/map/pc.c
===================================================================
--- src/map/pc.c (revision 17256)
+++ src/map/pc.c (working copy)
@@ -1392,8 +1392,13 @@
}
}
}
- if( sd->status.job_level < skill_tree[c][i].joblv )
- f = 0; // job level requirement wasn't satisfied
+ if( sd->status.job_level < skill_tree[c][i].joblv ) { //We need to get the "true" class tree value in this case
+ int class = pc_mapid2jobid(sd->class_, sd->status.sex);
+ class = pc_class2idx(class);
+ ShowDebug("pc_calc_skilltree: tree class= %d player class= %d\n", c, class);
+ if (class == c || (class != c && sd->status.job_level < skill_tree[class][i].joblv))
+ f = 0; // job level requirement wasn't satisfied
+ }
}
if( f ) {
@@ -1494,8 +1499,13 @@
}
if( !f )
continue;
- if( sd->status.job_level < skill_tree[c][i].joblv )
- continue;
+ if( sd->status.job_level < skill_tree[c][i].joblv ) { //We need to get the "true" class tree value in this case
+ int class = pc_mapid2jobid(sd->class_, sd->status.sex);
+ class = pc_class2idx(class);
+ ShowDebug("pc_check_skilltree: tree class= %d player class= %d\n", c, class);
+ if (class == c || (class != c && sd->status.job_level < skill_tree[class][i].joblv))
+ continue; // job level requirement wasn't satisfied
+ }
j = skill_get_inf2(id);
if( !sd->status.skill[id].lv && (