diff options
author | Haru <haru@dotalux.com> | 2016-02-11 16:38:26 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2016-08-19 21:32:21 +0200 |
commit | 998b48e2d582e666a4afad21dd28f50fbb9eedb5 (patch) | |
tree | 518548a95b433bfcd0c5d25528d9a029f063b49e /src/plugins | |
parent | 5b983fc43b2f632a51ddbeef360e2462ad3ca055 (diff) | |
download | hercules-998b48e2d582e666a4afad21dd28f50fbb9eedb5.tar.gz hercules-998b48e2d582e666a4afad21dd28f50fbb9eedb5.tar.bz2 hercules-998b48e2d582e666a4afad21dd28f50fbb9eedb5.tar.xz hercules-998b48e2d582e666a4afad21dd28f50fbb9eedb5.zip |
HPM Hooks Update
Diffstat (limited to 'src/plugins')
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; |