summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHercules.ws <Hercules@efficiently.awesome>2013-10-27 22:28:58 +0100
committerHerculesWSAPI <Hercules@efficiently.awesome>2013-10-27 22:28:58 +0100
commite7efdfe96e1b4c288bca845c03512da6842d6425 (patch)
treef35744fde85d0b4363b6b012e06ca072b182fe53
parent90dc5deba7769e4d5040cc7483980d72bde00dfc (diff)
downloadhercules-e7efdfe96e1b4c288bca845c03512da6842d6425.tar.gz
hercules-e7efdfe96e1b4c288bca845c03512da6842d6425.tar.bz2
hercules-e7efdfe96e1b4c288bca845c03512da6842d6425.tar.xz
hercules-e7efdfe96e1b4c288bca845c03512da6842d6425.zip
HPM Hooks Update
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
-rw-r--r--src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc8
-rw-r--r--src/plugins/HPMHooking/HPMHooking.HookingPoints.inc2
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Hooks.inc50
3 files changed, 60 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
index f6d566bc5..87d169e1c 100644
--- a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
@@ -3801,6 +3801,10 @@ struct {
struct HPMHookPoint *HP_pc_bank_deposit_post;
struct HPMHookPoint *HP_pc_bank_withdraw_pre;
struct HPMHookPoint *HP_pc_bank_withdraw_post;
+ struct HPMHookPoint *HP_pc_rental_expire_pre;
+ struct HPMHookPoint *HP_pc_rental_expire_post;
+ struct HPMHookPoint *HP_pc_scdata_received_pre;
+ struct HPMHookPoint *HP_pc_scdata_received_post;
struct HPMHookPoint *HP_pet_init_pre;
struct HPMHookPoint *HP_pet_init_post;
struct HPMHookPoint *HP_pet_final_pre;
@@ -8696,6 +8700,10 @@ struct {
int HP_pc_bank_deposit_post;
int HP_pc_bank_withdraw_pre;
int HP_pc_bank_withdraw_post;
+ int HP_pc_rental_expire_pre;
+ int HP_pc_rental_expire_post;
+ int HP_pc_scdata_received_pre;
+ int HP_pc_scdata_received_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 e8568d5f3..97761842e 100644
--- a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
@@ -1930,6 +1930,8 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(pc->removecombo, HP_pc_removecombo) },
{ HP_POP(pc->bank_deposit, HP_pc_bank_deposit) },
{ HP_POP(pc->bank_withdraw, HP_pc_bank_withdraw) },
+ { HP_POP(pc->rental_expire, HP_pc_rental_expire) },
+ { HP_POP(pc->scdata_received, HP_pc_scdata_received) },
/* 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 e0d71cd52..7ba95face 100644
--- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc
@@ -49008,6 +49008,56 @@ void HP_pc_bank_withdraw(struct map_session_data *sd, int money) {
}
return;
}
+void HP_pc_rental_expire(struct map_session_data *sd, int i) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_pc_rental_expire_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *i);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_rental_expire_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_rental_expire_pre[hIndex].func;
+ preHookFunc(sd, &i);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.pc.rental_expire(sd, i);
+ }
+ if( HPMHooks.count.HP_pc_rental_expire_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *i);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_rental_expire_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_rental_expire_post[hIndex].func;
+ postHookFunc(sd, &i);
+ }
+ }
+ return;
+}
+void HP_pc_scdata_received(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_pc_scdata_received_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_scdata_received_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_scdata_received_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.pc.scdata_received(sd);
+ }
+ if( HPMHooks.count.HP_pc_scdata_received_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_scdata_received_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_scdata_received_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
/* pet */
int HP_pet_init(void) {
int hIndex = 0;