summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc4
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc8
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc2
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc29
4 files changed, 22 insertions, 21 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index 3c470e736..f8873a6ac 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -4038,8 +4038,8 @@ typedef int (*HPMHOOK_pre_map_readallmaps) (void);
typedef int (*HPMHOOK_post_map_readallmaps) (int retVal___);
typedef bool (*HPMHOOK_pre_map_config_read) (const char **filename, bool *imported);
typedef bool (*HPMHOOK_post_map_config_read) (bool retVal___, const char *filename, bool imported);
-typedef void (*HPMHOOK_pre_map_reloadnpc_sub) (char **cfgName);
-typedef void (*HPMHOOK_post_map_reloadnpc_sub) (char *cfgName);
+typedef bool (*HPMHOOK_pre_map_read_npclist) (const char **filename, bool *imported);
+typedef bool (*HPMHOOK_post_map_read_npclist) (bool retVal___, const char *filename, bool imported);
typedef bool (*HPMHOOK_pre_map_inter_config_read) (const char **filename, bool *imported);
typedef bool (*HPMHOOK_post_map_inter_config_read) (bool retVal___, const char *filename, bool imported);
typedef bool (*HPMHOOK_pre_map_inter_config_read_database_names) (const char **filename, const struct config_t **config, bool *imported);
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index 5268f9d3f..4f8e2a7e0 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -3234,8 +3234,8 @@ struct {
struct HPMHookPoint *HP_map_readallmaps_post;
struct HPMHookPoint *HP_map_config_read_pre;
struct HPMHookPoint *HP_map_config_read_post;
- struct HPMHookPoint *HP_map_reloadnpc_sub_pre;
- struct HPMHookPoint *HP_map_reloadnpc_sub_post;
+ struct HPMHookPoint *HP_map_read_npclist_pre;
+ struct HPMHookPoint *HP_map_read_npclist_post;
struct HPMHookPoint *HP_map_inter_config_read_pre;
struct HPMHookPoint *HP_map_inter_config_read_post;
struct HPMHookPoint *HP_map_inter_config_read_database_names_pre;
@@ -9287,8 +9287,8 @@ struct {
int HP_map_readallmaps_post;
int HP_map_config_read_pre;
int HP_map_config_read_post;
- int HP_map_reloadnpc_sub_pre;
- int HP_map_reloadnpc_sub_post;
+ int HP_map_read_npclist_pre;
+ int HP_map_read_npclist_post;
int HP_map_inter_config_read_pre;
int HP_map_inter_config_read_post;
int HP_map_inter_config_read_database_names_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index df97d7d47..7e164f800 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -1659,7 +1659,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(map->readgat, HP_map_readgat) },
{ HP_POP(map->readallmaps, HP_map_readallmaps) },
{ HP_POP(map->config_read, HP_map_config_read) },
- { HP_POP(map->reloadnpc_sub, HP_map_reloadnpc_sub) },
+ { HP_POP(map->read_npclist, HP_map_read_npclist) },
{ HP_POP(map->inter_config_read, HP_map_inter_config_read) },
{ HP_POP(map->inter_config_read_database_names, HP_map_inter_config_read_database_names) },
{ HP_POP(map->inter_config_read_connection, HP_map_inter_config_read_connection) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index eff263649..12d741bdc 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -42761,31 +42761,32 @@ bool HP_map_config_read(const char *filename, bool imported) {
}
return retVal___;
}
-void HP_map_reloadnpc_sub(char *cfgName) {
+bool HP_map_read_npclist(const char *filename, bool imported) {
int hIndex = 0;
- if( HPMHooks.count.HP_map_reloadnpc_sub_pre ) {
- void (*preHookFunc) (char **cfgName);
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_map_read_npclist_pre ) {
+ bool (*preHookFunc) (const char **filename, bool *imported);
*HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_map_reloadnpc_sub_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_map_reloadnpc_sub_pre[hIndex].func;
- preHookFunc(&cfgName);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_read_npclist_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_read_npclist_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &imported);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
- return;
+ return retVal___;
}
}
{
- HPMHooks.source.map.reloadnpc_sub(cfgName);
+ retVal___ = HPMHooks.source.map.read_npclist(filename, imported);
}
- if( HPMHooks.count.HP_map_reloadnpc_sub_post ) {
- void (*postHookFunc) (char *cfgName);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_map_reloadnpc_sub_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_map_reloadnpc_sub_post[hIndex].func;
- postHookFunc(cfgName);
+ if( HPMHooks.count.HP_map_read_npclist_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, bool imported);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_read_npclist_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_read_npclist_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, imported);
}
}
- return;
+ return retVal___;
}
bool HP_map_inter_config_read(const char *filename, bool imported) {
int hIndex = 0;