summaryrefslogtreecommitdiff
path: root/src/plugins/HPMHooking/HPMHooking.Hooks.inc
diff options
context:
space:
mode:
authorHercules.ws <Hercules@efficiently.awesome>2014-03-18 19:01:07 +0100
committerHerculesWSAPI <Hercules@efficiently.awesome>2014-03-18 19:01:07 +0100
commit68b16d11c5f3cdf67a58154dbf22ad3da60a6f9f (patch)
tree1e638099981549b0a63c667ee3e0debfab844a19 /src/plugins/HPMHooking/HPMHooking.Hooks.inc
parent7b71f22331c805a406c57f5a8eff93b464b57018 (diff)
downloadhercules-68b16d11c5f3cdf67a58154dbf22ad3da60a6f9f.tar.gz
hercules-68b16d11c5f3cdf67a58154dbf22ad3da60a6f9f.tar.bz2
hercules-68b16d11c5f3cdf67a58154dbf22ad3da60a6f9f.tar.xz
hercules-68b16d11c5f3cdf67a58154dbf22ad3da60a6f9f.zip
HPM Hooks Update
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking.Hooks.inc')
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Hooks.inc59
1 files changed, 56 insertions, 3 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc
index 396b241b0..ed3e505b9 100644
--- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc
@@ -2648,11 +2648,11 @@ bool HP_bg_team_join(int bg_id, struct map_session_data *sd) {
}
return retVal___;
}
-int HP_bg_team_leave(struct map_session_data *sd, int flag) {
+int HP_bg_team_leave(struct map_session_data *sd, enum bg_team_leave_type flag) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_bg_team_leave_pre ) {
- int (*preHookFunc) (struct map_session_data *sd, int *flag);
+ int (*preHookFunc) (struct map_session_data *sd, enum bg_team_leave_type *flag);
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_leave_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_bg_team_leave_pre[hIndex].func;
retVal___ = preHookFunc(sd, &flag);
@@ -2666,7 +2666,7 @@ int HP_bg_team_leave(struct map_session_data *sd, int flag) {
retVal___ = HPMHooks.source.bg.team_leave(sd, flag);
}
if( HPMHooks.count.HP_bg_team_leave_post ) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *flag);
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, enum bg_team_leave_type *flag);
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_leave_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_bg_team_leave_post[hIndex].func;
retVal___ = postHookFunc(retVal___, sd, &flag);
@@ -2836,6 +2836,59 @@ int HP_bg_send_xy_timer(int tid, int64 tick, int id, intptr_t data) {
}
return retVal___;
}
+int HP_bg_afk_timer(int tid, int64 tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_bg_afk_timer_pre ) {
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_afk_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_bg_afk_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.bg.afk_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_bg_afk_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_afk_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_bg_afk_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+enum bg_queue_types HP_bg_str2teamtype(const char *str) {
+/* Unknown return type 'enum bg_queue_types'. Initializing to '0'. */
+ int hIndex = 0;
+ enum bg_queue_types retVal___ = 0;
+ if( HPMHooks.count.HP_bg_str2teamtype_pre ) {
+ enum bg_queue_types (*preHookFunc) (const char *str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_str2teamtype_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_bg_str2teamtype_pre[hIndex].func;
+ retVal___ = preHookFunc(str);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.bg.str2teamtype(str);
+ }
+ if( HPMHooks.count.HP_bg_str2teamtype_post ) {
+ enum bg_queue_types (*postHookFunc) (enum bg_queue_types retVal___, const char *str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_str2teamtype_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_bg_str2teamtype_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str);
+ }
+ }
+ return retVal___;
+}
void HP_bg_config_read(void) {
int hIndex = 0;
if( HPMHooks.count.HP_bg_config_read_pre ) {