Skip to content

Commit

Permalink
Regenerate hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
skyleo committed Apr 15, 2024
1 parent 7b11d3e commit eca68d7
Show file tree
Hide file tree
Showing 4 changed files with 152 additions and 16 deletions.
20 changes: 14 additions & 6 deletions src/plugins/HPMHooking/HPMHooking.Defs.inc
Original file line number Diff line number Diff line change
Expand Up @@ -9036,8 +9036,8 @@ typedef void (*HPMHOOK_pre_status_final) (void);
typedef void (*HPMHOOK_post_status_final) (void);
typedef int (*HPMHOOK_pre_status_sc2skill) (sc_type *sc);
typedef int (*HPMHOOK_post_status_sc2skill) (int retVal___, sc_type sc);
typedef unsigned int (*HPMHOOK_pre_status_sc2scb_flag) (sc_type *sc);
typedef unsigned int (*HPMHOOK_post_status_sc2scb_flag) (unsigned int retVal___, sc_type sc);
typedef enum scb_flag (*HPMHOOK_pre_status_sc2scb_flag) (sc_type *sc);
typedef enum scb_flag (*HPMHOOK_post_status_sc2scb_flag) (enum scb_flag retVal___, sc_type sc);
typedef int (*HPMHOOK_pre_status_get_sc_relevant_bl_types) (sc_type *type);
typedef int (*HPMHOOK_post_status_get_sc_relevant_bl_types) (int retVal___, sc_type type);
typedef int (*HPMHOOK_pre_status_get_sc_type) (sc_type *idx);
Expand Down Expand Up @@ -9122,8 +9122,8 @@ typedef int (*HPMHOOK_pre_status_get_val_flag) (enum sc_type *type);
typedef int (*HPMHOOK_post_status_get_val_flag) (int retVal___, enum sc_type type);
typedef void (*HPMHOOK_pre_status_change_start_display) (struct map_session_data **sd, enum sc_type *type, int *val1, int *val2, int *val3, int *val4);
typedef void (*HPMHOOK_post_status_change_start_display) (struct map_session_data *sd, enum sc_type type, int val1, int val2, int val3, int val4);
typedef bool (*HPMHOOK_pre_status_change_start_unknown_sc) (struct block_list **src, struct block_list **bl, enum sc_type *type, int *calc_flag, int *rate, int *val1, int *val2, int *val3, int *val4, int *total_tick, int *flag);
typedef bool (*HPMHOOK_post_status_change_start_unknown_sc) (bool retVal___, struct block_list *src, struct block_list *bl, enum sc_type type, int calc_flag, int rate, int val1, int val2, int val3, int val4, int total_tick, int flag);
typedef bool (*HPMHOOK_pre_status_change_start_unknown_sc) (struct block_list **src, struct block_list **bl, enum sc_type *type, enum scb_flag *calc_flag, int *rate, int *val1, int *val2, int *val3, int *val4, int *total_tick, int *flag);
typedef bool (*HPMHOOK_post_status_change_start_unknown_sc) (bool retVal___, struct block_list *src, struct block_list *bl, enum sc_type type, enum scb_flag calc_flag, int rate, int val1, int val2, int val3, int val4, int total_tick, int flag);
typedef int (*HPMHOOK_pre_status_kaahi_heal_timer) (int *tid, int64 *tick, int *id, intptr_t *data);
typedef int (*HPMHOOK_post_status_kaahi_heal_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data);
typedef int (*HPMHOOK_pre_status_change_timer) (int *tid, int64 *tick, int *id, intptr_t *data);
Expand Down Expand Up @@ -9236,6 +9236,14 @@ typedef unsigned short (*HPMHOOK_pre_status_calc_dex) (struct block_list **bl, s
typedef unsigned short (*HPMHOOK_post_status_calc_dex) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int dex);
typedef unsigned short (*HPMHOOK_pre_status_calc_luk) (struct block_list **bl, struct status_change **sc, int *luk);
typedef unsigned short (*HPMHOOK_post_status_calc_luk) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int luk);
typedef int (*HPMHOOK_pre_status_calc_atk_percent) (struct block_list **bl, struct status_change **sc);
typedef int (*HPMHOOK_post_status_calc_atk_percent) (int retVal___, struct block_list *bl, struct status_change *sc);
typedef int (*HPMHOOK_pre_status_calc_matk_percent) (struct block_list **bl, struct status_change **sc);
typedef int (*HPMHOOK_post_status_calc_matk_percent) (int retVal___, struct block_list *bl, struct status_change *sc);
typedef int (*HPMHOOK_pre_status_calc_def_percent) (struct block_list **bl, struct status_change **sc);
typedef int (*HPMHOOK_post_status_calc_def_percent) (int retVal___, struct block_list *bl, struct status_change *sc);
typedef int (*HPMHOOK_pre_status_calc_mdef_percent) (struct block_list **bl, struct status_change **sc);
typedef int (*HPMHOOK_post_status_calc_mdef_percent) (int retVal___, struct block_list *bl, struct status_change *sc);
typedef int (*HPMHOOK_pre_status_calc_watk) (struct block_list **bl, struct status_change **sc, int *watk, bool *viewable);
typedef int (*HPMHOOK_post_status_calc_watk) (int retVal___, struct block_list *bl, struct status_change *sc, int watk, bool viewable);
typedef int (*HPMHOOK_pre_status_calc_matk) (struct block_list **bl, struct status_change **sc, int *matk, bool *viewable);
Expand Down Expand Up @@ -9270,8 +9278,8 @@ typedef uint32 (*HPMHOOK_pre_status_calc_mode) (const struct block_list **bl, co
typedef uint32 (*HPMHOOK_post_status_calc_mode) (uint32 retVal___, const struct block_list *bl, const struct status_change *sc, uint32 mode);
typedef int (*HPMHOOK_pre_status_calc_ematk) (struct block_list **bl, struct status_change **sc, int *matk);
typedef int (*HPMHOOK_post_status_calc_ematk) (int retVal___, struct block_list *bl, struct status_change *sc, int matk);
typedef void (*HPMHOOK_pre_status_calc_bl_main) (struct block_list **bl, int *flag);
typedef void (*HPMHOOK_post_status_calc_bl_main) (struct block_list *bl, int flag);
typedef void (*HPMHOOK_pre_status_calc_bl_main) (struct block_list **bl, enum scb_flag *flag);
typedef void (*HPMHOOK_post_status_calc_bl_main) (struct block_list *bl, enum scb_flag flag);
typedef void (*HPMHOOK_pre_status_display_add) (struct map_session_data **sd, enum sc_type *type, int *dval1, int *dval2, int *dval3);
typedef void (*HPMHOOK_post_status_display_add) (struct map_session_data *sd, enum sc_type type, int dval1, int dval2, int dval3);
typedef void (*HPMHOOK_pre_status_display_remove) (struct map_session_data **sd, enum sc_type *type);
Expand Down
16 changes: 16 additions & 0 deletions src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
Original file line number Diff line number Diff line change
Expand Up @@ -7152,6 +7152,14 @@ struct {
struct HPMHookPoint *HP_status_calc_dex_post;
struct HPMHookPoint *HP_status_calc_luk_pre;
struct HPMHookPoint *HP_status_calc_luk_post;
struct HPMHookPoint *HP_status_calc_atk_percent_pre;
struct HPMHookPoint *HP_status_calc_atk_percent_post;
struct HPMHookPoint *HP_status_calc_matk_percent_pre;
struct HPMHookPoint *HP_status_calc_matk_percent_post;
struct HPMHookPoint *HP_status_calc_def_percent_pre;
struct HPMHookPoint *HP_status_calc_def_percent_post;
struct HPMHookPoint *HP_status_calc_mdef_percent_pre;
struct HPMHookPoint *HP_status_calc_mdef_percent_post;
struct HPMHookPoint *HP_status_calc_watk_pre;
struct HPMHookPoint *HP_status_calc_watk_post;
struct HPMHookPoint *HP_status_calc_matk_pre;
Expand Down Expand Up @@ -14709,6 +14717,14 @@ struct {
int HP_status_calc_dex_post;
int HP_status_calc_luk_pre;
int HP_status_calc_luk_post;
int HP_status_calc_atk_percent_pre;
int HP_status_calc_atk_percent_post;
int HP_status_calc_matk_percent_pre;
int HP_status_calc_matk_percent_post;
int HP_status_calc_def_percent_pre;
int HP_status_calc_def_percent_post;
int HP_status_calc_mdef_percent_pre;
int HP_status_calc_mdef_percent_post;
int HP_status_calc_watk_pre;
int HP_status_calc_watk_post;
int HP_status_calc_matk_pre;
Expand Down
4 changes: 4 additions & 0 deletions src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
Original file line number Diff line number Diff line change
Expand Up @@ -3655,6 +3655,10 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(status->calc_int, HP_status_calc_int) },
{ HP_POP(status->calc_dex, HP_status_calc_dex) },
{ HP_POP(status->calc_luk, HP_status_calc_luk) },
{ HP_POP(status->calc_atk_percent, HP_status_calc_atk_percent) },
{ HP_POP(status->calc_matk_percent, HP_status_calc_matk_percent) },
{ HP_POP(status->calc_def_percent, HP_status_calc_def_percent) },
{ HP_POP(status->calc_mdef_percent, HP_status_calc_mdef_percent) },
{ HP_POP(status->calc_watk, HP_status_calc_watk) },
{ HP_POP(status->calc_matk, HP_status_calc_matk) },
{ HP_POP(status->calc_hit, HP_status_calc_hit) },
Expand Down
128 changes: 118 additions & 10 deletions src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
Original file line number Diff line number Diff line change
Expand Up @@ -92907,11 +92907,11 @@ int HP_status_sc2skill(sc_type sc) {
}
return retVal___;
}
unsigned int HP_status_sc2scb_flag(sc_type sc) {
enum scb_flag HP_status_sc2scb_flag(sc_type sc) {
int hIndex = 0;
unsigned int retVal___ = 0;
enum scb_flag retVal___ = SCB_NONE;
if (HPMHooks.count.HP_status_sc2scb_flag_pre > 0) {
unsigned int (*preHookFunc) (sc_type *sc);
enum scb_flag (*preHookFunc) (sc_type *sc);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_status_sc2scb_flag_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_status_sc2scb_flag_pre[hIndex].func;
Expand All @@ -92926,7 +92926,7 @@ unsigned int HP_status_sc2scb_flag(sc_type sc) {
retVal___ = HPMHooks.source.status.sc2scb_flag(sc);
}
if (HPMHooks.count.HP_status_sc2scb_flag_post > 0) {
unsigned int (*postHookFunc) (unsigned int retVal___, sc_type sc);
enum scb_flag (*postHookFunc) (enum scb_flag retVal___, sc_type sc);
for (hIndex = 0; hIndex < HPMHooks.count.HP_status_sc2scb_flag_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_status_sc2scb_flag_post[hIndex].func;
retVal___ = postHookFunc(retVal___, sc);
Expand Down Expand Up @@ -94064,11 +94064,11 @@ void HP_status_change_start_display(struct map_session_data *sd, enum sc_type ty
}
return;
}
bool HP_status_change_start_unknown_sc(struct block_list *src, struct block_list *bl, enum sc_type type, int calc_flag, int rate, int val1, int val2, int val3, int val4, int total_tick, int flag) {
bool HP_status_change_start_unknown_sc(struct block_list *src, struct block_list *bl, enum sc_type type, enum scb_flag calc_flag, int rate, int val1, int val2, int val3, int val4, int total_tick, int flag) {
int hIndex = 0;
bool retVal___ = false;
if (HPMHooks.count.HP_status_change_start_unknown_sc_pre > 0) {
bool (*preHookFunc) (struct block_list **src, struct block_list **bl, enum sc_type *type, int *calc_flag, int *rate, int *val1, int *val2, int *val3, int *val4, int *total_tick, int *flag);
bool (*preHookFunc) (struct block_list **src, struct block_list **bl, enum sc_type *type, enum scb_flag *calc_flag, int *rate, int *val1, int *val2, int *val3, int *val4, int *total_tick, int *flag);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_unknown_sc_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_status_change_start_unknown_sc_pre[hIndex].func;
Expand All @@ -94083,7 +94083,7 @@ bool HP_status_change_start_unknown_sc(struct block_list *src, struct block_list
retVal___ = HPMHooks.source.status.change_start_unknown_sc(src, bl, type, calc_flag, rate, val1, val2, val3, val4, total_tick, flag);
}
if (HPMHooks.count.HP_status_change_start_unknown_sc_post > 0) {
bool (*postHookFunc) (bool retVal___, struct block_list *src, struct block_list *bl, enum sc_type type, int calc_flag, int rate, int val1, int val2, int val3, int val4, int total_tick, int flag);
bool (*postHookFunc) (bool retVal___, struct block_list *src, struct block_list *bl, enum sc_type type, enum scb_flag calc_flag, int rate, int val1, int val2, int val3, int val4, int total_tick, int flag);
for (hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_unknown_sc_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_status_change_start_unknown_sc_post[hIndex].func;
retVal___ = postHookFunc(retVal___, src, bl, type, calc_flag, rate, val1, val2, val3, val4, total_tick, flag);
Expand Down Expand Up @@ -95593,6 +95593,114 @@ unsigned short HP_status_calc_luk(struct block_list *bl, struct status_change *s
}
return retVal___;
}
int HP_status_calc_atk_percent(struct block_list *bl, struct status_change *sc) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_status_calc_atk_percent_pre > 0) {
int (*preHookFunc) (struct block_list **bl, struct status_change **sc);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_atk_percent_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_status_calc_atk_percent_pre[hIndex].func;
retVal___ = preHookFunc(&bl, &sc);
}
if (*HPMforce_return) {
*HPMforce_return = false;
return retVal___;
}
}
{
retVal___ = HPMHooks.source.status.calc_atk_percent(bl, sc);
}
if (HPMHooks.count.HP_status_calc_atk_percent_post > 0) {
int (*postHookFunc) (int retVal___, struct block_list *bl, struct status_change *sc);
for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_atk_percent_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_status_calc_atk_percent_post[hIndex].func;
retVal___ = postHookFunc(retVal___, bl, sc);
}
}
return retVal___;
}
int HP_status_calc_matk_percent(struct block_list *bl, struct status_change *sc) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_status_calc_matk_percent_pre > 0) {
int (*preHookFunc) (struct block_list **bl, struct status_change **sc);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_matk_percent_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_status_calc_matk_percent_pre[hIndex].func;
retVal___ = preHookFunc(&bl, &sc);
}
if (*HPMforce_return) {
*HPMforce_return = false;
return retVal___;
}
}
{
retVal___ = HPMHooks.source.status.calc_matk_percent(bl, sc);
}
if (HPMHooks.count.HP_status_calc_matk_percent_post > 0) {
int (*postHookFunc) (int retVal___, struct block_list *bl, struct status_change *sc);
for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_matk_percent_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_status_calc_matk_percent_post[hIndex].func;
retVal___ = postHookFunc(retVal___, bl, sc);
}
}
return retVal___;
}
int HP_status_calc_def_percent(struct block_list *bl, struct status_change *sc) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_status_calc_def_percent_pre > 0) {
int (*preHookFunc) (struct block_list **bl, struct status_change **sc);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_def_percent_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_status_calc_def_percent_pre[hIndex].func;
retVal___ = preHookFunc(&bl, &sc);
}
if (*HPMforce_return) {
*HPMforce_return = false;
return retVal___;
}
}
{
retVal___ = HPMHooks.source.status.calc_def_percent(bl, sc);
}
if (HPMHooks.count.HP_status_calc_def_percent_post > 0) {
int (*postHookFunc) (int retVal___, struct block_list *bl, struct status_change *sc);
for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_def_percent_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_status_calc_def_percent_post[hIndex].func;
retVal___ = postHookFunc(retVal___, bl, sc);
}
}
return retVal___;
}
int HP_status_calc_mdef_percent(struct block_list *bl, struct status_change *sc) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_status_calc_mdef_percent_pre > 0) {
int (*preHookFunc) (struct block_list **bl, struct status_change **sc);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mdef_percent_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_status_calc_mdef_percent_pre[hIndex].func;
retVal___ = preHookFunc(&bl, &sc);
}
if (*HPMforce_return) {
*HPMforce_return = false;
return retVal___;
}
}
{
retVal___ = HPMHooks.source.status.calc_mdef_percent(bl, sc);
}
if (HPMHooks.count.HP_status_calc_mdef_percent_post > 0) {
int (*postHookFunc) (int retVal___, struct block_list *bl, struct status_change *sc);
for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mdef_percent_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_status_calc_mdef_percent_post[hIndex].func;
retVal___ = postHookFunc(retVal___, bl, sc);
}
}
return retVal___;
}
int HP_status_calc_watk(struct block_list *bl, struct status_change *sc, int watk, bool viewable) {
int hIndex = 0;
int retVal___ = 0;
Expand Down Expand Up @@ -96052,10 +96160,10 @@ int HP_status_calc_ematk(struct block_list *bl, struct status_change *sc, int ma
}
return retVal___;
}
void HP_status_calc_bl_main(struct block_list *bl, int flag) {
void HP_status_calc_bl_main(struct block_list *bl, enum scb_flag flag) {
int hIndex = 0;
if (HPMHooks.count.HP_status_calc_bl_main_pre > 0) {
void (*preHookFunc) (struct block_list **bl, int *flag);
void (*preHookFunc) (struct block_list **bl, enum scb_flag *flag);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_bl_main_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_status_calc_bl_main_pre[hIndex].func;
Expand All @@ -96070,7 +96178,7 @@ void HP_status_calc_bl_main(struct block_list *bl, int flag) {
HPMHooks.source.status.calc_bl_main(bl, flag);
}
if (HPMHooks.count.HP_status_calc_bl_main_post > 0) {
void (*postHookFunc) (struct block_list *bl, int flag);
void (*postHookFunc) (struct block_list *bl, enum scb_flag flag);
for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_bl_main_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_status_calc_bl_main_post[hIndex].func;
postHookFunc(bl, flag);
Expand Down

0 comments on commit eca68d7

Please sign in to comment.