Skip to content
Permalink
Browse files

HPM Hooks Update

Signed-off-by: HerculesWSAPI <dev@herc.ws>
  • Loading branch information...
HerculesWSAPI committed Apr 7, 2019
1 parent f71e3a5 commit 6ea3d0fe87019bd7a9f235827f261b21cd87715e
@@ -2624,6 +2624,8 @@ typedef void (*HPMHOOK_pre_clif_pReqStyleChange) (int *fd, struct map_session_da
typedef void (*HPMHOOK_post_clif_pReqStyleChange) (int fd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_pReqStyleChange2) (int *fd, struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_pReqStyleChange2) (int fd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_pStyleClose) (int *fd, struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_pStyleClose) (int fd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_style_change_response) (struct map_session_data **sd, enum stylist_shop *flag);
typedef void (*HPMHOOK_post_clif_style_change_response) (struct map_session_data *sd, enum stylist_shop flag);
typedef void (*HPMHOOK_pre_clif_pPetEvolution) (int *fd, struct map_session_data **sd);
@@ -2214,6 +2214,8 @@ struct {
struct HPMHookPoint *HP_clif_pReqStyleChange_post;
struct HPMHookPoint *HP_clif_pReqStyleChange2_pre;
struct HPMHookPoint *HP_clif_pReqStyleChange2_post;
struct HPMHookPoint *HP_clif_pStyleClose_pre;
struct HPMHookPoint *HP_clif_pStyleClose_post;
struct HPMHookPoint *HP_clif_style_change_response_pre;
struct HPMHookPoint *HP_clif_style_change_response_post;
struct HPMHookPoint *HP_clif_pPetEvolution_pre;
@@ -8899,6 +8901,8 @@ struct {
int HP_clif_pReqStyleChange_post;
int HP_clif_pReqStyleChange2_pre;
int HP_clif_pReqStyleChange2_post;
int HP_clif_pStyleClose_pre;
int HP_clif_pStyleClose_post;
int HP_clif_style_change_response_pre;
int HP_clif_style_change_response_post;
int HP_clif_pPetEvolution_pre;
@@ -1131,6 +1131,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->PrivateAirshipResponse, HP_clif_PrivateAirshipResponse) },
{ HP_POP(clif->pReqStyleChange, HP_clif_pReqStyleChange) },
{ HP_POP(clif->pReqStyleChange2, HP_clif_pReqStyleChange2) },
{ HP_POP(clif->pStyleClose, HP_clif_pStyleClose) },
{ HP_POP(clif->style_change_response, HP_clif_style_change_response) },
{ HP_POP(clif->pPetEvolution, HP_clif_pPetEvolution) },
{ HP_POP(clif->petEvolutionResult, HP_clif_petEvolutionResult) },
}
return;
}
void HP_clif_pStyleClose(int fd, struct map_session_data *sd) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_pStyleClose_pre > 0) {
void (*preHookFunc) (int *fd, struct map_session_data **sd);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStyleClose_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_clif_pStyleClose_pre[hIndex].func;
preHookFunc(&fd, &sd);
}
if (*HPMforce_return) {
*HPMforce_return = false;
return;
}
}
{
HPMHooks.source.clif.pStyleClose(fd, sd);
}
if (HPMHooks.count.HP_clif_pStyleClose_post > 0) {
void (*postHookFunc) (int fd, struct map_session_data *sd);
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStyleClose_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_clif_pStyleClose_post[hIndex].func;
postHookFunc(fd, sd);
}
}
return;
}
void HP_clif_style_change_response(struct map_session_data *sd, enum stylist_shop flag) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_style_change_response_pre > 0) {

0 comments on commit 6ea3d0f

Please sign in to comment.
You can’t perform that action at this time.