diff options
Diffstat (limited to 'src/plugins')
7 files changed, 140 insertions, 15 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc index 3a8bb2a5f..ce78fdd7e 100644 --- a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc @@ -314,6 +314,10 @@ struct { struct HPMHookPoint *HP_login_parse_request_connection_post; struct HPMHookPoint *HP_login_parse_login_pre; struct HPMHookPoint *HP_login_parse_login_post; + struct HPMHookPoint *HP_login_config_set_defaults_pre; + struct HPMHookPoint *HP_login_config_set_defaults_post; + struct HPMHookPoint *HP_login_config_read_pre; + struct HPMHookPoint *HP_login_config_read_post; struct HPMHookPoint *HP_iMalloc_init_pre; struct HPMHookPoint *HP_iMalloc_init_post; struct HPMHookPoint *HP_iMalloc_final_pre; @@ -887,6 +891,10 @@ struct { int HP_login_parse_request_connection_post; int HP_login_parse_login_pre; int HP_login_parse_login_post; + int HP_login_config_set_defaults_pre; + int HP_login_config_set_defaults_post; + int HP_login_config_read_pre; + int HP_login_config_read_post; int HP_iMalloc_init_pre; int HP_iMalloc_init_post; int HP_iMalloc_final_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc index 959bb076f..5be52d51e 100644 --- a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc @@ -175,6 +175,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(login->char_server_connection_status, HP_login_char_server_connection_status) }, { HP_POP(login->parse_request_connection, HP_login_parse_request_connection) }, { HP_POP(login->parse_login, HP_login_parse_login) }, + { HP_POP(login->config_set_defaults, HP_login_config_set_defaults) }, + { HP_POP(login->config_read, HP_login_config_read) }, /* iMalloc */ { HP_POP(iMalloc->init, HP_iMalloc_init) }, { HP_POP(iMalloc->final, HP_iMalloc_final) }, diff --git a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc index 2e2d9e619..670083e94 100644 --- a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc @@ -3914,6 +3914,59 @@ int HP_login_parse_login(int fd) { } return retVal___; } +void HP_login_config_set_defaults(void) { + int hIndex = 0; + if( HPMHooks.count.HP_login_config_set_defaults_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_config_set_defaults_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_config_set_defaults_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.config_set_defaults(); + } + if( HPMHooks.count.HP_login_config_set_defaults_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_config_set_defaults_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_config_set_defaults_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_login_config_read(const char *cfgName) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_login_config_read_pre ) { + int (*preHookFunc) (const char *cfgName); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_config_read_pre[hIndex].func; + retVal___ = preHookFunc(cfgName); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.login.config_read(cfgName); + } + if( HPMHooks.count.HP_login_config_read_post ) { + int (*postHookFunc) (int retVal___, const char *cfgName); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_config_read_post[hIndex].func; + retVal___ = postHookFunc(retVal___, cfgName); + } + } + return retVal___; +} /* iMalloc */ void HP_iMalloc_init(void) { int hIndex = 0; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index e5ec573a9..e0c5a4df3 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -1848,6 +1848,10 @@ struct { struct HPMHookPoint *HP_clif_pHotkeyRowShift_post; struct HPMHookPoint *HP_clif_dressroom_open_pre; struct HPMHookPoint *HP_clif_dressroom_open_post; + struct HPMHookPoint *HP_clif_selectcart_pre; + struct HPMHookPoint *HP_clif_selectcart_post; + struct HPMHookPoint *HP_clif_pSelectCart_pre; + struct HPMHookPoint *HP_clif_pSelectCart_post; struct HPMHookPoint *HP_cmdline_init_pre; struct HPMHookPoint *HP_cmdline_init_post; struct HPMHookPoint *HP_cmdline_final_pre; @@ -7685,6 +7689,10 @@ struct { int HP_clif_pHotkeyRowShift_post; int HP_clif_dressroom_open_pre; int HP_clif_dressroom_open_post; + int HP_clif_selectcart_pre; + int HP_clif_selectcart_post; + int HP_clif_pSelectCart_pre; + int HP_clif_pSelectCart_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 67fb2ce19..5bbad878a 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -944,6 +944,8 @@ struct HookingPointData HookingPoints[] = { { 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) }, + { HP_POP(clif->selectcart, HP_clif_selectcart) }, + { HP_POP(clif->pSelectCart, HP_clif_pSelectCart) }, /* 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 d7e798637..87d85cc6c 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -24067,6 +24067,58 @@ void HP_clif_dressroom_open(struct map_session_data *sd, int view) { } return; } +void HP_clif_selectcart(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_selectcart_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_selectcart_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_selectcart_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.selectcart(sd); + } + if( HPMHooks.count.HP_clif_selectcart_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_selectcart_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_selectcart_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_pSelectCart(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pSelectCart_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSelectCart_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pSelectCart_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pSelectCart(fd, sd); + } + if( HPMHooks.count.HP_clif_pSelectCart_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSelectCart_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pSelectCart_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} /* cmdline */ void HP_cmdline_init(void) { int hIndex = 0; @@ -60089,14 +60141,14 @@ void HP_script_pop_stack(struct script_state *st, int start, int end) { } return; } -void HP_script_set_constant(const char *name, int value, bool isparameter) { +void HP_script_set_constant(const char *name, int value, bool is_parameter, bool is_deprecated) { int hIndex = 0; if( HPMHooks.count.HP_script_set_constant_pre ) { - void (*preHookFunc) (const char *name, int *value, bool *isparameter); + void (*preHookFunc) (const char *name, int *value, bool *is_parameter, bool *is_deprecated); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_constant_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_script_set_constant_pre[hIndex].func; - preHookFunc(name, &value, &isparameter); + preHookFunc(name, &value, &is_parameter, &is_deprecated); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -60104,25 +60156,25 @@ void HP_script_set_constant(const char *name, int value, bool isparameter) { } } { - HPMHooks.source.script.set_constant(name, value, isparameter); + HPMHooks.source.script.set_constant(name, value, is_parameter, is_deprecated); } if( HPMHooks.count.HP_script_set_constant_post ) { - void (*postHookFunc) (const char *name, int *value, bool *isparameter); + void (*postHookFunc) (const char *name, int *value, bool *is_parameter, bool *is_deprecated); for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_constant_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_script_set_constant_post[hIndex].func; - postHookFunc(name, &value, &isparameter); + postHookFunc(name, &value, &is_parameter, &is_deprecated); } } return; } -void HP_script_set_constant2(const char *name, int value, bool isparameter) { +void HP_script_set_constant2(const char *name, int value, bool is_parameter, bool is_deprecated) { int hIndex = 0; if( HPMHooks.count.HP_script_set_constant2_pre ) { - void (*preHookFunc) (const char *name, int *value, bool *isparameter); + void (*preHookFunc) (const char *name, int *value, bool *is_parameter, bool *is_deprecated); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_constant2_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_script_set_constant2_pre[hIndex].func; - preHookFunc(name, &value, &isparameter); + preHookFunc(name, &value, &is_parameter, &is_deprecated); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -60130,13 +60182,13 @@ void HP_script_set_constant2(const char *name, int value, bool isparameter) { } } { - HPMHooks.source.script.set_constant2(name, value, isparameter); + HPMHooks.source.script.set_constant2(name, value, is_parameter, is_deprecated); } if( HPMHooks.count.HP_script_set_constant2_post ) { - void (*postHookFunc) (const char *name, int *value, bool *isparameter); + void (*postHookFunc) (const char *name, int *value, bool *is_parameter, bool *is_deprecated); for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_constant2_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_script_set_constant2_post[hIndex].func; - postHookFunc(name, &value, &isparameter); + postHookFunc(name, &value, &is_parameter, &is_deprecated); } } return; diff --git a/src/plugins/dbghelpplug.c b/src/plugins/dbghelpplug.c index edd47814d..6c02b1a12 100644 --- a/src/plugins/dbghelpplug.c +++ b/src/plugins/dbghelpplug.c @@ -1581,7 +1581,7 @@ typedef BOOL (WINAPI *ISDEBUGGERPRESENT)(void); /// /// @return TRUE is a debugger is present static BOOL -Dhp__IsDebuggerPresent() +Dhp__IsDebuggerPresent(void) { HANDLE kernel32_dll; ISDEBUGGERPRESENT IsDebuggerPresent_; @@ -1606,7 +1606,7 @@ Dhp__IsDebuggerPresent() /// /// @return TRUE is sucessfull static BOOL -Dhp__LoadDbghelpDll() +Dhp__LoadDbghelpDll(void) { dbghelp_dll = LoadLibraryA(DBGHELP_DLL); if( dbghelp_dll != INVALID_HANDLE_VALUE ) @@ -1663,7 +1663,7 @@ Dhp__LoadDbghelpDll() /// Unloads the dbghelp.dll library. static VOID -Dhp__UnloadDbghlpDll() +Dhp__UnloadDbghlpDll(void) { if( !SymCleanup_(GetCurrentProcess()) ) printf("Failed to cleanup symbols! Error: %u\n", GetLastError()); |