summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHercules.ws <Hercules@efficiently.awesome>2015-09-17 15:25:44 +0200
committerHerculesWSAPI <Hercules@efficiently.awesome>2015-09-17 15:25:44 +0200
commit34e2e48e648f2ddfbc3322e805aad903047e1da1 (patch)
tree3a75717cfd09f1d9a6d235d440d0986764b2a57c /src
parent45e9625f0f6756fd2e22d51f68f3aab238d0139f (diff)
downloadhercules-34e2e48e648f2ddfbc3322e805aad903047e1da1.tar.gz
hercules-34e2e48e648f2ddfbc3322e805aad903047e1da1.tar.bz2
hercules-34e2e48e648f2ddfbc3322e805aad903047e1da1.tar.xz
hercules-34e2e48e648f2ddfbc3322e805aad903047e1da1.zip
HPM Hooks Update
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc4
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc1
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc33
3 files changed, 38 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index 0a36d76fe..408d7d0cd 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -4237,6 +4237,8 @@ struct {
struct HPMHookPoint *HP_pc_autotrade_prepare_post;
struct HPMHookPoint *HP_pc_autotrade_populate_pre;
struct HPMHookPoint *HP_pc_autotrade_populate_post;
+ struct HPMHookPoint *HP_pc_autotrade_final_pre;
+ struct HPMHookPoint *HP_pc_autotrade_final_post;
struct HPMHookPoint *HP_pc_check_job_name_pre;
struct HPMHookPoint *HP_pc_check_job_name_post;
struct HPMHookPoint *HP_pet_init_pre;
@@ -9958,6 +9960,8 @@ struct {
int HP_pc_autotrade_prepare_post;
int HP_pc_autotrade_populate_pre;
int HP_pc_autotrade_populate_post;
+ int HP_pc_autotrade_final_pre;
+ int HP_pc_autotrade_final_post;
int HP_pc_check_job_name_pre;
int HP_pc_check_job_name_post;
int HP_pet_init_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index 99fa38cd6..d0d97192e 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -2159,6 +2159,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(pc->autotrade_start, HP_pc_autotrade_start) },
{ HP_POP(pc->autotrade_prepare, HP_pc_autotrade_prepare) },
{ HP_POP(pc->autotrade_populate, HP_pc_autotrade_populate) },
+ { HP_POP(pc->autotrade_final, HP_pc_autotrade_final) },
{ HP_POP(pc->check_job_name, HP_pc_check_job_name) },
/* pet */
{ HP_POP(pet->init, HP_pet_init) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 7c53c0e6f..baacc2ae3 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -56718,6 +56718,39 @@ void HP_pc_autotrade_populate(struct map_session_data *sd) {
}
return;
}
+int HP_pc_autotrade_final(DBKey key, DBData *data, va_list ap) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_pc_autotrade_final_pre ) {
+ int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_final_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_pc_autotrade_final_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.pc.autotrade_final(key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_pc_autotrade_final_post ) {
+ int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_final_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_pc_autotrade_final_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
int HP_pc_check_job_name(const char *name) {
int hIndex = 0;
int retVal___ = 0;