summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHercules.ws <dev@herc.ws>2019-12-15 15:23:57 +0100
committerHerculesWSAPI <dev@herc.ws>2019-12-15 15:23:57 +0100
commit3c5540b9e9f09943a8cc2fd294035a5ccaf63f5e (patch)
tree6bce5d28bd43d7e27e39822c46353d95d09ad810 /src
parent8c4a85d6f9927826dc6a1815f0e6d197bcb2ed7f (diff)
downloadhercules-3c5540b9e9f09943a8cc2fd294035a5ccaf63f5e.tar.gz
hercules-3c5540b9e9f09943a8cc2fd294035a5ccaf63f5e.tar.bz2
hercules-3c5540b9e9f09943a8cc2fd294035a5ccaf63f5e.tar.xz
hercules-3c5540b9e9f09943a8cc2fd294035a5ccaf63f5e.zip
HPM Hooks Update
Signed-off-by: HerculesWSAPI <dev@herc.ws>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc6
-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.inc32
4 files changed, 38 insertions, 5 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index fe72a7e13..f878f36b8 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -1562,8 +1562,10 @@ typedef void (*HPMHOOK_pre_clif_specialeffect) (struct block_list **bl, int *typ
typedef void (*HPMHOOK_post_clif_specialeffect) (struct block_list *bl, int type, enum send_target target);
typedef void (*HPMHOOK_pre_clif_specialeffect_single) (struct block_list **bl, int *type, int *fd);
typedef void (*HPMHOOK_post_clif_specialeffect_single) (struct block_list *bl, int type, int fd);
-typedef void (*HPMHOOK_pre_clif_specialeffect_value) (struct block_list **bl, int *effect_id, int *num, send_target *target);
-typedef void (*HPMHOOK_post_clif_specialeffect_value) (struct block_list *bl, int effect_id, int num, send_target target);
+typedef void (*HPMHOOK_pre_clif_specialeffect_value) (struct block_list **bl, int *effect_id, uint64 *num, send_target *target);
+typedef void (*HPMHOOK_post_clif_specialeffect_value) (struct block_list *bl, int effect_id, uint64 num, send_target target);
+typedef void (*HPMHOOK_pre_clif_specialeffect_value_single) (struct block_list **bl, int *effect_id, uint64 *num, int *fd);
+typedef void (*HPMHOOK_post_clif_specialeffect_value_single) (struct block_list *bl, int effect_id, uint64 num, int fd);
typedef void (*HPMHOOK_pre_clif_removeSpecialEffect) (struct block_list **bl, int *effectId, enum send_target *target);
typedef void (*HPMHOOK_post_clif_removeSpecialEffect) (struct block_list *bl, int effectId, enum send_target target);
typedef void (*HPMHOOK_pre_clif_removeSpecialEffect_single) (struct block_list **bl, int *effectId, struct block_list **targetBl);
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index 76dfca774..ce716729a 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -1154,6 +1154,8 @@ struct {
struct HPMHookPoint *HP_clif_specialeffect_single_post;
struct HPMHookPoint *HP_clif_specialeffect_value_pre;
struct HPMHookPoint *HP_clif_specialeffect_value_post;
+ struct HPMHookPoint *HP_clif_specialeffect_value_single_pre;
+ struct HPMHookPoint *HP_clif_specialeffect_value_single_post;
struct HPMHookPoint *HP_clif_removeSpecialEffect_pre;
struct HPMHookPoint *HP_clif_removeSpecialEffect_post;
struct HPMHookPoint *HP_clif_removeSpecialEffect_single_pre;
@@ -7987,6 +7989,8 @@ struct {
int HP_clif_specialeffect_single_post;
int HP_clif_specialeffect_value_pre;
int HP_clif_specialeffect_value_post;
+ int HP_clif_specialeffect_value_single_pre;
+ int HP_clif_specialeffect_value_single_post;
int HP_clif_removeSpecialEffect_pre;
int HP_clif_removeSpecialEffect_post;
int HP_clif_removeSpecialEffect_single_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index e7b657082..f29820952 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -601,6 +601,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->specialeffect, HP_clif_specialeffect) },
{ HP_POP(clif->specialeffect_single, HP_clif_specialeffect_single) },
{ HP_POP(clif->specialeffect_value, HP_clif_specialeffect_value) },
+ { HP_POP(clif->specialeffect_value_single, HP_clif_specialeffect_value_single) },
{ HP_POP(clif->removeSpecialEffect, HP_clif_removeSpecialEffect) },
{ HP_POP(clif->removeSpecialEffect_single, HP_clif_removeSpecialEffect_single) },
{ HP_POP(clif->millenniumshield, HP_clif_millenniumshield) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 53d0104e3..bcbfb7c3e 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -15028,10 +15028,10 @@ void HP_clif_specialeffect_single(struct block_list *bl, int type, int fd) {
}
return;
}
-void HP_clif_specialeffect_value(struct block_list *bl, int effect_id, int num, send_target target) {
+void HP_clif_specialeffect_value(struct block_list *bl, int effect_id, uint64 num, send_target target) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_specialeffect_value_pre > 0) {
- void (*preHookFunc) (struct block_list **bl, int *effect_id, int *num, send_target *target);
+ void (*preHookFunc) (struct block_list **bl, int *effect_id, uint64 *num, send_target *target);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_specialeffect_value_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_clif_specialeffect_value_pre[hIndex].func;
@@ -15046,7 +15046,7 @@ void HP_clif_specialeffect_value(struct block_list *bl, int effect_id, int num,
HPMHooks.source.clif.specialeffect_value(bl, effect_id, num, target);
}
if (HPMHooks.count.HP_clif_specialeffect_value_post > 0) {
- void (*postHookFunc) (struct block_list *bl, int effect_id, int num, send_target target);
+ void (*postHookFunc) (struct block_list *bl, int effect_id, uint64 num, send_target target);
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_specialeffect_value_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_clif_specialeffect_value_post[hIndex].func;
postHookFunc(bl, effect_id, num, target);
@@ -15054,6 +15054,32 @@ void HP_clif_specialeffect_value(struct block_list *bl, int effect_id, int num,
}
return;
}
+void HP_clif_specialeffect_value_single(struct block_list *bl, int effect_id, uint64 num, int fd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_specialeffect_value_single_pre > 0) {
+ void (*preHookFunc) (struct block_list **bl, int *effect_id, uint64 *num, int *fd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_specialeffect_value_single_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_specialeffect_value_single_pre[hIndex].func;
+ preHookFunc(&bl, &effect_id, &num, &fd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.specialeffect_value_single(bl, effect_id, num, fd);
+ }
+ if (HPMHooks.count.HP_clif_specialeffect_value_single_post > 0) {
+ void (*postHookFunc) (struct block_list *bl, int effect_id, uint64 num, int fd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_specialeffect_value_single_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_specialeffect_value_single_post[hIndex].func;
+ postHookFunc(bl, effect_id, num, fd);
+ }
+ }
+ return;
+}
void HP_clif_removeSpecialEffect(struct block_list *bl, int effectId, enum send_target target) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_removeSpecialEffect_pre > 0) {