summaryrefslogtreecommitdiff
path: root/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2016-02-11 16:38:26 +0100
committerHaru <haru@dotalux.com>2016-08-19 21:32:21 +0200
commit998b48e2d582e666a4afad21dd28f50fbb9eedb5 (patch)
tree518548a95b433bfcd0c5d25528d9a029f063b49e /src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
parent5b983fc43b2f632a51ddbeef360e2462ad3ca055 (diff)
downloadhercules-998b48e2d582e666a4afad21dd28f50fbb9eedb5.tar.gz
hercules-998b48e2d582e666a4afad21dd28f50fbb9eedb5.tar.bz2
hercules-998b48e2d582e666a4afad21dd28f50fbb9eedb5.tar.xz
hercules-998b48e2d582e666a4afad21dd28f50fbb9eedb5.zip
HPM Hooks Update
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_map.Hooks.inc')
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc29
1 files changed, 15 insertions, 14 deletions
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;