summaryrefslogtreecommitdiff
path: root/src/plugins/HPMHooking
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/HPMHooking')
-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
4 files changed, 33 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index 4345108d3..8c6f43433 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -1514,6 +1514,8 @@ typedef void (*HPMHOOK_pre_clif_misceffect) (struct block_list **bl, int *type);
typedef void (*HPMHOOK_post_clif_misceffect) (struct block_list *bl, int type);
typedef void (*HPMHOOK_pre_clif_changeoption) (struct block_list **bl);
typedef void (*HPMHOOK_post_clif_changeoption) (struct block_list *bl);
+typedef void (*HPMHOOK_pre_clif_changeoption_target) (struct block_list **bl, struct block_list **target_bl, enum send_target *target);
+typedef void (*HPMHOOK_post_clif_changeoption_target) (struct block_list *bl, struct block_list *target_bl, enum send_target target);
typedef void (*HPMHOOK_pre_clif_changeoption2) (struct block_list **bl);
typedef void (*HPMHOOK_post_clif_changeoption2) (struct block_list *bl);
typedef void (*HPMHOOK_pre_clif_emotion) (struct block_list **bl, int *type);
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index b5f04af50..53ba3403c 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -1104,6 +1104,8 @@ struct {
struct HPMHookPoint *HP_clif_misceffect_post;
struct HPMHookPoint *HP_clif_changeoption_pre;
struct HPMHookPoint *HP_clif_changeoption_post;
+ struct HPMHookPoint *HP_clif_changeoption_target_pre;
+ struct HPMHookPoint *HP_clif_changeoption_target_post;
struct HPMHookPoint *HP_clif_changeoption2_pre;
struct HPMHookPoint *HP_clif_changeoption2_post;
struct HPMHookPoint *HP_clif_emotion_pre;
@@ -7969,6 +7971,8 @@ struct {
int HP_clif_misceffect_post;
int HP_clif_changeoption_pre;
int HP_clif_changeoption_post;
+ int HP_clif_changeoption_target_pre;
+ int HP_clif_changeoption_target_post;
int HP_clif_changeoption2_pre;
int HP_clif_changeoption2_post;
int HP_clif_emotion_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index 1967f8c82..0904a1dac 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -576,6 +576,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->quitsave, HP_clif_quitsave) },
{ HP_POP(clif->misceffect, HP_clif_misceffect) },
{ HP_POP(clif->changeoption, HP_clif_changeoption) },
+ { HP_POP(clif->changeoption_target, HP_clif_changeoption_target) },
{ HP_POP(clif->changeoption2, HP_clif_changeoption2) },
{ HP_POP(clif->emotion, HP_clif_emotion) },
{ HP_POP(clif->talkiebox, HP_clif_talkiebox) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index d7d183f28..319e675a8 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -14402,6 +14402,32 @@ void HP_clif_changeoption(struct block_list *bl) {
}
return;
}
+void HP_clif_changeoption_target(struct block_list *bl, struct block_list *target_bl, enum send_target target) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_changeoption_target_pre > 0) {
+ void (*preHookFunc) (struct block_list **bl, struct block_list **target_bl, enum send_target *target);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_changeoption_target_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_changeoption_target_pre[hIndex].func;
+ preHookFunc(&bl, &target_bl, &target);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.changeoption_target(bl, target_bl, target);
+ }
+ if (HPMHooks.count.HP_clif_changeoption_target_post > 0) {
+ void (*postHookFunc) (struct block_list *bl, struct block_list *target_bl, enum send_target target);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_changeoption_target_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_changeoption_target_post[hIndex].func;
+ postHookFunc(bl, target_bl, target);
+ }
+ }
+ return;
+}
void HP_clif_changeoption2(struct block_list *bl) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_changeoption2_pre > 0) {