diff options
Diffstat (limited to 'src/plugins/HPMHooking')
4 files changed, 68 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc index 84d053230..8c30de785 100644 --- a/src/plugins/HPMHooking/HPMHooking.Defs.inc +++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc @@ -3532,10 +3532,14 @@ typedef bool (*HPMHOOK_post_inter_mercenary_delete) (bool retVal___, int merc_id #ifdef CHAR_INT_PARTY_H /* inter_party */ typedef int (*HPMHOOK_pre_inter_party_check_lv) (struct party_data **p); typedef int (*HPMHOOK_post_inter_party_check_lv) (int retVal___, struct party_data *p); +typedef int (*HPMHOOK_pre_inter_party_is_family_party) (struct party_data **p); +typedef int (*HPMHOOK_post_inter_party_is_family_party) (int retVal___, struct party_data *p); typedef void (*HPMHOOK_pre_inter_party_calc_state) (struct party_data **p); typedef void (*HPMHOOK_post_inter_party_calc_state) (struct party_data *p); typedef int (*HPMHOOK_pre_inter_party_tosql) (struct party **p, int *flag, int *index); typedef int (*HPMHOOK_post_inter_party_tosql) (int retVal___, struct party *p, int flag, int index); +typedef int (*HPMHOOK_pre_inter_party_del_nonexistent_party) (int *party_id); +typedef int (*HPMHOOK_post_inter_party_del_nonexistent_party) (int retVal___, int party_id); typedef struct party_data* (*HPMHOOK_pre_inter_party_fromsql) (int *party_id); typedef struct party_data* (*HPMHOOK_post_inter_party_fromsql) (struct party_data* retVal___, int party_id); typedef int (*HPMHOOK_pre_inter_party_sql_init) (void); diff --git a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc index a9a83511e..20f57dcb9 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc @@ -674,10 +674,14 @@ struct { struct HPMHookPoint *HP_inter_mercenary_delete_post; struct HPMHookPoint *HP_inter_party_check_lv_pre; struct HPMHookPoint *HP_inter_party_check_lv_post; + struct HPMHookPoint *HP_inter_party_is_family_party_pre; + struct HPMHookPoint *HP_inter_party_is_family_party_post; struct HPMHookPoint *HP_inter_party_calc_state_pre; struct HPMHookPoint *HP_inter_party_calc_state_post; struct HPMHookPoint *HP_inter_party_tosql_pre; struct HPMHookPoint *HP_inter_party_tosql_post; + struct HPMHookPoint *HP_inter_party_del_nonexistent_party_pre; + struct HPMHookPoint *HP_inter_party_del_nonexistent_party_post; struct HPMHookPoint *HP_inter_party_fromsql_pre; struct HPMHookPoint *HP_inter_party_fromsql_post; struct HPMHookPoint *HP_inter_party_sql_init_pre; @@ -2295,10 +2299,14 @@ struct { int HP_inter_mercenary_delete_post; int HP_inter_party_check_lv_pre; int HP_inter_party_check_lv_post; + int HP_inter_party_is_family_party_pre; + int HP_inter_party_is_family_party_post; int HP_inter_party_calc_state_pre; int HP_inter_party_calc_state_post; int HP_inter_party_tosql_pre; int HP_inter_party_tosql_post; + int HP_inter_party_del_nonexistent_party_pre; + int HP_inter_party_del_nonexistent_party_post; int HP_inter_party_fromsql_pre; int HP_inter_party_fromsql_post; int HP_inter_party_sql_init_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc index 7f52ebe46..e8e211f8b 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc @@ -368,8 +368,10 @@ struct HookingPointData HookingPoints[] = { { HP_POP(inter_mercenary->delete, HP_inter_mercenary_delete) }, /* inter_party_interface */ { HP_POP(inter_party->check_lv, HP_inter_party_check_lv) }, + { HP_POP(inter_party->is_family_party, HP_inter_party_is_family_party) }, { HP_POP(inter_party->calc_state, HP_inter_party_calc_state) }, { HP_POP(inter_party->tosql, HP_inter_party_tosql) }, + { HP_POP(inter_party->del_nonexistent_party, HP_inter_party_del_nonexistent_party) }, { HP_POP(inter_party->fromsql, HP_inter_party_fromsql) }, { HP_POP(inter_party->sql_init, HP_inter_party_sql_init) }, { HP_POP(inter_party->sql_final, HP_inter_party_sql_final) }, diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc index 83c8035b5..a022abb54 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc @@ -8712,6 +8712,33 @@ int HP_inter_party_check_lv(struct party_data *p) { } return retVal___; } +int HP_inter_party_is_family_party(struct party_data *p) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_inter_party_is_family_party_pre > 0) { + int (*preHookFunc) (struct party_data **p); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_is_family_party_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_party_is_family_party_pre[hIndex].func; + retVal___ = preHookFunc(&p); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_party.is_family_party(p); + } + if (HPMHooks.count.HP_inter_party_is_family_party_post > 0) { + int (*postHookFunc) (int retVal___, struct party_data *p); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_is_family_party_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_party_is_family_party_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); + } + } + return retVal___; +} void HP_inter_party_calc_state(struct party_data *p) { int hIndex = 0; if (HPMHooks.count.HP_inter_party_calc_state_pre > 0) { @@ -8765,6 +8792,33 @@ int HP_inter_party_tosql(struct party *p, int flag, int index) { } return retVal___; } +int HP_inter_party_del_nonexistent_party(int party_id) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_inter_party_del_nonexistent_party_pre > 0) { + int (*preHookFunc) (int *party_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_del_nonexistent_party_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_party_del_nonexistent_party_pre[hIndex].func; + retVal___ = preHookFunc(&party_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_party.del_nonexistent_party(party_id); + } + if (HPMHooks.count.HP_inter_party_del_nonexistent_party_post > 0) { + int (*postHookFunc) (int retVal___, int party_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_del_nonexistent_party_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_party_del_nonexistent_party_post[hIndex].func; + retVal___ = postHookFunc(retVal___, party_id); + } + } + return retVal___; +} struct party_data* HP_inter_party_fromsql(int party_id) { int hIndex = 0; struct party_data* retVal___ = NULL; |