diff options
author | shennetsind <ind@henn.et> | 2013-10-28 12:26:14 -0200 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-10-28 12:26:14 -0200 |
commit | cde3dff870ec0056c6bbd4c32be3306952000440 (patch) | |
tree | 787bd4fdbbc82c8d9206a7b634c9ae1ca263b03e | |
parent | 25aca4d72678d65a5d90d8b02d57d32bf192211f (diff) | |
parent | e7efdfe96e1b4c288bca845c03512da6842d6425 (diff) | |
download | hercules-cde3dff870ec0056c6bbd4c32be3306952000440.tar.gz hercules-cde3dff870ec0056c6bbd4c32be3306952000440.tar.bz2 hercules-cde3dff870ec0056c6bbd4c32be3306952000440.tar.xz hercules-cde3dff870ec0056c6bbd4c32be3306952000440.zip |
Merge branch 'master' of https://github.com/HerculesWS/Hercules
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc | 8 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.HookingPoints.inc | 2 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.Hooks.inc | 50 |
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; |