summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHercules.ws <dev@herc.ws>2017-06-28 23:52:12 +0200
committerHerculesWSAPI <dev@herc.ws>2017-06-28 23:52:12 +0200
commit93b0f5d876fdb5ce9cea57ed47362899752cc48c (patch)
treea0fb6beba63f51f653ce42dd91dd89f7e7568183 /src
parentabe64c3982a11c9834f2e16eaaf0dc940a903fdb (diff)
downloadhercules-93b0f5d876fdb5ce9cea57ed47362899752cc48c.tar.gz
hercules-93b0f5d876fdb5ce9cea57ed47362899752cc48c.tar.bz2
hercules-93b0f5d876fdb5ce9cea57ed47362899752cc48c.tar.xz
hercules-93b0f5d876fdb5ce9cea57ed47362899752cc48c.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.inc12
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc3
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc43
4 files changed, 49 insertions, 15 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index 88a6f826c..b4be9aff4 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -6028,10 +6028,12 @@ typedef void (*HPMHOOK_pre_script_add_autobonus) (const char **autobonus);
typedef void (*HPMHOOK_post_script_add_autobonus) (const char *autobonus);
typedef int (*HPMHOOK_pre_script_menu_countoptions) (const char **str, int *max_count, int **total);
typedef int (*HPMHOOK_post_script_menu_countoptions) (int retVal___, const char *str, int max_count, int *total);
+typedef int (*HPMHOOK_pre_script_buildin_recovery_sub) (struct map_session_data **sd);
+typedef int (*HPMHOOK_post_script_buildin_recovery_sub) (int retVal___, struct map_session_data *sd);
typedef int (*HPMHOOK_pre_script_buildin_recovery_pc_sub) (struct map_session_data **sd, va_list ap);
typedef int (*HPMHOOK_post_script_buildin_recovery_pc_sub) (int retVal___, struct map_session_data *sd, va_list ap);
-typedef int (*HPMHOOK_pre_script_buildin_recovery_sub) (struct block_list **bl, va_list ap);
-typedef int (*HPMHOOK_post_script_buildin_recovery_sub) (int retVal___, struct block_list *bl, va_list ap);
+typedef int (*HPMHOOK_pre_script_buildin_recovery_bl_sub) (struct block_list **bl, va_list ap);
+typedef int (*HPMHOOK_post_script_buildin_recovery_bl_sub) (int retVal___, struct block_list *bl, va_list ap);
typedef int (*HPMHOOK_pre_script_buildin_areawarp_sub) (struct block_list **bl, va_list ap);
typedef int (*HPMHOOK_post_script_buildin_areawarp_sub) (int retVal___, struct block_list *bl, va_list ap);
typedef int (*HPMHOOK_pre_script_buildin_areapercentheal_sub) (struct block_list **bl, va_list ap);
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index c4e48e05b..d470a3bd9 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -4816,10 +4816,12 @@ struct {
struct HPMHookPoint *HP_script_add_autobonus_post;
struct HPMHookPoint *HP_script_menu_countoptions_pre;
struct HPMHookPoint *HP_script_menu_countoptions_post;
- struct HPMHookPoint *HP_script_buildin_recovery_pc_sub_pre;
- struct HPMHookPoint *HP_script_buildin_recovery_pc_sub_post;
struct HPMHookPoint *HP_script_buildin_recovery_sub_pre;
struct HPMHookPoint *HP_script_buildin_recovery_sub_post;
+ struct HPMHookPoint *HP_script_buildin_recovery_pc_sub_pre;
+ struct HPMHookPoint *HP_script_buildin_recovery_pc_sub_post;
+ struct HPMHookPoint *HP_script_buildin_recovery_bl_sub_pre;
+ struct HPMHookPoint *HP_script_buildin_recovery_bl_sub_post;
struct HPMHookPoint *HP_script_buildin_areawarp_sub_pre;
struct HPMHookPoint *HP_script_buildin_areawarp_sub_post;
struct HPMHookPoint *HP_script_buildin_areapercentheal_sub_pre;
@@ -10889,10 +10891,12 @@ struct {
int HP_script_add_autobonus_post;
int HP_script_menu_countoptions_pre;
int HP_script_menu_countoptions_post;
- int HP_script_buildin_recovery_pc_sub_pre;
- int HP_script_buildin_recovery_pc_sub_post;
int HP_script_buildin_recovery_sub_pre;
int HP_script_buildin_recovery_sub_post;
+ int HP_script_buildin_recovery_pc_sub_pre;
+ int HP_script_buildin_recovery_pc_sub_post;
+ int HP_script_buildin_recovery_bl_sub_pre;
+ int HP_script_buildin_recovery_bl_sub_post;
int HP_script_buildin_areawarp_sub_pre;
int HP_script_buildin_areawarp_sub_post;
int HP_script_buildin_areapercentheal_sub_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index d26050f08..4f2565740 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -2468,8 +2468,9 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(script->db_free_code_sub, HP_script_db_free_code_sub) },
{ HP_POP(script->add_autobonus, HP_script_add_autobonus) },
{ HP_POP(script->menu_countoptions, HP_script_menu_countoptions) },
- { HP_POP(script->buildin_recovery_pc_sub, HP_script_buildin_recovery_pc_sub) },
{ HP_POP(script->buildin_recovery_sub, HP_script_buildin_recovery_sub) },
+ { HP_POP(script->buildin_recovery_pc_sub, HP_script_buildin_recovery_pc_sub) },
+ { HP_POP(script->buildin_recovery_bl_sub, HP_script_buildin_recovery_bl_sub) },
{ HP_POP(script->buildin_areawarp_sub, HP_script_buildin_areawarp_sub) },
{ HP_POP(script->buildin_areapercentheal_sub, HP_script_buildin_areapercentheal_sub) },
{ HP_POP(script->buildin_delitem_delete, HP_script_buildin_delitem_delete) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 970e7cd45..4bd397240 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -64195,6 +64195,33 @@ int HP_script_menu_countoptions(const char *str, int max_count, int *total) {
}
return retVal___;
}
+int HP_script_buildin_recovery_sub(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_script_buildin_recovery_sub_pre > 0) {
+ int (*preHookFunc) (struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_recovery_sub_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_script_buildin_recovery_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(&sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.buildin_recovery_sub(sd);
+ }
+ if (HPMHooks.count.HP_script_buildin_recovery_sub_post > 0) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_recovery_sub_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_script_buildin_recovery_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
int HP_script_buildin_recovery_pc_sub(struct map_session_data *sd, va_list ap) {
int hIndex = 0;
int retVal___ = 0;
@@ -64228,15 +64255,15 @@ int HP_script_buildin_recovery_pc_sub(struct map_session_data *sd, va_list ap) {
}
return retVal___;
}
-int HP_script_buildin_recovery_sub(struct block_list *bl, va_list ap) {
+int HP_script_buildin_recovery_bl_sub(struct block_list *bl, va_list ap) {
int hIndex = 0;
int retVal___ = 0;
- if (HPMHooks.count.HP_script_buildin_recovery_sub_pre > 0) {
+ if (HPMHooks.count.HP_script_buildin_recovery_bl_sub_pre > 0) {
int (*preHookFunc) (struct block_list **bl, va_list ap);
*HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_recovery_sub_pre; hIndex++) {
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_recovery_bl_sub_pre; hIndex++) {
va_list ap___copy; va_copy(ap___copy, ap);
- preHookFunc = HPMHooks.list.HP_script_buildin_recovery_sub_pre[hIndex].func;
+ preHookFunc = HPMHooks.list.HP_script_buildin_recovery_bl_sub_pre[hIndex].func;
retVal___ = preHookFunc(&bl, ap___copy);
va_end(ap___copy);
}
@@ -64247,14 +64274,14 @@ int HP_script_buildin_recovery_sub(struct block_list *bl, va_list ap) {
}
{
va_list ap___copy; va_copy(ap___copy, ap);
- retVal___ = HPMHooks.source.script.buildin_recovery_sub(bl, ap___copy);
+ retVal___ = HPMHooks.source.script.buildin_recovery_bl_sub(bl, ap___copy);
va_end(ap___copy);
}
- if (HPMHooks.count.HP_script_buildin_recovery_sub_post > 0) {
+ if (HPMHooks.count.HP_script_buildin_recovery_bl_sub_post > 0) {
int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_recovery_sub_post; hIndex++) {
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_recovery_bl_sub_post; hIndex++) {
va_list ap___copy; va_copy(ap___copy, ap);
- postHookFunc = HPMHooks.list.HP_script_buildin_recovery_sub_post[hIndex].func;
+ postHookFunc = HPMHooks.list.HP_script_buildin_recovery_bl_sub_post[hIndex].func;
retVal___ = postHookFunc(retVal___, bl, ap___copy);
va_end(ap___copy);
}