summaryrefslogtreecommitdiff
path: root/src/plugins/HPMHooking
diff options
context:
space:
mode:
authorHercules.ws <Hercules@efficiently.awesome>2015-03-10 20:15:04 +0100
committerHerculesWSAPI <Hercules@efficiently.awesome>2015-03-10 20:15:04 +0100
commitfb5aaa96cbed8fe8c9ce8a47a63ffe017c7e53b4 (patch)
tree593f5a911f38fed1ccbd8b71afc39aab1f018392 /src/plugins/HPMHooking
parentc091b38e4400560ca0644afef9f08e4f9d6835b0 (diff)
downloadhercules-fb5aaa96cbed8fe8c9ce8a47a63ffe017c7e53b4.tar.gz
hercules-fb5aaa96cbed8fe8c9ce8a47a63ffe017c7e53b4.tar.bz2
hercules-fb5aaa96cbed8fe8c9ce8a47a63ffe017c7e53b4.tar.xz
hercules-fb5aaa96cbed8fe8c9ce8a47a63ffe017c7e53b4.zip
HPM Hooks Update
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
Diffstat (limited to 'src/plugins/HPMHooking')
-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 d92f2079f..984b0d0fa 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -235,6 +235,8 @@ struct {
struct HPMHookPoint *HP_bg_send_xy_timer_post;
struct HPMHookPoint *HP_bg_afk_timer_pre;
struct HPMHookPoint *HP_bg_afk_timer_post;
+ struct HPMHookPoint *HP_bg_team_db_final_pre;
+ struct HPMHookPoint *HP_bg_team_db_final_post;
struct HPMHookPoint *HP_bg_str2teamtype_pre;
struct HPMHookPoint *HP_bg_str2teamtype_post;
struct HPMHookPoint *HP_bg_config_read_pre;
@@ -5436,6 +5438,8 @@ struct {
int HP_bg_send_xy_timer_post;
int HP_bg_afk_timer_pre;
int HP_bg_afk_timer_post;
+ int HP_bg_team_db_final_pre;
+ int HP_bg_team_db_final_post;
int HP_bg_str2teamtype_pre;
int HP_bg_str2teamtype_post;
int HP_bg_config_read_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index a3e4340be..c1c848b51 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -123,6 +123,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(bg->send_xy_timer_sub, HP_bg_send_xy_timer_sub) },
{ HP_POP(bg->send_xy_timer, HP_bg_send_xy_timer) },
{ HP_POP(bg->afk_timer, HP_bg_afk_timer) },
+ { HP_POP(bg->team_db_final, HP_bg_team_db_final) },
{ HP_POP(bg->str2teamtype, HP_bg_str2teamtype) },
{ HP_POP(bg->config_read, HP_bg_config_read) },
/* buyingstore */
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index c36525c21..5a1c35c2e 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -3154,6 +3154,39 @@ int HP_bg_afk_timer(int tid, int64 tick, int id, intptr_t data) {
}
return retVal___;
}
+int HP_bg_team_db_final(DBKey key, DBData *data, va_list ap) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_bg_team_db_final_pre ) {
+ int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_db_final_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_bg_team_db_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.bg.team_db_final(key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_bg_team_db_final_post ) {
+ int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_db_final_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_bg_team_db_final_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
enum bg_queue_types HP_bg_str2teamtype(const char *str) {
int hIndex = 0;
enum bg_queue_types retVal___ = BGQT_INVALID;