diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-12-18 00:34:35 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-12-21 01:38:16 +0300 |
commit | 2c6fd58d633e4139a6f0f3b4bb0262e64fc957e2 (patch) | |
tree | 3c5f077c6537f7e165039d3bf68d8052253b7dc2 /src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | |
parent | a75f608ed23e2d6ac06582abb833c2a874cd7815 (diff) | |
download | hercules-2c6fd58d633e4139a6f0f3b4bb0262e64fc957e2.tar.gz hercules-2c6fd58d633e4139a6f0f3b4bb0262e64fc957e2.tar.bz2 hercules-2c6fd58d633e4139a6f0f3b4bb0262e64fc957e2.tar.xz hercules-2c6fd58d633e4139a6f0f3b4bb0262e64fc957e2.zip |
Update HPM hooks.
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_map.Hooks.inc')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 62b1be620..cc8f95353 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -33991,6 +33991,32 @@ int HP_itemdb_validate_entry(struct item_data *entry, int n, const char *source) } return retVal___; } +void HP_itemdb_readdb_additional_fields(int itemid, config_setting_t *it, int n, const char *source) { + int hIndex = 0; + if( HPMHooks.count.HP_itemdb_readdb_additional_fields_pre ) { + void (*preHookFunc) (int *itemid, config_setting_t *it, int *n, const char *source); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_additional_fields_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_readdb_additional_fields_pre[hIndex].func; + preHookFunc(&itemid, it, &n, source); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.itemdb.readdb_additional_fields(itemid, it, n, source); + } + if( HPMHooks.count.HP_itemdb_readdb_additional_fields_post ) { + void (*postHookFunc) (int *itemid, config_setting_t *it, int *n, const char *source); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_additional_fields_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_readdb_additional_fields_post[hIndex].func; + postHookFunc(&itemid, it, &n, source); + } + } + return; +} int HP_itemdb_readdb_sql_sub(Sql *handle, int n, const char *source) { int hIndex = 0; int retVal___ = 0; @@ -42588,6 +42614,32 @@ void HP_mob_clear_spawninfo(void) { } return; } +void HP_mob_destroy_mob_db(int index) { + int hIndex = 0; + if( HPMHooks.count.HP_mob_destroy_mob_db_pre ) { + void (*preHookFunc) (int *index); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_destroy_mob_db_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_mob_destroy_mob_db_pre[hIndex].func; + preHookFunc(&index); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mob.destroy_mob_db(index); + } + if( HPMHooks.count.HP_mob_destroy_mob_db_post ) { + void (*postHookFunc) (int *index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_destroy_mob_db_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_mob_destroy_mob_db_post[hIndex].func; + postHookFunc(&index); + } + } + return; +} /* npc */ int HP_npc_init(bool minimal) { int hIndex = 0; |