Skip to content

Commit

Permalink
Update HPM
Browse files Browse the repository at this point in the history
  • Loading branch information
4144 committed Jan 24, 2022
1 parent aea99ca commit 9e7630c
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 46 deletions.
3 changes: 2 additions & 1 deletion src/common/HPMDataCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -694,8 +694,8 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "PACKET_ZC_ACK_RANKING_sub", sizeof(struct PACKET_ZC_ACK_RANKING_sub), SERVER_TYPE_MAP },
{ "PACKET_ZC_ACK_REMOVE_ITEM_MAIL", sizeof(struct PACKET_ZC_ACK_REMOVE_ITEM_MAIL), SERVER_TYPE_MAP },
{ "PACKET_ZC_ACK_REQMAKINGITEM", sizeof(struct PACKET_ZC_ACK_REQMAKINGITEM), SERVER_TYPE_MAP },
{ "PACKET_ZC_ACK_REQNAME_TITLE", sizeof(struct PACKET_ZC_ACK_REQNAME_TITLE), SERVER_TYPE_MAP },
{ "PACKET_ZC_ACK_REQNAMEALL", sizeof(struct PACKET_ZC_ACK_REQNAMEALL), SERVER_TYPE_MAP },
{ "PACKET_ZC_ACK_REQNAMEALL_NPC", sizeof(struct PACKET_ZC_ACK_REQNAMEALL_NPC), SERVER_TYPE_MAP },
{ "PACKET_ZC_ACK_SCHEDULER_CASHITEM", sizeof(struct PACKET_ZC_ACK_SCHEDULER_CASHITEM), SERVER_TYPE_MAP },
{ "PACKET_ZC_ACK_SCHEDULER_CASHITEM_sub", sizeof(struct PACKET_ZC_ACK_SCHEDULER_CASHITEM_sub), SERVER_TYPE_MAP },
{ "PACKET_ZC_ACK_TOUSESKILL", sizeof(struct PACKET_ZC_ACK_TOUSESKILL), SERVER_TYPE_MAP },
Expand Down Expand Up @@ -785,6 +785,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "PACKET_ZC_USE_SKILL", sizeof(struct PACKET_ZC_USE_SKILL), SERVER_TYPE_MAP },
{ "PACKET_ZC_WARPLIST", sizeof(struct PACKET_ZC_WARPLIST), SERVER_TYPE_MAP },
{ "PACKET_ZC_WARPLIST_sub", sizeof(struct PACKET_ZC_WARPLIST_sub), SERVER_TYPE_MAP },
{ "PACKET_ZC_WHISPER", sizeof(struct PACKET_ZC_WHISPER), SERVER_TYPE_MAP },
{ "PACKET_ZC_WRITE_MAIL_RESULT", sizeof(struct PACKET_ZC_WRITE_MAIL_RESULT), SERVER_TYPE_MAP },
{ "RELATED_GUILD_INFO", sizeof(struct RELATED_GUILD_INFO), SERVER_TYPE_MAP },
{ "REPAIRITEM_INFO1", sizeof(struct REPAIRITEM_INFO1), SERVER_TYPE_MAP },
Expand Down
12 changes: 6 additions & 6 deletions src/plugins/HPMHooking/HPMHooking.Defs.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1262,18 +1262,18 @@ typedef void (*HPMHOOK_pre_clif_cashshop_ack) (struct map_session_data **sd, int
typedef void (*HPMHOOK_post_clif_cashshop_ack) (struct map_session_data *sd, int error);
typedef void (*HPMHOOK_pre_clif_scriptmes) (struct map_session_data **sd, int *npcid, const char **mes);
typedef void (*HPMHOOK_post_clif_scriptmes) (struct map_session_data *sd, int npcid, const char *mes);
typedef void (*HPMHOOK_pre_clif_zc_say_dialog_zero1) (struct map_session_data **sd, int *npcid, const char **mes);
typedef void (*HPMHOOK_post_clif_zc_say_dialog_zero1) (struct map_session_data *sd, int npcid, const char *mes);
typedef void (*HPMHOOK_pre_clif_zc_say_dialog_zero2) (struct map_session_data **sd, int *npcid, const char **mes);
typedef void (*HPMHOOK_post_clif_zc_say_dialog_zero2) (struct map_session_data *sd, int npcid, const char *mes);
typedef void (*HPMHOOK_pre_clif_zc_quest_dialog) (struct map_session_data **sd, int *npcid, const char **mes);
typedef void (*HPMHOOK_post_clif_zc_quest_dialog) (struct map_session_data *sd, int npcid, const char *mes);
typedef void (*HPMHOOK_pre_clif_zc_monolog_dialog) (struct map_session_data **sd, int *npcid, const char **mes);
typedef void (*HPMHOOK_post_clif_zc_monolog_dialog) (struct map_session_data *sd, int npcid, const char *mes);
typedef void (*HPMHOOK_pre_clif_scriptnext) (struct map_session_data **sd, int *npcid);
typedef void (*HPMHOOK_post_clif_scriptnext) (struct map_session_data *sd, int npcid);
typedef void (*HPMHOOK_pre_clif_scriptclose) (struct map_session_data **sd, int *npcid);
typedef void (*HPMHOOK_post_clif_scriptclose) (struct map_session_data *sd, int npcid);
typedef void (*HPMHOOK_pre_clif_scriptmenu) (struct map_session_data **sd, int *npcid, const char **mes);
typedef void (*HPMHOOK_post_clif_scriptmenu) (struct map_session_data *sd, int npcid, const char *mes);
typedef void (*HPMHOOK_pre_clif_zc_menu_list_zero) (struct map_session_data **sd, int *npcid, const char **mes);
typedef void (*HPMHOOK_post_clif_zc_menu_list_zero) (struct map_session_data *sd, int npcid, const char *mes);
typedef void (*HPMHOOK_pre_clif_zc_quest_dialog_menu_list) (struct map_session_data **sd, int *npcid, const char **mes);
typedef void (*HPMHOOK_post_clif_zc_quest_dialog_menu_list) (struct map_session_data *sd, int npcid, const char *mes);
typedef void (*HPMHOOK_pre_clif_scriptinput) (struct map_session_data **sd, int *npcid);
typedef void (*HPMHOOK_post_clif_scriptinput) (struct map_session_data *sd, int npcid);
typedef void (*HPMHOOK_pre_clif_scriptinputstr) (struct map_session_data **sd, int *npcid);
Expand Down
24 changes: 12 additions & 12 deletions src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
Original file line number Diff line number Diff line change
Expand Up @@ -852,18 +852,18 @@ struct {
struct HPMHookPoint *HP_clif_cashshop_ack_post;
struct HPMHookPoint *HP_clif_scriptmes_pre;
struct HPMHookPoint *HP_clif_scriptmes_post;
struct HPMHookPoint *HP_clif_zc_say_dialog_zero1_pre;
struct HPMHookPoint *HP_clif_zc_say_dialog_zero1_post;
struct HPMHookPoint *HP_clif_zc_say_dialog_zero2_pre;
struct HPMHookPoint *HP_clif_zc_say_dialog_zero2_post;
struct HPMHookPoint *HP_clif_zc_quest_dialog_pre;
struct HPMHookPoint *HP_clif_zc_quest_dialog_post;
struct HPMHookPoint *HP_clif_zc_monolog_dialog_pre;
struct HPMHookPoint *HP_clif_zc_monolog_dialog_post;
struct HPMHookPoint *HP_clif_scriptnext_pre;
struct HPMHookPoint *HP_clif_scriptnext_post;
struct HPMHookPoint *HP_clif_scriptclose_pre;
struct HPMHookPoint *HP_clif_scriptclose_post;
struct HPMHookPoint *HP_clif_scriptmenu_pre;
struct HPMHookPoint *HP_clif_scriptmenu_post;
struct HPMHookPoint *HP_clif_zc_menu_list_zero_pre;
struct HPMHookPoint *HP_clif_zc_menu_list_zero_post;
struct HPMHookPoint *HP_clif_zc_quest_dialog_menu_list_pre;
struct HPMHookPoint *HP_clif_zc_quest_dialog_menu_list_post;
struct HPMHookPoint *HP_clif_scriptinput_pre;
struct HPMHookPoint *HP_clif_scriptinput_post;
struct HPMHookPoint *HP_clif_scriptinputstr_pre;
Expand Down Expand Up @@ -8135,18 +8135,18 @@ struct {
int HP_clif_cashshop_ack_post;
int HP_clif_scriptmes_pre;
int HP_clif_scriptmes_post;
int HP_clif_zc_say_dialog_zero1_pre;
int HP_clif_zc_say_dialog_zero1_post;
int HP_clif_zc_say_dialog_zero2_pre;
int HP_clif_zc_say_dialog_zero2_post;
int HP_clif_zc_quest_dialog_pre;
int HP_clif_zc_quest_dialog_post;
int HP_clif_zc_monolog_dialog_pre;
int HP_clif_zc_monolog_dialog_post;
int HP_clif_scriptnext_pre;
int HP_clif_scriptnext_post;
int HP_clif_scriptclose_pre;
int HP_clif_scriptclose_post;
int HP_clif_scriptmenu_pre;
int HP_clif_scriptmenu_post;
int HP_clif_zc_menu_list_zero_pre;
int HP_clif_zc_menu_list_zero_post;
int HP_clif_zc_quest_dialog_menu_list_pre;
int HP_clif_zc_quest_dialog_menu_list_post;
int HP_clif_scriptinput_pre;
int HP_clif_scriptinput_post;
int HP_clif_scriptinputstr_pre;
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
Original file line number Diff line number Diff line change
Expand Up @@ -450,12 +450,12 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->npc_sell_result, HP_clif_npc_sell_result) },
{ HP_POP(clif->cashshop_ack, HP_clif_cashshop_ack) },
{ HP_POP(clif->scriptmes, HP_clif_scriptmes) },
{ HP_POP(clif->zc_say_dialog_zero1, HP_clif_zc_say_dialog_zero1) },
{ HP_POP(clif->zc_say_dialog_zero2, HP_clif_zc_say_dialog_zero2) },
{ HP_POP(clif->zc_quest_dialog, HP_clif_zc_quest_dialog) },
{ HP_POP(clif->zc_monolog_dialog, HP_clif_zc_monolog_dialog) },
{ HP_POP(clif->scriptnext, HP_clif_scriptnext) },
{ HP_POP(clif->scriptclose, HP_clif_scriptclose) },
{ HP_POP(clif->scriptmenu, HP_clif_scriptmenu) },
{ HP_POP(clif->zc_menu_list_zero, HP_clif_zc_menu_list_zero) },
{ HP_POP(clif->zc_quest_dialog_menu_list, HP_clif_zc_quest_dialog_menu_list) },
{ HP_POP(clif->scriptinput, HP_clif_scriptinput) },
{ HP_POP(clif->scriptinputstr, HP_clif_scriptinputstr) },
{ HP_POP(clif->cutin, HP_clif_cutin) },
Expand Down
48 changes: 24 additions & 24 deletions src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
Original file line number Diff line number Diff line change
Expand Up @@ -11096,13 +11096,13 @@ void HP_clif_scriptmes(struct map_session_data *sd, int npcid, const char *mes)
}
return;
}
void HP_clif_zc_say_dialog_zero1(struct map_session_data *sd, int npcid, const char *mes) {
void HP_clif_zc_quest_dialog(struct map_session_data *sd, int npcid, const char *mes) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_zc_say_dialog_zero1_pre > 0) {
if (HPMHooks.count.HP_clif_zc_quest_dialog_pre > 0) {
void (*preHookFunc) (struct map_session_data **sd, int *npcid, const char **mes);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_zc_say_dialog_zero1_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_clif_zc_say_dialog_zero1_pre[hIndex].func;
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_zc_quest_dialog_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_clif_zc_quest_dialog_pre[hIndex].func;
preHookFunc(&sd, &npcid, &mes);
}
if (*HPMforce_return) {
Expand All @@ -11111,24 +11111,24 @@ void HP_clif_zc_say_dialog_zero1(struct map_session_data *sd, int npcid, const c
}
}
{
HPMHooks.source.clif.zc_say_dialog_zero1(sd, npcid, mes);
HPMHooks.source.clif.zc_quest_dialog(sd, npcid, mes);
}
if (HPMHooks.count.HP_clif_zc_say_dialog_zero1_post > 0) {
if (HPMHooks.count.HP_clif_zc_quest_dialog_post > 0) {
void (*postHookFunc) (struct map_session_data *sd, int npcid, const char *mes);
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_zc_say_dialog_zero1_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_clif_zc_say_dialog_zero1_post[hIndex].func;
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_zc_quest_dialog_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_clif_zc_quest_dialog_post[hIndex].func;
postHookFunc(sd, npcid, mes);
}
}
return;
}
void HP_clif_zc_say_dialog_zero2(struct map_session_data *sd, int npcid, const char *mes) {
void HP_clif_zc_monolog_dialog(struct map_session_data *sd, int npcid, const char *mes) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_zc_say_dialog_zero2_pre > 0) {
if (HPMHooks.count.HP_clif_zc_monolog_dialog_pre > 0) {
void (*preHookFunc) (struct map_session_data **sd, int *npcid, const char **mes);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_zc_say_dialog_zero2_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_clif_zc_say_dialog_zero2_pre[hIndex].func;
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_zc_monolog_dialog_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_clif_zc_monolog_dialog_pre[hIndex].func;
preHookFunc(&sd, &npcid, &mes);
}
if (*HPMforce_return) {
Expand All @@ -11137,12 +11137,12 @@ void HP_clif_zc_say_dialog_zero2(struct map_session_data *sd, int npcid, const c
}
}
{
HPMHooks.source.clif.zc_say_dialog_zero2(sd, npcid, mes);
HPMHooks.source.clif.zc_monolog_dialog(sd, npcid, mes);
}
if (HPMHooks.count.HP_clif_zc_say_dialog_zero2_post > 0) {
if (HPMHooks.count.HP_clif_zc_monolog_dialog_post > 0) {
void (*postHookFunc) (struct map_session_data *sd, int npcid, const char *mes);
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_zc_say_dialog_zero2_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_clif_zc_say_dialog_zero2_post[hIndex].func;
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_zc_monolog_dialog_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_clif_zc_monolog_dialog_post[hIndex].func;
postHookFunc(sd, npcid, mes);
}
}
Expand Down Expand Up @@ -11226,13 +11226,13 @@ void HP_clif_scriptmenu(struct map_session_data *sd, int npcid, const char *mes)
}
return;
}
void HP_clif_zc_menu_list_zero(struct map_session_data *sd, int npcid, const char *mes) {
void HP_clif_zc_quest_dialog_menu_list(struct map_session_data *sd, int npcid, const char *mes) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_zc_menu_list_zero_pre > 0) {
if (HPMHooks.count.HP_clif_zc_quest_dialog_menu_list_pre > 0) {
void (*preHookFunc) (struct map_session_data **sd, int *npcid, const char **mes);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_zc_menu_list_zero_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_clif_zc_menu_list_zero_pre[hIndex].func;
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_zc_quest_dialog_menu_list_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_clif_zc_quest_dialog_menu_list_pre[hIndex].func;
preHookFunc(&sd, &npcid, &mes);
}
if (*HPMforce_return) {
Expand All @@ -11241,12 +11241,12 @@ void HP_clif_zc_menu_list_zero(struct map_session_data *sd, int npcid, const cha
}
}
{
HPMHooks.source.clif.zc_menu_list_zero(sd, npcid, mes);
HPMHooks.source.clif.zc_quest_dialog_menu_list(sd, npcid, mes);
}
if (HPMHooks.count.HP_clif_zc_menu_list_zero_post > 0) {
if (HPMHooks.count.HP_clif_zc_quest_dialog_menu_list_post > 0) {
void (*postHookFunc) (struct map_session_data *sd, int npcid, const char *mes);
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_zc_menu_list_zero_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_clif_zc_menu_list_zero_post[hIndex].func;
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_zc_quest_dialog_menu_list_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_clif_zc_quest_dialog_menu_list_post[hIndex].func;
postHookFunc(sd, npcid, mes);
}
}
Expand Down

0 comments on commit 9e7630c

Please sign in to comment.