diff options
author | Hercules.ws <Hercules@efficiently.awesome> | 2013-11-07 20:11:13 +0100 |
---|---|---|
committer | HerculesWSAPI <Hercules@efficiently.awesome> | 2013-11-07 20:11:13 +0100 |
commit | bc9743ce3455f9d9cbc9c934b2a19343ad369fc5 (patch) | |
tree | 6c948a504983920916becaeaf3c279bc8b52cc11 /src/plugins/HPMHooking/HPMHooking.Hooks.inc | |
parent | 01e4647db2d5c635c7b4447f37663797a3f47b99 (diff) | |
download | hercules-bc9743ce3455f9d9cbc9c934b2a19343ad369fc5.tar.gz hercules-bc9743ce3455f9d9cbc9c934b2a19343ad369fc5.tar.bz2 hercules-bc9743ce3455f9d9cbc9c934b2a19343ad369fc5.tar.xz hercules-bc9743ce3455f9d9cbc9c934b2a19343ad369fc5.zip |
HPM Hooks Update
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking.Hooks.inc')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.Hooks.inc | 152 |
1 files changed, 152 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc index 947b51186..575e004f1 100644 --- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc @@ -24571,6 +24571,31 @@ void HP_guild_aura_refresh(struct map_session_data *sd, uint16 skill_id, uint16 } return; } +void HP_guild_retrieveitembound(int char_id, int aid, int guild_id) { + int hIndex = 0; + if( HPMHooks.count.HP_guild_retrieveitembound_pre ) { + void (*preHookFunc) (int *char_id, int *aid, int *guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_retrieveitembound_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_guild_retrieveitembound_pre[hIndex].func; + preHookFunc(&char_id, &aid, &guild_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.guild.retrieveitembound(char_id, aid, guild_id); + } + if( HPMHooks.count.HP_guild_retrieveitembound_post ) { + void (*postHookFunc) (int *char_id, int *aid, int *guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_retrieveitembound_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_guild_retrieveitembound_post[hIndex].func; + postHookFunc(&char_id, &aid, &guild_id); + } + } + return; +} int HP_guild_payexp_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; @@ -28129,6 +28154,31 @@ int HP_intif_guild_castle_datasave(int castle_id, int index, int value) { } return retVal___; } +void HP_intif_itembound_req(int char_id, int aid, int guild_id) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_itembound_req_pre ) { + void (*preHookFunc) (int *char_id, int *aid, int *guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_itembound_req_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_itembound_req_pre[hIndex].func; + preHookFunc(&char_id, &aid, &guild_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.itembound_req(char_id, aid, guild_id); + } + if( HPMHooks.count.HP_intif_itembound_req_post ) { + void (*postHookFunc) (int *char_id, int *aid, int *guild_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_itembound_req_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_itembound_req_post[hIndex].func; + postHookFunc(&char_id, &aid, &guild_id); + } + } + return; +} int HP_intif_request_petdata(int account_id, int char_id, int pet_id) { int hIndex = 0; int retVal___ = 0; @@ -30116,6 +30166,31 @@ void HP_intif_pAuctionBid(int fd) { } return; } +void HP_intif_pItembound_ack(int fd) { + int hIndex = 0; + if( HPMHooks.count.HP_intif_pItembound_ack_pre ) { + void (*preHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pItembound_ack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_intif_pItembound_ack_pre[hIndex].func; + preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pItembound_ack(fd); + } + if( HPMHooks.count.HP_intif_pItembound_ack_post ) { + void (*postHookFunc) (int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pItembound_ack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_intif_pItembound_ack_post[hIndex].func; + postHookFunc(&fd); + } + } + return; +} void HP_intif_pMercenaryReceived(int fd) { int hIndex = 0; if( HPMHooks.count.HP_intif_pMercenaryReceived_pre ) { @@ -44557,6 +44632,32 @@ bool HP_pc_can_give_items(struct map_session_data *sd) { } return retVal___; } +bool HP_pc_can_give_bound_items(struct map_session_data *sd) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_pc_can_give_bound_items_pre ) { + bool (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_give_bound_items_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_can_give_bound_items_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.can_give_bound_items(sd); + } + if( HPMHooks.count.HP_pc_can_give_bound_items_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_give_bound_items_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_can_give_bound_items_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} bool HP_pc_can_use_command(struct map_session_data *sd, const char *command) { int hIndex = 0; bool retVal___ = false; @@ -49446,6 +49547,31 @@ void HP_pc_scdata_received(struct map_session_data *sd) { } return; } +void HP_pc_bound_clear(struct map_session_data *sd, enum e_item_bound_type type) { + int hIndex = 0; + if( HPMHooks.count.HP_pc_bound_clear_pre ) { + void (*preHookFunc) (struct map_session_data *sd, enum e_item_bound_type *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bound_clear_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_bound_clear_pre[hIndex].func; + preHookFunc(sd, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.bound_clear(sd, type); + } + if( HPMHooks.count.HP_pc_bound_clear_post ) { + void (*postHookFunc) (struct map_session_data *sd, enum e_item_bound_type *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bound_clear_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_bound_clear_post[hIndex].func; + postHookFunc(sd, &type); + } + } + return; +} /* pet */ int HP_pet_init(bool minimal) { int hIndex = 0; @@ -53961,6 +54087,32 @@ int HP_script_run_func(struct script_state *st) { } return retVal___; } +const char* HP_script_getfuncname(struct script_state *st) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_script_getfuncname_pre ) { + const char* (*preHookFunc) (struct script_state *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_getfuncname_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_getfuncname_pre[hIndex].func; + retVal___ = preHookFunc(st); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.getfuncname(st); + } + if( HPMHooks.count.HP_script_getfuncname_post ) { + const char* (*postHookFunc) (const char* retVal___, struct script_state *st); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_getfuncname_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_getfuncname_post[hIndex].func; + retVal___ = postHookFunc(retVal___, st); + } + } + return retVal___; +} /* searchstore */ bool HP_searchstore_open(struct map_session_data *sd, unsigned int uses, unsigned short effect) { int hIndex = 0; |