summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorHercules.ws <dev@herc.ws>2018-01-14 17:34:36 +0100
committerHerculesWSAPI <dev@herc.ws>2018-01-14 17:34:36 +0100
commit26f7e0a200471465498221b320f0418a3eb5f5f1 (patch)
tree34bd02019fd8a5e4779e28e99fecea4276eb7bc9 /src/plugins
parent098700ad4c8b9c7d907dd11f4c71968aa674b8f9 (diff)
downloadhercules-26f7e0a200471465498221b320f0418a3eb5f5f1.tar.gz
hercules-26f7e0a200471465498221b320f0418a3eb5f5f1.tar.bz2
hercules-26f7e0a200471465498221b320f0418a3eb5f5f1.tar.xz
hercules-26f7e0a200471465498221b320f0418a3eb5f5f1.zip
HPM Hooks Update
Signed-off-by: HerculesWSAPI <dev@herc.ws>
Diffstat (limited to 'src/plugins')
-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 02a0082d3..db578e59f 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -1188,6 +1188,8 @@ typedef void (*HPMHOOK_pre_clif_progressbar) (struct map_session_data **sd, unsi
typedef void (*HPMHOOK_post_clif_progressbar) (struct map_session_data *sd, unsigned int color, unsigned int second);
typedef void (*HPMHOOK_pre_clif_progressbar_abort) (struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_progressbar_abort) (struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_progressbar_unit) (struct block_list **bl, uint32 *color, uint32 *time);
+typedef void (*HPMHOOK_post_clif_progressbar_unit) (struct block_list *bl, uint32 color, uint32 time);
typedef void (*HPMHOOK_pre_clif_showdigit) (struct map_session_data **sd, unsigned char *type, int *value);
typedef void (*HPMHOOK_post_clif_showdigit) (struct map_session_data *sd, unsigned char type, int value);
typedef int (*HPMHOOK_pre_clif_elementalconverter_list) (struct map_session_data **sd);
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index 7a482a669..f057b34d8 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -824,6 +824,8 @@ struct {
struct HPMHookPoint *HP_clif_progressbar_post;
struct HPMHookPoint *HP_clif_progressbar_abort_pre;
struct HPMHookPoint *HP_clif_progressbar_abort_post;
+ struct HPMHookPoint *HP_clif_progressbar_unit_pre;
+ struct HPMHookPoint *HP_clif_progressbar_unit_post;
struct HPMHookPoint *HP_clif_showdigit_pre;
struct HPMHookPoint *HP_clif_showdigit_post;
struct HPMHookPoint *HP_clif_elementalconverter_list_pre;
@@ -7031,6 +7033,8 @@ struct {
int HP_clif_progressbar_post;
int HP_clif_progressbar_abort_pre;
int HP_clif_progressbar_abort_post;
+ int HP_clif_progressbar_unit_pre;
+ int HP_clif_progressbar_unit_post;
int HP_clif_showdigit_pre;
int HP_clif_showdigit_post;
int HP_clif_elementalconverter_list_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index 3ba6a3f5b..6a27f3d94 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -434,6 +434,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->font, HP_clif_font) },
{ HP_POP(clif->progressbar, HP_clif_progressbar) },
{ HP_POP(clif->progressbar_abort, HP_clif_progressbar_abort) },
+ { HP_POP(clif->progressbar_unit, HP_clif_progressbar_unit) },
{ HP_POP(clif->showdigit, HP_clif_showdigit) },
{ HP_POP(clif->elementalconverter_list, HP_clif_elementalconverter_list) },
{ HP_POP(clif->spellbook_list, HP_clif_spellbook_list) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 402e57256..5b0ae00a7 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -10706,6 +10706,32 @@ void HP_clif_progressbar_abort(struct map_session_data *sd) {
}
return;
}
+void HP_clif_progressbar_unit(struct block_list *bl, uint32 color, uint32 time) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_progressbar_unit_pre > 0) {
+ void (*preHookFunc) (struct block_list **bl, uint32 *color, uint32 *time);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_progressbar_unit_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_progressbar_unit_pre[hIndex].func;
+ preHookFunc(&bl, &color, &time);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.progressbar_unit(bl, color, time);
+ }
+ if (HPMHooks.count.HP_clif_progressbar_unit_post > 0) {
+ void (*postHookFunc) (struct block_list *bl, uint32 color, uint32 time);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_progressbar_unit_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_progressbar_unit_post[hIndex].func;
+ postHookFunc(bl, color, time);
+ }
+ }
+ return;
+}
void HP_clif_showdigit(struct map_session_data *sd, unsigned char type, int value) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_showdigit_pre > 0) {