diff options
Diffstat (limited to 'src/plugins/HPMHooking')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc | 4 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc | 1 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 27 |
3 files changed, 32 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index 0433cc54c..053c884d4 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -4061,6 +4061,8 @@ struct { struct HPMHookPoint *HP_quest_clear_post; struct HPMHookPoint *HP_quest_read_db_pre; struct HPMHookPoint *HP_quest_read_db_post; + struct HPMHookPoint *HP_quest_read_db_sub_pre; + struct HPMHookPoint *HP_quest_read_db_sub_post; struct HPMHookPoint *HP_script_init_pre; struct HPMHookPoint *HP_script_init_post; struct HPMHookPoint *HP_script_final_pre; @@ -9216,6 +9218,8 @@ struct { int HP_quest_clear_post; int HP_quest_read_db_pre; int HP_quest_read_db_post; + int HP_quest_read_db_sub_pre; + int HP_quest_read_db_sub_post; int HP_script_init_pre; int HP_script_init_post; int HP_script_final_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc index a8437c10a..ff637a1b3 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -2063,6 +2063,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(quest->check, HP_quest_check) }, { HP_POP(quest->clear, HP_quest_clear) }, { HP_POP(quest->read_db, HP_quest_read_db) }, + { HP_POP(quest->read_db_sub, HP_quest_read_db_sub) }, /* script */ { HP_POP(script->init, HP_script_init) }, { HP_POP(script->final, HP_script_final) }, diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index a2b17666c..e5b91f005 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -54374,6 +54374,33 @@ int HP_quest_read_db(void) { } return retVal___; } +struct quest_db* HP_quest_read_db_sub(config_setting_t *cs, int n, const char *source) { + int hIndex = 0; + struct quest_db* retVal___ = NULL; + if( HPMHooks.count.HP_quest_read_db_sub_pre ) { + struct quest_db* (*preHookFunc) (config_setting_t *cs, int *n, const char *source); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_read_db_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_quest_read_db_sub_pre[hIndex].func; + retVal___ = preHookFunc(cs, &n, source); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.quest.read_db_sub(cs, n, source); + } + if( HPMHooks.count.HP_quest_read_db_sub_post ) { + struct quest_db* (*postHookFunc) (struct quest_db* retVal___, config_setting_t *cs, int *n, const char *source); + for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_read_db_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_quest_read_db_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, cs, &n, source); + } + } + return retVal___; +} /* script */ void HP_script_init(bool minimal) { int hIndex = 0; |