diff options
author | shennetsind <ind@henn.et> | 2014-03-22 17:07:13 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2014-03-22 17:07:13 -0300 |
commit | 2b4d6abbc5baddc2207e73f0b84c7e6c73e271a4 (patch) | |
tree | e8d15f8f4a252cda88f3e3173f366ff9881edc4c /src/plugins | |
parent | 9ea7b143192568a259aa6e7e223420e8d5762b9e (diff) | |
parent | d097f2c4b4a31885c6b04f5868563e1f48414192 (diff) | |
download | hercules-2b4d6abbc5baddc2207e73f0b84c7e6c73e271a4.tar.gz hercules-2b4d6abbc5baddc2207e73f0b84c7e6c73e271a4.tar.bz2 hercules-2b4d6abbc5baddc2207e73f0b84c7e6c73e271a4.tar.xz hercules-2b4d6abbc5baddc2207e73f0b84c7e6c73e271a4.zip |
Merge branch 'master' of https://github.com/HerculesWS/Hercules
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc | 12 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.HookingPoints.inc | 3 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.Hooks.inc | 85 |
3 files changed, 97 insertions, 3 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc index 4f37743f6..3827f3e84 100644 --- a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc @@ -219,6 +219,10 @@ struct { struct HPMHookPoint *HP_bg_send_xy_timer_sub_post; struct HPMHookPoint *HP_bg_send_xy_timer_pre; 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_str2teamtype_pre; + struct HPMHookPoint *HP_bg_str2teamtype_post; struct HPMHookPoint *HP_bg_config_read_pre; struct HPMHookPoint *HP_bg_config_read_post; struct HPMHookPoint *HP_buyingstore_setup_pre; @@ -4399,6 +4403,8 @@ struct { struct HPMHookPoint *HP_skill_get_casttype_post; struct HPMHookPoint *HP_skill_get_casttype2_pre; struct HPMHookPoint *HP_skill_get_casttype2_post; + struct HPMHookPoint *HP_skill_is_combo_pre; + struct HPMHookPoint *HP_skill_is_combo_post; struct HPMHookPoint *HP_skill_name2id_pre; struct HPMHookPoint *HP_skill_name2id_post; struct HPMHookPoint *HP_skill_isammotype_pre; @@ -5252,6 +5258,10 @@ struct { int HP_bg_send_xy_timer_sub_post; int HP_bg_send_xy_timer_pre; int HP_bg_send_xy_timer_post; + int HP_bg_afk_timer_pre; + int HP_bg_afk_timer_post; + int HP_bg_str2teamtype_pre; + int HP_bg_str2teamtype_post; int HP_bg_config_read_pre; int HP_bg_config_read_post; int HP_buyingstore_setup_pre; @@ -9432,6 +9442,8 @@ struct { int HP_skill_get_casttype_post; int HP_skill_get_casttype2_pre; int HP_skill_get_casttype2_post; + int HP_skill_is_combo_pre; + int HP_skill_is_combo_post; int HP_skill_name2id_pre; int HP_skill_name2id_post; int HP_skill_isammotype_pre; diff --git a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc index dd8c603d3..8693f6b0f 100644 --- a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc @@ -115,6 +115,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(bg->send_message, HP_bg_send_message) }, { 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->str2teamtype, HP_bg_str2teamtype) }, { HP_POP(bg->config_read, HP_bg_config_read) }, /* buyingstore */ { HP_POP(buyingstore->setup, HP_buyingstore_setup) }, @@ -2235,6 +2237,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(skill->chk, HP_skill_chk) }, { HP_POP(skill->get_casttype, HP_skill_get_casttype) }, { HP_POP(skill->get_casttype2, HP_skill_get_casttype2) }, + { HP_POP(skill->is_combo, HP_skill_is_combo) }, { HP_POP(skill->name2id, HP_skill_name2id) }, { HP_POP(skill->isammotype, HP_skill_isammotype) }, { HP_POP(skill->castend_id, HP_skill_castend_id) }, diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc index 396b241b0..f0932f518 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 ) { @@ -56841,6 +56894,32 @@ int HP_skill_get_casttype2(uint16 index) { } return retVal___; } +bool HP_skill_is_combo(int skill_id) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_skill_is_combo_pre ) { + bool (*preHookFunc) (int *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_is_combo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_is_combo_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.is_combo(skill_id); + } + if( HPMHooks.count.HP_skill_is_combo_post ) { + bool (*postHookFunc) (bool retVal___, int *skill_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_is_combo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_is_combo_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &skill_id); + } + } + return retVal___; +} int HP_skill_name2id(const char *name) { int hIndex = 0; int retVal___ = 0; |