summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHercules.ws <Hercules@efficiently.awesome>2013-11-16 02:06:42 +0100
committerHerculesWSAPI <Hercules@efficiently.awesome>2013-11-16 02:06:42 +0100
commit862046bc034985a12b230293fe7d8dd8fade9f53 (patch)
treef5a2cf52178d2caa6c8e558c3b3010092806ff38 /src
parent7120b55ce40a6a0c4086da49d57c74baa72609d6 (diff)
downloadhercules-862046bc034985a12b230293fe7d8dd8fade9f53.tar.gz
hercules-862046bc034985a12b230293fe7d8dd8fade9f53.tar.bz2
hercules-862046bc034985a12b230293fe7d8dd8fade9f53.tar.xz
hercules-862046bc034985a12b230293fe7d8dd8fade9f53.zip
HPM Hooks Update
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc12
-rw-r--r--src/plugins/HPMHooking/HPMHooking.HookingPoints.inc3
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Hooks.inc77
3 files changed, 92 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
index 0f9dd1e9a..b77505fbb 100644
--- a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
@@ -3853,6 +3853,12 @@ struct {
struct HPMHookPoint *HP_pc_scdata_received_post;
struct HPMHookPoint *HP_pc_bound_clear_pre;
struct HPMHookPoint *HP_pc_bound_clear_post;
+ struct HPMHookPoint *HP_pc_expiration_timer_pre;
+ struct HPMHookPoint *HP_pc_expiration_timer_post;
+ struct HPMHookPoint *HP_pc_global_expiration_timer_pre;
+ struct HPMHookPoint *HP_pc_global_expiration_timer_post;
+ struct HPMHookPoint *HP_pc_expire_check_pre;
+ struct HPMHookPoint *HP_pc_expire_check_post;
struct HPMHookPoint *HP_pet_init_pre;
struct HPMHookPoint *HP_pet_init_post;
struct HPMHookPoint *HP_pet_final_pre;
@@ -8806,6 +8812,12 @@ struct {
int HP_pc_scdata_received_post;
int HP_pc_bound_clear_pre;
int HP_pc_bound_clear_post;
+ int HP_pc_expiration_timer_pre;
+ int HP_pc_expiration_timer_post;
+ int HP_pc_global_expiration_timer_pre;
+ int HP_pc_global_expiration_timer_post;
+ int HP_pc_expire_check_pre;
+ int HP_pc_expire_check_post;
int HP_pet_init_pre;
int HP_pet_init_post;
int HP_pet_final_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
index f22ed6b32..57c243913 100644
--- a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
@@ -1957,6 +1957,9 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(pc->rental_expire, HP_pc_rental_expire) },
{ HP_POP(pc->scdata_received, HP_pc_scdata_received) },
{ HP_POP(pc->bound_clear, HP_pc_bound_clear) },
+ { HP_POP(pc->expiration_timer, HP_pc_expiration_timer) },
+ { HP_POP(pc->global_expiration_timer, HP_pc_global_expiration_timer) },
+ { HP_POP(pc->expire_check, HP_pc_expire_check) },
/* pet */
{ HP_POP(pet->init, HP_pet_init) },
{ HP_POP(pet->final, HP_pet_final) },
diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc
index d8b8d65ae..5511959e9 100644
--- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc
@@ -49674,6 +49674,83 @@ void HP_pc_bound_clear(struct map_session_data *sd, enum e_item_bound_type type)
}
return;
}
+int HP_pc_expiration_timer(int tid, int64 tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_pc_expiration_timer_pre ) {
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_expiration_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_expiration_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.expiration_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_pc_expiration_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_expiration_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_expiration_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_global_expiration_timer(int tid, int64 tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_pc_global_expiration_timer_pre ) {
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_global_expiration_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_global_expiration_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.global_expiration_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_pc_global_expiration_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_global_expiration_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_global_expiration_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+void HP_pc_expire_check(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_pc_expire_check_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_expire_check_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_expire_check_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.pc.expire_check(sd);
+ }
+ if( HPMHooks.count.HP_pc_expire_check_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_expire_check_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_expire_check_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
/* pet */
int HP_pet_init(bool minimal) {
int hIndex = 0;