summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHercules.ws <dev@herc.ws>2018-04-03 00:12:17 +0200
committerHerculesWSAPI <dev@herc.ws>2018-04-03 00:12:17 +0200
commitb5bd99a39aee9b555fbe90fe1c839c7cfffed9c0 (patch)
tree211d8b83885bdbaebdf9d5535ba566ab31d78ef3 /src
parent90ce24c61f48bf37f7f29e56b81f1d8713ddb299 (diff)
downloadhercules-b5bd99a39aee9b555fbe90fe1c839c7cfffed9c0.tar.gz
hercules-b5bd99a39aee9b555fbe90fe1c839c7cfffed9c0.tar.bz2
hercules-b5bd99a39aee9b555fbe90fe1c839c7cfffed9c0.tar.xz
hercules-b5bd99a39aee9b555fbe90fe1c839c7cfffed9c0.zip
HPM Hooks Update
Signed-off-by: HerculesWSAPI <dev@herc.ws>
Diffstat (limited to 'src')
-rw-r--r--src/common/HPMDataCheck.h6
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc2
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc4
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc1
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc26
5 files changed, 39 insertions, 0 deletions
diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h
index 4bcb33e23..30cb01857 100644
--- a/src/common/HPMDataCheck.h
+++ b/src/common/HPMDataCheck.h
@@ -656,8 +656,14 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "packet_npc_market_result_ack", sizeof(struct packet_npc_market_result_ack), SERVER_TYPE_MAP },
{ "packet_package_item_announce", sizeof(struct packet_package_item_announce), SERVER_TYPE_MAP },
{ "packet_party_leader_changed", sizeof(struct packet_party_leader_changed), SERVER_TYPE_MAP },
+ { "packet_quest_add_header", sizeof(struct packet_quest_add_header), SERVER_TYPE_MAP },
+ { "packet_quest_hunt_info", sizeof(struct packet_quest_hunt_info), SERVER_TYPE_MAP },
+ { "packet_quest_hunt_info_sub", sizeof(struct packet_quest_hunt_info_sub), SERVER_TYPE_MAP },
+ { "packet_quest_hunt_sub", sizeof(struct packet_quest_hunt_sub), SERVER_TYPE_MAP },
{ "packet_quest_list_header", sizeof(struct packet_quest_list_header), SERVER_TYPE_MAP },
{ "packet_quest_list_info", sizeof(struct packet_quest_list_info), SERVER_TYPE_MAP },
+ { "packet_quest_update_header", sizeof(struct packet_quest_update_header), SERVER_TYPE_MAP },
+ { "packet_quest_update_hunt", sizeof(struct packet_quest_update_hunt), SERVER_TYPE_MAP },
{ "packet_roulette_close_ack", sizeof(struct packet_roulette_close_ack), SERVER_TYPE_MAP },
{ "packet_roulette_generate_ack", sizeof(struct packet_roulette_generate_ack), SERVER_TYPE_MAP },
{ "packet_roulette_info_ack", sizeof(struct packet_roulette_info_ack), SERVER_TYPE_MAP },
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index a71ab3ebf..e787b222f 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -1692,6 +1692,8 @@ typedef void (*HPMHOOK_pre_clif_quest_update_status) (struct map_session_data **
typedef void (*HPMHOOK_post_clif_quest_update_status) (struct map_session_data *sd, int quest_id, bool active);
typedef void (*HPMHOOK_pre_clif_quest_update_objective) (struct map_session_data **sd, struct quest **qd);
typedef void (*HPMHOOK_post_clif_quest_update_objective) (struct map_session_data *sd, struct quest *qd);
+typedef void (*HPMHOOK_pre_clif_quest_notify_objective) (struct map_session_data **sd, struct quest **qd);
+typedef void (*HPMHOOK_post_clif_quest_notify_objective) (struct map_session_data *sd, struct quest *qd);
typedef void (*HPMHOOK_pre_clif_quest_show_event) (struct map_session_data **sd, struct block_list **bl, short *state, short *color);
typedef void (*HPMHOOK_post_clif_quest_show_event) (struct map_session_data *sd, struct block_list *bl, short state, short color);
typedef void (*HPMHOOK_pre_clif_mail_window) (int *fd, int *flag);
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index 905f6a65d..d799b8693 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -1286,6 +1286,8 @@ struct {
struct HPMHookPoint *HP_clif_quest_update_status_post;
struct HPMHookPoint *HP_clif_quest_update_objective_pre;
struct HPMHookPoint *HP_clif_quest_update_objective_post;
+ struct HPMHookPoint *HP_clif_quest_notify_objective_pre;
+ struct HPMHookPoint *HP_clif_quest_notify_objective_post;
struct HPMHookPoint *HP_clif_quest_show_event_pre;
struct HPMHookPoint *HP_clif_quest_show_event_post;
struct HPMHookPoint *HP_clif_mail_window_pre;
@@ -7571,6 +7573,8 @@ struct {
int HP_clif_quest_update_status_post;
int HP_clif_quest_update_objective_pre;
int HP_clif_quest_update_objective_post;
+ int HP_clif_quest_notify_objective_pre;
+ int HP_clif_quest_notify_objective_post;
int HP_clif_quest_show_event_pre;
int HP_clif_quest_show_event_post;
int HP_clif_mail_window_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index 39bca48e9..045c8a087 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -666,6 +666,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->quest_delete, HP_clif_quest_delete) },
{ HP_POP(clif->quest_update_status, HP_clif_quest_update_status) },
{ HP_POP(clif->quest_update_objective, HP_clif_quest_update_objective) },
+ { HP_POP(clif->quest_notify_objective, HP_clif_quest_notify_objective) },
{ HP_POP(clif->quest_show_event, HP_clif_quest_show_event) },
{ HP_POP(clif->mail_window, HP_clif_mail_window) },
{ HP_POP(clif->mail_read, HP_clif_mail_read) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 8fe407aab..b34151205 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -16753,6 +16753,32 @@ void HP_clif_quest_update_objective(struct map_session_data *sd, struct quest *q
}
return;
}
+void HP_clif_quest_notify_objective(struct map_session_data *sd, struct quest *qd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_quest_notify_objective_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, struct quest **qd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_notify_objective_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_quest_notify_objective_pre[hIndex].func;
+ preHookFunc(&sd, &qd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.quest_notify_objective(sd, qd);
+ }
+ if (HPMHooks.count.HP_clif_quest_notify_objective_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, struct quest *qd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_notify_objective_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_quest_notify_objective_post[hIndex].func;
+ postHookFunc(sd, qd);
+ }
+ }
+ return;
+}
void HP_clif_quest_show_event(struct map_session_data *sd, struct block_list *bl, short state, short color) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_quest_show_event_pre > 0) {