summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc24
-rw-r--r--src/plugins/HPMHooking/HPMHooking.HookingPoints.inc6
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Hooks.inc152
3 files changed, 182 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
index cb9422a0b..b659a59d5 100644
--- a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
@@ -1937,6 +1937,8 @@ struct {
struct HPMHookPoint *HP_guild_flags_clear_post;
struct HPMHookPoint *HP_guild_aura_refresh_pre;
struct HPMHookPoint *HP_guild_aura_refresh_post;
+ struct HPMHookPoint *HP_guild_retrieveitembound_pre;
+ struct HPMHookPoint *HP_guild_retrieveitembound_post;
struct HPMHookPoint *HP_guild_payexp_timer_pre;
struct HPMHookPoint *HP_guild_payexp_timer_post;
struct HPMHookPoint *HP_guild_sd_check_pre;
@@ -2207,6 +2209,8 @@ struct {
struct HPMHookPoint *HP_intif_guild_castle_dataload_post;
struct HPMHookPoint *HP_intif_guild_castle_datasave_pre;
struct HPMHookPoint *HP_intif_guild_castle_datasave_post;
+ struct HPMHookPoint *HP_intif_itembound_req_pre;
+ struct HPMHookPoint *HP_intif_itembound_req_post;
struct HPMHookPoint *HP_intif_request_petdata_pre;
struct HPMHookPoint *HP_intif_request_petdata_post;
struct HPMHookPoint *HP_intif_save_petdata_pre;
@@ -2363,6 +2367,8 @@ struct {
struct HPMHookPoint *HP_intif_pAuctionMessage_post;
struct HPMHookPoint *HP_intif_pAuctionBid_pre;
struct HPMHookPoint *HP_intif_pAuctionBid_post;
+ struct HPMHookPoint *HP_intif_pItembound_ack_pre;
+ struct HPMHookPoint *HP_intif_pItembound_ack_post;
struct HPMHookPoint *HP_intif_pMercenaryReceived_pre;
struct HPMHookPoint *HP_intif_pMercenaryReceived_post;
struct HPMHookPoint *HP_intif_pMercenaryDeleted_pre;
@@ -3459,6 +3465,8 @@ struct {
struct HPMHookPoint *HP_pc_get_group_level_post;
struct HPMHookPoint *HP_pc_can_give_items_pre;
struct HPMHookPoint *HP_pc_can_give_items_post;
+ struct HPMHookPoint *HP_pc_can_give_bound_items_pre;
+ struct HPMHookPoint *HP_pc_can_give_bound_items_post;
struct HPMHookPoint *HP_pc_can_use_command_pre;
struct HPMHookPoint *HP_pc_can_use_command_post;
struct HPMHookPoint *HP_pc_has_permission_pre;
@@ -3835,6 +3843,8 @@ struct {
struct HPMHookPoint *HP_pc_rental_expire_post;
struct HPMHookPoint *HP_pc_scdata_received_pre;
struct HPMHookPoint *HP_pc_scdata_received_post;
+ struct HPMHookPoint *HP_pc_bound_clear_pre;
+ struct HPMHookPoint *HP_pc_bound_clear_post;
struct HPMHookPoint *HP_pet_init_pre;
struct HPMHookPoint *HP_pet_init_post;
struct HPMHookPoint *HP_pet_final_pre;
@@ -4175,6 +4185,8 @@ struct {
struct HPMHookPoint *HP_script_cleanfloor_sub_post;
struct HPMHookPoint *HP_script_run_func_pre;
struct HPMHookPoint *HP_script_run_func_post;
+ struct HPMHookPoint *HP_script_getfuncname_pre;
+ struct HPMHookPoint *HP_script_getfuncname_post;
struct HPMHookPoint *HP_searchstore_open_pre;
struct HPMHookPoint *HP_searchstore_open_post;
struct HPMHookPoint *HP_searchstore_query_pre;
@@ -6866,6 +6878,8 @@ struct {
int HP_guild_flags_clear_post;
int HP_guild_aura_refresh_pre;
int HP_guild_aura_refresh_post;
+ int HP_guild_retrieveitembound_pre;
+ int HP_guild_retrieveitembound_post;
int HP_guild_payexp_timer_pre;
int HP_guild_payexp_timer_post;
int HP_guild_sd_check_pre;
@@ -7136,6 +7150,8 @@ struct {
int HP_intif_guild_castle_dataload_post;
int HP_intif_guild_castle_datasave_pre;
int HP_intif_guild_castle_datasave_post;
+ int HP_intif_itembound_req_pre;
+ int HP_intif_itembound_req_post;
int HP_intif_request_petdata_pre;
int HP_intif_request_petdata_post;
int HP_intif_save_petdata_pre;
@@ -7292,6 +7308,8 @@ struct {
int HP_intif_pAuctionMessage_post;
int HP_intif_pAuctionBid_pre;
int HP_intif_pAuctionBid_post;
+ int HP_intif_pItembound_ack_pre;
+ int HP_intif_pItembound_ack_post;
int HP_intif_pMercenaryReceived_pre;
int HP_intif_pMercenaryReceived_post;
int HP_intif_pMercenaryDeleted_pre;
@@ -8388,6 +8406,8 @@ struct {
int HP_pc_get_group_level_post;
int HP_pc_can_give_items_pre;
int HP_pc_can_give_items_post;
+ int HP_pc_can_give_bound_items_pre;
+ int HP_pc_can_give_bound_items_post;
int HP_pc_can_use_command_pre;
int HP_pc_can_use_command_post;
int HP_pc_has_permission_pre;
@@ -8764,6 +8784,8 @@ struct {
int HP_pc_rental_expire_post;
int HP_pc_scdata_received_pre;
int HP_pc_scdata_received_post;
+ int HP_pc_bound_clear_pre;
+ int HP_pc_bound_clear_post;
int HP_pet_init_pre;
int HP_pet_init_post;
int HP_pet_final_pre;
@@ -9104,6 +9126,8 @@ struct {
int HP_script_cleanfloor_sub_post;
int HP_script_run_func_pre;
int HP_script_run_func_post;
+ int HP_script_getfuncname_pre;
+ int HP_script_getfuncname_post;
int HP_searchstore_open_pre;
int HP_searchstore_open_post;
int HP_searchstore_query_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
index 0009b0b39..097985877 100644
--- a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
@@ -981,6 +981,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(guild->flag_remove, HP_guild_flag_remove) },
{ HP_POP(guild->flags_clear, HP_guild_flags_clear) },
{ HP_POP(guild->aura_refresh, HP_guild_aura_refresh) },
+ { HP_POP(guild->retrieveitembound, HP_guild_retrieveitembound) },
{ HP_POP(guild->payexp_timer, HP_guild_payexp_timer) },
{ HP_POP(guild->sd_check, HP_guild_sd_check) },
{ HP_POP(guild->read_guildskill_tree_db, HP_guild_read_guildskill_tree_db) },
@@ -1120,6 +1121,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(intif->guild_emblem, HP_intif_guild_emblem) },
{ HP_POP(intif->guild_castle_dataload, HP_intif_guild_castle_dataload) },
{ HP_POP(intif->guild_castle_datasave, HP_intif_guild_castle_datasave) },
+ { HP_POP(intif->itembound_req, HP_intif_itembound_req) },
{ HP_POP(intif->request_petdata, HP_intif_request_petdata) },
{ HP_POP(intif->save_petdata, HP_intif_save_petdata) },
{ HP_POP(intif->delete_petdata, HP_intif_delete_petdata) },
@@ -1198,6 +1200,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(intif->pAuctionClose, HP_intif_pAuctionClose) },
{ HP_POP(intif->pAuctionMessage, HP_intif_pAuctionMessage) },
{ HP_POP(intif->pAuctionBid, HP_intif_pAuctionBid) },
+ { HP_POP(intif->pItembound_ack, HP_intif_pItembound_ack) },
{ HP_POP(intif->pMercenaryReceived, HP_intif_pMercenaryReceived) },
{ HP_POP(intif->pMercenaryDeleted, HP_intif_pMercenaryDeleted) },
{ HP_POP(intif->pMercenarySaved, HP_intif_pMercenarySaved) },
@@ -1760,6 +1763,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(pc->class2idx, HP_pc_class2idx) },
{ HP_POP(pc->get_group_level, HP_pc_get_group_level) },
{ HP_POP(pc->can_give_items, HP_pc_can_give_items) },
+ { HP_POP(pc->can_give_bound_items, HP_pc_can_give_bound_items) },
{ HP_POP(pc->can_use_command, HP_pc_can_use_command) },
{ HP_POP(pc->has_permission, HP_pc_has_permission) },
{ HP_POP(pc->set_group, HP_pc_set_group) },
@@ -1948,6 +1952,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(pc->bank_withdraw, HP_pc_bank_withdraw) },
{ HP_POP(pc->rental_expire, HP_pc_rental_expire) },
{ HP_POP(pc->scdata_received, HP_pc_scdata_received) },
+ { HP_POP(pc->bound_clear, HP_pc_bound_clear) },
/* pet */
{ HP_POP(pet->init, HP_pet_init) },
{ HP_POP(pet->final, HP_pet_final) },
@@ -2121,6 +2126,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(script->buildin_mobuseskill_sub, HP_script_buildin_mobuseskill_sub) },
{ HP_POP(script->cleanfloor_sub, HP_script_cleanfloor_sub) },
{ HP_POP(script->run_func, HP_script_run_func) },
+ { HP_POP(script->getfuncname, HP_script_getfuncname) },
/* searchstore */
{ HP_POP(searchstore->open, HP_searchstore_open) },
{ HP_POP(searchstore->query, HP_searchstore_query) },
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;