summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorHercules.ws <Hercules@efficiently.awesome>2014-03-10 02:29:21 +0100
committerHerculesWSAPI <Hercules@efficiently.awesome>2014-03-10 02:29:21 +0100
commit1d12bb1704115e299dbcc0d2a05cd9f2c68f91fd (patch)
tree6b10ee92d36cf76d1810c30f9d92c511489f619b /src/plugins
parent1a4a16ee5c798a6ef9c583fb3f6fc63a7c0ae35e (diff)
downloadhercules-1d12bb1704115e299dbcc0d2a05cd9f2c68f91fd.tar.gz
hercules-1d12bb1704115e299dbcc0d2a05cd9f2c68f91fd.tar.bz2
hercules-1d12bb1704115e299dbcc0d2a05cd9f2c68f91fd.tar.xz
hercules-1d12bb1704115e299dbcc0d2a05cd9f2c68f91fd.zip
HPM Hooks Update
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc4
-rw-r--r--src/plugins/HPMHooking/HPMHooking.HookingPoints.inc1
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Hooks.inc25
3 files changed, 30 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
index fa9b04d39..4f37743f6 100644
--- a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
@@ -4081,6 +4081,8 @@ struct {
struct HPMHookPoint *HP_script_alloc_state_post;
struct HPMHookPoint *HP_script_free_state_pre;
struct HPMHookPoint *HP_script_free_state_post;
+ struct HPMHookPoint *HP_script_add_pending_ref_pre;
+ struct HPMHookPoint *HP_script_add_pending_ref_post;
struct HPMHookPoint *HP_script_run_autobonus_pre;
struct HPMHookPoint *HP_script_run_autobonus_post;
struct HPMHookPoint *HP_script_cleararray_pc_pre;
@@ -9112,6 +9114,8 @@ struct {
int HP_script_alloc_state_post;
int HP_script_free_state_pre;
int HP_script_free_state_post;
+ int HP_script_add_pending_ref_pre;
+ int HP_script_add_pending_ref_post;
int HP_script_run_autobonus_pre;
int HP_script_run_autobonus_post;
int HP_script_cleararray_pc_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
index b90bb6a88..dd8c603d3 100644
--- a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
@@ -2074,6 +2074,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(script->free_vars, HP_script_free_vars) },
{ HP_POP(script->alloc_state, HP_script_alloc_state) },
{ HP_POP(script->free_state, HP_script_free_state) },
+ { HP_POP(script->add_pending_ref, HP_script_add_pending_ref) },
{ HP_POP(script->run_autobonus, HP_script_run_autobonus) },
{ HP_POP(script->cleararray_pc, HP_script_cleararray_pc) },
{ HP_POP(script->setarray_pc, HP_script_setarray_pc) },
diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc
index 49d276edb..78987f81a 100644
--- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc
@@ -52614,6 +52614,31 @@ void HP_script_free_state(struct script_state *st) {
}
return;
}
+void HP_script_add_pending_ref(struct script_state *st, struct reg_db *ref) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_add_pending_ref_pre ) {
+ void (*preHookFunc) (struct script_state *st, struct reg_db *ref);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_pending_ref_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_add_pending_ref_pre[hIndex].func;
+ preHookFunc(st, ref);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.add_pending_ref(st, ref);
+ }
+ if( HPMHooks.count.HP_script_add_pending_ref_post ) {
+ void (*postHookFunc) (struct script_state *st, struct reg_db *ref);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_pending_ref_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_add_pending_ref_post[hIndex].func;
+ postHookFunc(st, ref);
+ }
+ }
+ return;
+}
void HP_script_run_autobonus(const char *autobonus, int id, int pos) {
int hIndex = 0;
if( HPMHooks.count.HP_script_run_autobonus_pre ) {