summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/map/pc.c10
-rw-r--r--src/map/pc.h1
2 files changed, 9 insertions, 2 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 08fbae7ea..8dd216f55 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -11135,6 +11135,11 @@ int pc_split_atoui64(char* str, uint64* val, char sep, int max)
return i;
}
+bool pc_read_skill_job_skip(short skill_id, int job_id)
+{
+ return skill_id == NV_TRICKDEAD && ((pc->jobid2mapid(job_id) & (MAPID_BASEMASK | JOBL_2)) != MAPID_NOVICE); // skip trickdead for non-novices
+}
+
/**
* Parses the skill tree config file.
*
@@ -11215,8 +11220,8 @@ void pc_read_skill_tree(void)
ShowWarning("pc_read_skill_tree: '%s' can't inherit '%s', skill tree is full!\n", job_name, ijob_name);
break;
}
- if (src->id == NV_TRICKDEAD && ((pc->jobid2mapid(job_id)&(MAPID_BASEMASK | JOBL_2)) != MAPID_NOVICE))
- continue; // skip trickdead for non-novices
+ if (pc->read_skill_job_skip(src->id, job_id))
+ continue;
dst = &pc->skill_tree[job_idx][cur];
dst->inherited = 1;
if (dst->id == 0) {
@@ -12481,6 +12486,7 @@ void pc_defaults(void) {
pc->autosave = pc_autosave;
pc->follow_timer = pc_follow_timer;
pc->read_skill_tree = pc_read_skill_tree;
+ pc->read_skill_job_skip = pc_read_skill_job_skip;
pc->clear_skill_tree = pc_clear_skill_tree;
pc->isUseitem = pc_isUseitem;
pc->show_steal = pc_show_steal;
diff --git a/src/map/pc.h b/src/map/pc.h
index 62a829734..49c102206 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -1101,6 +1101,7 @@ END_ZEROED_BLOCK; /* End */
int (*autosave) (int tid, int64 tick, int id, intptr_t data);
int (*follow_timer) (int tid, int64 tick, int id, intptr_t data);
void (*read_skill_tree) (void);
+ bool (*read_skill_job_skip) (short skill_id, int job_id);
void (*clear_skill_tree) (void);
int (*isUseitem) (struct map_session_data *sd,int n);
int (*show_steal) (struct block_list *bl,va_list ap);