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 | 107 |
3 files changed, 127 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index 59844e766..c725cdf4a 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -1846,6 +1846,8 @@ struct { struct HPMHookPoint *HP_clif_add_random_options_post; struct HPMHookPoint *HP_clif_pHotkeyRowShift_pre; struct HPMHookPoint *HP_clif_pHotkeyRowShift_post; + struct HPMHookPoint *HP_clif_dressroom_open_pre; + struct HPMHookPoint *HP_clif_dressroom_open_post; struct HPMHookPoint *HP_cmdline_init_pre; struct HPMHookPoint *HP_cmdline_init_post; struct HPMHookPoint *HP_cmdline_final_pre; @@ -4456,6 +4458,12 @@ struct { struct HPMHookPoint *HP_script_conv_str_post; struct HPMHookPoint *HP_script_rid2sd_pre; struct HPMHookPoint *HP_script_rid2sd_post; + struct HPMHookPoint *HP_script_id2sd_pre; + struct HPMHookPoint *HP_script_id2sd_post; + struct HPMHookPoint *HP_script_charid2sd_pre; + struct HPMHookPoint *HP_script_charid2sd_post; + struct HPMHookPoint *HP_script_nick2sd_pre; + struct HPMHookPoint *HP_script_nick2sd_post; struct HPMHookPoint *HP_script_detach_rid_pre; struct HPMHookPoint *HP_script_detach_rid_post; struct HPMHookPoint *HP_script_push_val_pre; @@ -7665,6 +7673,8 @@ struct { int HP_clif_add_random_options_post; int HP_clif_pHotkeyRowShift_pre; int HP_clif_pHotkeyRowShift_post; + int HP_clif_dressroom_open_pre; + int HP_clif_dressroom_open_post; int HP_cmdline_init_pre; int HP_cmdline_init_post; int HP_cmdline_final_pre; @@ -10275,6 +10285,12 @@ struct { int HP_script_conv_str_post; int HP_script_rid2sd_pre; int HP_script_rid2sd_post; + int HP_script_id2sd_pre; + int HP_script_id2sd_post; + int HP_script_charid2sd_pre; + int HP_script_charid2sd_post; + int HP_script_nick2sd_pre; + int HP_script_nick2sd_post; int HP_script_detach_rid_pre; int HP_script_detach_rid_post; int HP_script_push_val_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc index bc78fe8b4..456f2985f 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -943,6 +943,7 @@ struct HookingPointData HookingPoints[] = { { 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) }, + { HP_POP(clif->dressroom_open, HP_clif_dressroom_open) }, /* cmdline */ { HP_POP(cmdline->init, HP_cmdline_init) }, { HP_POP(cmdline->final, HP_cmdline_final) }, @@ -2282,6 +2283,9 @@ struct HookingPointData HookingPoints[] = { { HP_POP(script->conv_num, HP_script_conv_num) }, { HP_POP(script->conv_str, HP_script_conv_str) }, { HP_POP(script->rid2sd, HP_script_rid2sd) }, + { HP_POP(script->id2sd, HP_script_id2sd) }, + { HP_POP(script->charid2sd, HP_script_charid2sd) }, + { HP_POP(script->nick2sd, HP_script_nick2sd) }, { HP_POP(script->detach_rid, HP_script_detach_rid) }, { HP_POP(script->push_val, HP_script_push_val) }, { HP_POP(script->get_val, HP_script_get_val) }, diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 4c828dc56..ad9d96f03 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -24041,6 +24041,32 @@ void HP_clif_pHotkeyRowShift(int fd, struct map_session_data *sd) { } return; } +void HP_clif_dressroom_open(struct map_session_data *sd, int view) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_dressroom_open_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *view); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_dressroom_open_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_dressroom_open_pre[hIndex].func; + preHookFunc(sd, &view); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.dressroom_open(sd, view); + } + if( HPMHooks.count.HP_clif_dressroom_open_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *view); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_dressroom_open_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_dressroom_open_post[hIndex].func; + postHookFunc(sd, &view); + } + } + return; +} /* cmdline */ void HP_cmdline_init(void) { int hIndex = 0; @@ -59445,6 +59471,87 @@ TBL_PC* HP_script_rid2sd(struct script_state *st) { } return retVal___; } +TBL_PC* HP_script_id2sd(struct script_state *st, int account_id) { + int hIndex = 0; + TBL_PC* retVal___ = NULL; + if( HPMHooks.count.HP_script_id2sd_pre ) { + TBL_PC* (*preHookFunc) (struct script_state *st, int *account_id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_id2sd_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_id2sd_pre[hIndex].func; + retVal___ = preHookFunc(st, &account_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.id2sd(st, account_id); + } + if( HPMHooks.count.HP_script_id2sd_post ) { + TBL_PC* (*postHookFunc) (TBL_PC* retVal___, struct script_state *st, int *account_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_id2sd_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_id2sd_post[hIndex].func; + retVal___ = postHookFunc(retVal___, st, &account_id); + } + } + return retVal___; +} +TBL_PC* HP_script_charid2sd(struct script_state *st, int char_id) { + int hIndex = 0; + TBL_PC* retVal___ = NULL; + if( HPMHooks.count.HP_script_charid2sd_pre ) { + TBL_PC* (*preHookFunc) (struct script_state *st, int *char_id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_charid2sd_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_charid2sd_pre[hIndex].func; + retVal___ = preHookFunc(st, &char_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.charid2sd(st, char_id); + } + if( HPMHooks.count.HP_script_charid2sd_post ) { + TBL_PC* (*postHookFunc) (TBL_PC* retVal___, struct script_state *st, int *char_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_charid2sd_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_charid2sd_post[hIndex].func; + retVal___ = postHookFunc(retVal___, st, &char_id); + } + } + return retVal___; +} +TBL_PC* HP_script_nick2sd(struct script_state *st, const char *name) { + int hIndex = 0; + TBL_PC* retVal___ = NULL; + if( HPMHooks.count.HP_script_nick2sd_pre ) { + TBL_PC* (*preHookFunc) (struct script_state *st, const char *name); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_nick2sd_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_nick2sd_pre[hIndex].func; + retVal___ = preHookFunc(st, name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.nick2sd(st, name); + } + if( HPMHooks.count.HP_script_nick2sd_post ) { + TBL_PC* (*postHookFunc) (TBL_PC* retVal___, struct script_state *st, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_nick2sd_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_nick2sd_post[hIndex].func; + retVal___ = postHookFunc(retVal___, st, name); + } + } + return retVal___; +} void HP_script_detach_rid(struct script_state *st) { int hIndex = 0; if( HPMHooks.count.HP_script_detach_rid_pre ) { |