summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/common/HPMDataCheck.h1
-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, 34 insertions, 0 deletions
diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h
index 129ec7475..11f79a11b 100644
--- a/src/common/HPMDataCheck.h
+++ b/src/common/HPMDataCheck.h
@@ -744,6 +744,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "PACKET_ZC_SKILLINFO_LIST", sizeof(struct PACKET_ZC_SKILLINFO_LIST), SERVER_TYPE_MAP },
{ "PACKET_ZC_SKILLINFO_UPDATE2", sizeof(struct PACKET_ZC_SKILLINFO_UPDATE2), SERVER_TYPE_MAP },
{ "PACKET_ZC_SPRITE_CHANGE", sizeof(struct PACKET_ZC_SPRITE_CHANGE), SERVER_TYPE_MAP },
+ { "PACKET_ZC_STATE_CHANGE", sizeof(struct PACKET_ZC_STATE_CHANGE), SERVER_TYPE_MAP },
{ "PACKET_ZC_STATUS_CHANGE_ACK", sizeof(struct PACKET_ZC_STATUS_CHANGE_ACK), SERVER_TYPE_MAP },
{ "PACKET_ZC_STYLE_CHANGE_RES", sizeof(struct PACKET_ZC_STYLE_CHANGE_RES), SERVER_TYPE_MAP },
{ "PACKET_ZC_TALKBOX_CHATCONTENTS", sizeof(struct PACKET_ZC_TALKBOX_CHATCONTENTS), SERVER_TYPE_MAP },
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index 496da1518..206934222 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 f8a25a649..d70ee0024 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;
@@ -7967,6 +7969,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 7af336fdc..c755e0bec 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 ccc11d52b..d0ddcf28a 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) {