summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2014-07-15 00:37:58 +0200
committerHaru <haru@dotalux.com>2014-07-15 00:42:44 +0200
commit92a249f151a8f75104fcbfd07b5964ef0301387d (patch)
tree240b57ae9e306d17ef65bddf4bfa73f2672b6f11 /src/map/pc.c
parent8a149e528b8a80598c6459d6c27cabbdb16a5986 (diff)
downloadhercules-92a249f151a8f75104fcbfd07b5964ef0301387d.tar.gz
hercules-92a249f151a8f75104fcbfd07b5964ef0301387d.tar.bz2
hercules-92a249f151a8f75104fcbfd07b5964ef0301387d.tar.xz
hercules-92a249f151a8f75104fcbfd07b5964ef0301387d.zip
Fixed some skill checks considering Super Novices the same as Novices
- This fixes Super Novices being able to use Trick Dead while they shouldn't. - Follow-up to 21b13ae7ef4747caf52784f4fb753e9a98ff2bd8 - Special thanks to Mordekaiser, Ind. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 4e165e539..8b84ee3bc 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -1391,7 +1391,7 @@ int pc_calc_skilltree(struct map_session_data *sd)
if( sd->status.skill[i].flag == SKILL_FLAG_PERMANENT ) {
switch( skill->db[i].nameid ) {
case NV_TRICKDEAD:
- if( (sd->class_&MAPID_BASEMASK) != MAPID_NOVICE ) {
+ if( (sd->class_&(MAPID_BASEMASK|JOBL_2)) != MAPID_NOVICE ) {
sd->status.skill[i].id = 0;
sd->status.skill[i].lv = 0;
sd->status.skill[i].flag = 0;
@@ -6656,14 +6656,14 @@ int pc_resetskill(struct map_session_data* sd, int flag)
skill_id = skill->db[i].nameid;
// Don't reset trick dead if not a novice/baby
- if( skill_id == NV_TRICKDEAD && (sd->class_&MAPID_BASEMASK) != MAPID_NOVICE ) {
+ if( skill_id == NV_TRICKDEAD && (sd->class_&(MAPID_BASEMASK|JOBL_2)) != MAPID_NOVICE ) {
sd->status.skill[i].lv = 0;
sd->status.skill[i].flag = 0;
continue;
}
// do not reset basic skill
- if( skill_id == NV_BASIC && (sd->class_&MAPID_BASEMASK) != MAPID_NOVICE )
+ if( skill_id == NV_BASIC && (sd->class_&(MAPID_BASEMASK|JOBL_2)) != MAPID_NOVICE )
continue;
if( sd->status.skill[i].flag == SKILL_FLAG_PERM_GRANTED )
@@ -10009,7 +10009,7 @@ void pc_read_skill_tree(void) {
if( a == MAX_SKILL_TREE ) {
ShowWarning("pc_read_skill_tree: '%s' can't inherit '%s', skill tree is full!\n", name,iname);
break;
- } else if ( pc->skill_tree[idx][a].id || ( pc->skill_tree[idx][a].id == NV_TRICKDEAD && ((pc->jobid2mapid(jnames[k].id)&MAPID_BASEMASK)!=MAPID_NOVICE) ) ) /* we skip trickdead for non-novices */
+ } else if ( pc->skill_tree[idx][a].id || ( pc->skill_tree[idx][a].id == NV_TRICKDEAD && ((pc->jobid2mapid(jnames[k].id)&(MAPID_BASEMASK|JOBL_2))!=MAPID_NOVICE) ) ) /* we skip trickdead for non-novices */
continue;/* skip */
memcpy(&pc->skill_tree[idx][a],&pc->skill_tree[fidx][f],sizeof(pc->skill_tree[fidx][f]));