From 22de9739a421f21879b96c04ca97fc5f42cc0633 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 19 Apr 2018 22:31:24 +0300 Subject: Dont preserv hardcoded skill in skill tree based on job. --- src/emap/init.c | 1 + src/emap/pc.c | 9 +++++++++ src/emap/pc.h | 3 +++ 3 files changed, 13 insertions(+) diff --git a/src/emap/init.c b/src/emap/init.c index 5e20938..9e424c7 100644 --- a/src/emap/init.c +++ b/src/emap/init.c @@ -237,6 +237,7 @@ HPExport void plugin_init (void) addHookPre(pc, calc_skilltree_clear, epc_calc_skilltree_clear_pre); addHookPre(pc, calc_skilltree_bonus, epc_calc_skilltree_bonus_pre); addHookPre(pc, checkbaselevelup_sc, epc_checkbaselevelup_sc_pre); + addHookPre(pc, resetskill_job, epc_resetskill_job_pre); addHookPre(mob, deleteslave_sub, emob_deleteslave_sub_pre); addHookPre(mob, read_db_additional_fields, emob_read_db_additional_fields_pre); addHookPre(mob, dead, emob_dead_pre); diff --git a/src/emap/pc.c b/src/emap/pc.c index dcd1604..c7f1eed 100644 --- a/src/emap/pc.c +++ b/src/emap/pc.c @@ -1052,3 +1052,12 @@ void epc_checkbaselevelup_sc_pre(struct map_session_data **sdPtr __attribute__ ( { hookStop(); } + + +// disable job based resets +bool epc_resetskill_job_pre(struct map_session_data** sdPtr __attribute__ ((unused)), + int *indexPtr __attribute__ ((unused))) +{ + hookStop(); + return false; +} diff --git a/src/emap/pc.h b/src/emap/pc.h index a1c8e74..f031ed8 100644 --- a/src/emap/pc.h +++ b/src/emap/pc.h @@ -136,4 +136,7 @@ void epc_calc_skilltree_bonus_pre(struct map_session_data **sdPtr, void epc_checkbaselevelup_sc_pre(struct map_session_data **sdPtr); +bool epc_resetskill_job_pre(struct map_session_data** sdPtr, + int *indexPtr); + #endif // EVOL_MAP_PC -- cgit v1.2.3-70-g09d2