diff options
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking.Hooks.inc')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.Hooks.inc | 81 |
1 files changed, 53 insertions, 28 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc index 5511959e9..836e4e124 100644 --- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc @@ -4793,13 +4793,13 @@ int HP_chrif_divorceack(int char_id, int partner_id) { } return retVal___; } -int HP_chrif_accountban(int fd) { +int HP_chrif_idbanned(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chrif_accountban_pre ) { + if( HPMHooks.count.HP_chrif_idbanned_pre ) { int (*preHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_accountban_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_chrif_accountban_pre[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_idbanned_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_idbanned_pre[hIndex].func; retVal___ = preHookFunc(&fd); } if( *HPMforce_return ) { @@ -4808,12 +4808,12 @@ int HP_chrif_accountban(int fd) { } } { - retVal___ = HPMHooks.source.chrif.accountban(fd); + retVal___ = HPMHooks.source.chrif.idbanned(fd); } - if( HPMHooks.count.HP_chrif_accountban_post ) { + if( HPMHooks.count.HP_chrif_idbanned_post ) { int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_accountban_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_chrif_accountban_post[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_idbanned_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_idbanned_post[hIndex].func; retVal___ = postHookFunc(retVal___, &fd); } } @@ -19773,6 +19773,31 @@ void HP_clif_pGMChangeMapType(int fd, struct map_session_data *sd) { } return; } +void HP_clif_pGMFullStrip(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pGMFullStrip_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMFullStrip_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pGMFullStrip_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pGMFullStrip(fd, sd); + } + if( HPMHooks.count.HP_clif_pGMFullStrip_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMFullStrip_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pGMFullStrip_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} void HP_clif_pPMIgnore(int fd, struct map_session_data *sd) { int hIndex = 0; if( HPMHooks.count.HP_clif_pPMIgnore_pre ) { @@ -32402,13 +32427,13 @@ int HP_itemdb_readdb_libconfig_sub(config_setting_t *it, int n, const char *sour } return retVal___; } -int HP_itemdb_readdb(const char *filename) { +int HP_itemdb_readdb_libconfig(const char *filename) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_readdb_pre ) { + if( HPMHooks.count.HP_itemdb_readdb_libconfig_pre ) { int (*preHookFunc) (const char *filename); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_itemdb_readdb_pre[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_libconfig_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_readdb_libconfig_pre[hIndex].func; retVal___ = preHookFunc(filename); } if( *HPMforce_return ) { @@ -32417,25 +32442,25 @@ int HP_itemdb_readdb(const char *filename) { } } { - retVal___ = HPMHooks.source.itemdb.readdb(filename); + retVal___ = HPMHooks.source.itemdb.readdb_libconfig(filename); } - if( HPMHooks.count.HP_itemdb_readdb_post ) { + if( HPMHooks.count.HP_itemdb_readdb_libconfig_post ) { int (*postHookFunc) (int retVal___, const char *filename); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_itemdb_readdb_post[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_libconfig_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_readdb_libconfig_post[hIndex].func; retVal___ = postHookFunc(retVal___, filename); } } return retVal___; } -int HP_itemdb_read_sqldb(void) { +int HP_itemdb_readdb_sql(const char *tablename) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_read_sqldb_pre ) { - int (*preHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_sqldb_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_itemdb_read_sqldb_pre[hIndex].func; - retVal___ = preHookFunc(); + if( HPMHooks.count.HP_itemdb_readdb_sql_pre ) { + int (*preHookFunc) (const char *tablename); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_sql_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_readdb_sql_pre[hIndex].func; + retVal___ = preHookFunc(tablename); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -32443,13 +32468,13 @@ int HP_itemdb_read_sqldb(void) { } } { - retVal___ = HPMHooks.source.itemdb.read_sqldb(); + retVal___ = HPMHooks.source.itemdb.readdb_sql(tablename); } - if( HPMHooks.count.HP_itemdb_read_sqldb_post ) { - int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_sqldb_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_itemdb_read_sqldb_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if( HPMHooks.count.HP_itemdb_readdb_sql_post ) { + int (*postHookFunc) (int retVal___, const char *tablename); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_sql_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_readdb_sql_post[hIndex].func; + retVal___ = postHookFunc(retVal___, tablename); } } return retVal___; |