diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc | 16 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc | 4 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 140 |
3 files changed, 142 insertions, 18 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index eab1d007e..0a36d76fe 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -57,6 +57,10 @@ struct { struct HPMHookPoint *HP_atcommand_cleanfloor_sub_post; struct HPMHookPoint *HP_atcommand_mutearea_sub_pre; struct HPMHookPoint *HP_atcommand_mutearea_sub_post; + struct HPMHookPoint *HP_atcommand_getring_pre; + struct HPMHookPoint *HP_atcommand_getring_post; + struct HPMHookPoint *HP_atcommand_channel_help_pre; + struct HPMHookPoint *HP_atcommand_channel_help_post; struct HPMHookPoint *HP_atcommand_commands_sub_pre; struct HPMHookPoint *HP_atcommand_commands_sub_post; struct HPMHookPoint *HP_atcommand_cmd_db_clear_pre; @@ -517,6 +521,10 @@ struct { struct HPMHookPoint *HP_clif_delitem_post; struct HPMHookPoint *HP_clif_takeitem_pre; struct HPMHookPoint *HP_clif_takeitem_post; + struct HPMHookPoint *HP_clif_item_equip_pre; + struct HPMHookPoint *HP_clif_item_equip_post; + struct HPMHookPoint *HP_clif_item_normal_pre; + struct HPMHookPoint *HP_clif_item_normal_post; struct HPMHookPoint *HP_clif_arrowequip_pre; struct HPMHookPoint *HP_clif_arrowequip_post; struct HPMHookPoint *HP_clif_arrow_fail_pre; @@ -5770,6 +5778,10 @@ struct { int HP_atcommand_cleanfloor_sub_post; int HP_atcommand_mutearea_sub_pre; int HP_atcommand_mutearea_sub_post; + int HP_atcommand_getring_pre; + int HP_atcommand_getring_post; + int HP_atcommand_channel_help_pre; + int HP_atcommand_channel_help_post; int HP_atcommand_commands_sub_pre; int HP_atcommand_commands_sub_post; int HP_atcommand_cmd_db_clear_pre; @@ -6230,6 +6242,10 @@ struct { int HP_clif_delitem_post; int HP_clif_takeitem_pre; int HP_clif_takeitem_post; + int HP_clif_item_equip_pre; + int HP_clif_item_equip_post; + int HP_clif_item_normal_pre; + int HP_clif_item_normal_post; int HP_clif_arrowequip_pre; int HP_clif_arrowequip_post; int HP_clif_arrow_fail_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc index 4656f01c2..99fa38cd6 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -33,6 +33,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(atcommand->get_jail_time, HP_atcommand_get_jail_time) }, { HP_POP(atcommand->cleanfloor_sub, HP_atcommand_cleanfloor_sub) }, { HP_POP(atcommand->mutearea_sub, HP_atcommand_mutearea_sub) }, + { HP_POP(atcommand->getring, HP_atcommand_getring) }, + { HP_POP(atcommand->channel_help, HP_atcommand_channel_help) }, { HP_POP(atcommand->commands_sub, HP_atcommand_commands_sub) }, { HP_POP(atcommand->cmd_db_clear, HP_atcommand_cmd_db_clear) }, { HP_POP(atcommand->cmd_db_clear_sub, HP_atcommand_cmd_db_clear_sub) }, @@ -270,6 +272,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->dropitem, HP_clif_dropitem) }, { HP_POP(clif->delitem, HP_clif_delitem) }, { HP_POP(clif->takeitem, HP_clif_takeitem) }, + { HP_POP(clif->item_equip, HP_clif_item_equip) }, + { HP_POP(clif->item_normal, HP_clif_item_normal) }, { HP_POP(clif->arrowequip, HP_clif_arrowequip) }, { HP_POP(clif->arrow_fail, HP_clif_arrow_fail) }, { HP_POP(clif->use_card, HP_clif_use_card) }, diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index e6aad6dad..7c53c0e6f 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -735,6 +735,58 @@ int HP_atcommand_mutearea_sub(struct block_list *bl, va_list ap) { } return retVal___; } +void HP_atcommand_getring(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_atcommand_getring_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_getring_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_atcommand_getring_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.atcommand.getring(sd); + } + if( HPMHooks.count.HP_atcommand_getring_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_getring_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_atcommand_getring_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_atcommand_channel_help(int fd, const char *command, bool can_create) { + int hIndex = 0; + if( HPMHooks.count.HP_atcommand_channel_help_pre ) { + void (*preHookFunc) (int *fd, const char *command, bool *can_create); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_channel_help_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_atcommand_channel_help_pre[hIndex].func; + preHookFunc(&fd, command, &can_create); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.atcommand.channel_help(fd, command, can_create); + } + if( HPMHooks.count.HP_atcommand_channel_help_post ) { + void (*postHookFunc) (int *fd, const char *command, bool *can_create); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_channel_help_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_atcommand_channel_help_post[hIndex].func; + postHookFunc(&fd, command, &can_create); + } + } + return; +} void HP_atcommand_commands_sub(struct map_session_data *sd, const int fd, AtCommandType type) { int hIndex = 0; if( HPMHooks.count.HP_atcommand_commands_sub_pre ) { @@ -6934,6 +6986,58 @@ void HP_clif_takeitem(struct block_list *src, struct block_list *dst) { } return; } +void HP_clif_item_equip(short idx, struct EQUIPITEM_INFO *p, struct item *i, struct item_data *id, int eqp_pos) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_item_equip_pre ) { + void (*preHookFunc) (short *idx, struct EQUIPITEM_INFO *p, struct item *i, struct item_data *id, int *eqp_pos); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_equip_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_item_equip_pre[hIndex].func; + preHookFunc(&idx, p, i, id, &eqp_pos); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.item_equip(idx, p, i, id, eqp_pos); + } + if( HPMHooks.count.HP_clif_item_equip_post ) { + void (*postHookFunc) (short *idx, struct EQUIPITEM_INFO *p, struct item *i, struct item_data *id, int *eqp_pos); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_equip_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_item_equip_post[hIndex].func; + postHookFunc(&idx, p, i, id, &eqp_pos); + } + } + return; +} +void HP_clif_item_normal(short idx, struct NORMALITEM_INFO *p, struct item *i, struct item_data *id) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_item_normal_pre ) { + void (*preHookFunc) (short *idx, struct NORMALITEM_INFO *p, struct item *i, struct item_data *id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_normal_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_item_normal_pre[hIndex].func; + preHookFunc(&idx, p, i, id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.item_normal(idx, p, i, id); + } + if( HPMHooks.count.HP_clif_item_normal_post ) { + void (*postHookFunc) (short *idx, struct NORMALITEM_INFO *p, struct item *i, struct item_data *id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_normal_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_item_normal_post[hIndex].func; + postHookFunc(&idx, p, i, id); + } + } + return; +} void HP_clif_arrowequip(struct map_session_data *sd, int val) { int hIndex = 0; if( HPMHooks.count.HP_clif_arrowequip_pre ) { @@ -50425,15 +50529,15 @@ int HP_party_db_final(DBKey key, DBData *data, va_list ap) { return retVal___; } /* path */ -int HP_path_blownpos(int16 m, int16 x0, int16 y0, int16 dx, int16 dy, int count) { +int HP_path_blownpos(struct block_list *bl, int16 m, int16 x0, int16 y0, int16 dx, int16 dy, int count) { int hIndex = 0; int retVal___ = 0; if( HPMHooks.count.HP_path_blownpos_pre ) { - int (*preHookFunc) (int16 *m, int16 *x0, int16 *y0, int16 *dx, int16 *dy, int *count); + int (*preHookFunc) (struct block_list *bl, int16 *m, int16 *x0, int16 *y0, int16 *dx, int16 *dy, int *count); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_path_blownpos_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_path_blownpos_pre[hIndex].func; - retVal___ = preHookFunc(&m, &x0, &y0, &dx, &dy, &count); + retVal___ = preHookFunc(bl, &m, &x0, &y0, &dx, &dy, &count); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -50441,26 +50545,26 @@ int HP_path_blownpos(int16 m, int16 x0, int16 y0, int16 dx, int16 dy, int count) } } { - retVal___ = HPMHooks.source.path.blownpos(m, x0, y0, dx, dy, count); + retVal___ = HPMHooks.source.path.blownpos(bl, m, x0, y0, dx, dy, count); } if( HPMHooks.count.HP_path_blownpos_post ) { - int (*postHookFunc) (int retVal___, int16 *m, int16 *x0, int16 *y0, int16 *dx, int16 *dy, int *count); + int (*postHookFunc) (int retVal___, struct block_list *bl, int16 *m, int16 *x0, int16 *y0, int16 *dx, int16 *dy, int *count); for(hIndex = 0; hIndex < HPMHooks.count.HP_path_blownpos_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_path_blownpos_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &m, &x0, &y0, &dx, &dy, &count); + retVal___ = postHookFunc(retVal___, bl, &m, &x0, &y0, &dx, &dy, &count); } } return retVal___; } -bool HP_path_search(struct walkpath_data *wpd, int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int flag, cell_chk cell) { +bool HP_path_search(struct walkpath_data *wpd, struct block_list *bl, int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int flag, cell_chk cell) { int hIndex = 0; bool retVal___ = false; if( HPMHooks.count.HP_path_search_pre ) { - bool (*preHookFunc) (struct walkpath_data *wpd, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int *flag, cell_chk *cell); + bool (*preHookFunc) (struct walkpath_data *wpd, struct block_list *bl, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int *flag, cell_chk *cell); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_path_search_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_path_search_pre[hIndex].func; - retVal___ = preHookFunc(wpd, &m, &x0, &y0, &x1, &y1, &flag, &cell); + retVal___ = preHookFunc(wpd, bl, &m, &x0, &y0, &x1, &y1, &flag, &cell); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -50468,26 +50572,26 @@ bool HP_path_search(struct walkpath_data *wpd, int16 m, int16 x0, int16 y0, int1 } } { - retVal___ = HPMHooks.source.path.search(wpd, m, x0, y0, x1, y1, flag, cell); + retVal___ = HPMHooks.source.path.search(wpd, bl, m, x0, y0, x1, y1, flag, cell); } if( HPMHooks.count.HP_path_search_post ) { - bool (*postHookFunc) (bool retVal___, struct walkpath_data *wpd, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int *flag, cell_chk *cell); + bool (*postHookFunc) (bool retVal___, struct walkpath_data *wpd, struct block_list *bl, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int *flag, cell_chk *cell); for(hIndex = 0; hIndex < HPMHooks.count.HP_path_search_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_path_search_post[hIndex].func; - retVal___ = postHookFunc(retVal___, wpd, &m, &x0, &y0, &x1, &y1, &flag, &cell); + retVal___ = postHookFunc(retVal___, wpd, bl, &m, &x0, &y0, &x1, &y1, &flag, &cell); } } return retVal___; } -bool HP_path_search_long(struct shootpath_data *spd, int16 m, int16 x0, int16 y0, int16 x1, int16 y1, cell_chk cell) { +bool HP_path_search_long(struct shootpath_data *spd, struct block_list *bl, int16 m, int16 x0, int16 y0, int16 x1, int16 y1, cell_chk cell) { int hIndex = 0; bool retVal___ = false; if( HPMHooks.count.HP_path_search_long_pre ) { - bool (*preHookFunc) (struct shootpath_data *spd, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, cell_chk *cell); + bool (*preHookFunc) (struct shootpath_data *spd, struct block_list *bl, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, cell_chk *cell); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_path_search_long_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_path_search_long_pre[hIndex].func; - retVal___ = preHookFunc(spd, &m, &x0, &y0, &x1, &y1, &cell); + retVal___ = preHookFunc(spd, bl, &m, &x0, &y0, &x1, &y1, &cell); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -50495,13 +50599,13 @@ bool HP_path_search_long(struct shootpath_data *spd, int16 m, int16 x0, int16 y0 } } { - retVal___ = HPMHooks.source.path.search_long(spd, m, x0, y0, x1, y1, cell); + retVal___ = HPMHooks.source.path.search_long(spd, bl, m, x0, y0, x1, y1, cell); } if( HPMHooks.count.HP_path_search_long_post ) { - bool (*postHookFunc) (bool retVal___, struct shootpath_data *spd, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, cell_chk *cell); + bool (*postHookFunc) (bool retVal___, struct shootpath_data *spd, struct block_list *bl, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, cell_chk *cell); for(hIndex = 0; hIndex < HPMHooks.count.HP_path_search_long_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_path_search_long_post[hIndex].func; - retVal___ = postHookFunc(retVal___, spd, &m, &x0, &y0, &x1, &y1, &cell); + retVal___ = postHookFunc(retVal___, spd, bl, &m, &x0, &y0, &x1, &y1, &cell); } } return retVal___; |