diff options
author | Hercules.ws <Hercules@efficiently.awesome> | 2015-08-27 17:52:34 +0200 |
---|---|---|
committer | HerculesWSAPI <Hercules@efficiently.awesome> | 2015-08-27 17:52:34 +0200 |
commit | f7a97b556e05373711998d4f819cf7d89e4b0ce8 (patch) | |
tree | c06d6ff49228909751bfa725b8a8205337575f89 | |
parent | e2c5e1c60120a3e22fd71ee6b73748a05213fc8e (diff) | |
download | hercules-f7a97b556e05373711998d4f819cf7d89e4b0ce8.tar.gz hercules-f7a97b556e05373711998d4f819cf7d89e4b0ce8.tar.bz2 hercules-f7a97b556e05373711998d4f819cf7d89e4b0ce8.tar.xz hercules-f7a97b556e05373711998d4f819cf7d89e4b0ce8.zip |
HPM Hooks Update
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
-rw-r--r-- | src/common/HPMDataCheck.h | 1 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc | 4 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc | 1 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 26 |
4 files changed, 32 insertions, 0 deletions
diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h index e587a1908..7eb4029aa 100644 --- a/src/common/HPMDataCheck.h +++ b/src/common/HPMDataCheck.h @@ -483,6 +483,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = { { "packet_equipitem_ack", sizeof(struct packet_equipitem_ack), SERVER_TYPE_MAP }, { "packet_gm_monster_item", sizeof(struct packet_gm_monster_item), SERVER_TYPE_MAP }, { "packet_graffiti_entry", sizeof(struct packet_graffiti_entry), SERVER_TYPE_MAP }, + { "packet_hotkey", sizeof(struct packet_hotkey), SERVER_TYPE_MAP }, { "packet_idle_unit", sizeof(struct packet_idle_unit), SERVER_TYPE_MAP }, { "packet_idle_unit2", sizeof(struct packet_idle_unit2), SERVER_TYPE_MAP }, { "packet_item_drop_announce", sizeof(struct packet_item_drop_announce), SERVER_TYPE_MAP }, diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index c37a8d663..eab1d007e 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -1815,6 +1815,8 @@ struct { struct HPMHookPoint *HP_clif_pNPCMarketPurchase_post; struct HPMHookPoint *HP_clif_add_random_options_pre; struct HPMHookPoint *HP_clif_add_random_options_post; + struct HPMHookPoint *HP_clif_pHotkeyRowShift_pre; + struct HPMHookPoint *HP_clif_pHotkeyRowShift_post; struct HPMHookPoint *HP_cmdline_init_pre; struct HPMHookPoint *HP_cmdline_init_post; struct HPMHookPoint *HP_cmdline_final_pre; @@ -7526,6 +7528,8 @@ struct { int HP_clif_pNPCMarketPurchase_post; int HP_clif_add_random_options_pre; int HP_clif_add_random_options_post; + int HP_clif_pHotkeyRowShift_pre; + int HP_clif_pHotkeyRowShift_post; int HP_cmdline_init_pre; int HP_cmdline_init_post; int HP_cmdline_final_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc index 03127500d..4656f01c2 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -919,6 +919,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->pNPCMarketClosed, HP_clif_pNPCMarketClosed) }, { HP_POP(clif->pNPCMarketPurchase, HP_clif_pNPCMarketPurchase) }, { HP_POP(clif->add_random_options, HP_clif_add_random_options) }, + { HP_POP(clif->pHotkeyRowShift, HP_clif_pHotkeyRowShift) }, /* cmdline */ { HP_POP(cmdline->init, HP_cmdline_init) }, { HP_POP(cmdline->final, HP_cmdline_final) }, diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 2ecbf425c..e6aad6dad 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -23865,6 +23865,32 @@ void HP_clif_add_random_options(unsigned char *buf, struct item *item) { } return; } +void HP_clif_pHotkeyRowShift(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pHotkeyRowShift_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkeyRowShift_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pHotkeyRowShift_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pHotkeyRowShift(fd, sd); + } + if( HPMHooks.count.HP_clif_pHotkeyRowShift_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkeyRowShift_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pHotkeyRowShift_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} /* cmdline */ void HP_cmdline_init(void) { int hIndex = 0; |