diff options
author | Hercules.ws <Hercules@efficiently.awesome> | 2014-05-19 19:05:26 +0200 |
---|---|---|
committer | HerculesWSAPI <Hercules@efficiently.awesome> | 2014-05-19 19:05:26 +0200 |
commit | 9a4382017634f93ee0ee4251b3ebb713cbf8f21c (patch) | |
tree | 2bee4ad0af4f63a340ad9c5e0de18070c06fe575 /src/plugins/HPMHooking | |
parent | 4c8d773d72ae134f7cc4d43861104ecd9f4ae134 (diff) | |
download | hercules-9a4382017634f93ee0ee4251b3ebb713cbf8f21c.tar.gz hercules-9a4382017634f93ee0ee4251b3ebb713cbf8f21c.tar.bz2 hercules-9a4382017634f93ee0ee4251b3ebb713cbf8f21c.tar.xz hercules-9a4382017634f93ee0ee4251b3ebb713cbf8f21c.zip |
HPM Hooks Update
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
Diffstat (limited to 'src/plugins/HPMHooking')
-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 | 60 |
3 files changed, 70 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc index b6202d687..57c34db0d 100644 --- a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc @@ -4493,6 +4493,10 @@ struct { struct HPMHookPoint *HP_skill_calc_heal_post; struct HPMHookPoint *HP_skill_check_cloaking_pre; struct HPMHookPoint *HP_skill_check_cloaking_post; + struct HPMHookPoint *HP_skill_check_cloaking_end_pre; + struct HPMHookPoint *HP_skill_check_cloaking_end_post; + struct HPMHookPoint *HP_skill_can_cloak_pre; + struct HPMHookPoint *HP_skill_can_cloak_post; struct HPMHookPoint *HP_skill_enchant_elemental_end_pre; struct HPMHookPoint *HP_skill_enchant_elemental_end_post; struct HPMHookPoint *HP_skill_not_ok_pre; @@ -9534,6 +9538,10 @@ struct { int HP_skill_calc_heal_post; int HP_skill_check_cloaking_pre; int HP_skill_check_cloaking_post; + int HP_skill_check_cloaking_end_pre; + int HP_skill_check_cloaking_end_post; + int HP_skill_can_cloak_pre; + int HP_skill_can_cloak_post; int HP_skill_enchant_elemental_end_pre; int HP_skill_enchant_elemental_end_post; int HP_skill_not_ok_pre; diff --git a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc index 47a651a49..7cccaeb22 100644 --- a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc @@ -2282,6 +2282,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(skill->autospell, HP_skill_autospell) }, { HP_POP(skill->calc_heal, HP_skill_calc_heal) }, { HP_POP(skill->check_cloaking, HP_skill_check_cloaking) }, + { HP_POP(skill->check_cloaking_end, HP_skill_check_cloaking_end) }, + { HP_POP(skill->can_cloak, HP_skill_can_cloak) }, { HP_POP(skill->enchant_elemental_end, HP_skill_enchant_elemental_end) }, { HP_POP(skill->not_ok, HP_skill_not_ok) }, { HP_POP(skill->not_ok_hom, HP_skill_not_ok_hom) }, diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc index cbd822239..b895527fe 100644 --- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc @@ -60303,6 +60303,66 @@ bool HP_skill_check_cloaking(struct block_list *bl, struct status_change_entry * } return retVal___; } +int HP_skill_check_cloaking_end(struct block_list *bl, va_list p1) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_skill_check_cloaking_end_pre ) { + int (*preHookFunc) (struct block_list *bl, va_list p1); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_cloaking_end_pre; hIndex++ ) { + va_list p1___copy; va_copy(p1___copy, p1); + preHookFunc = HPMHooks.list.HP_skill_check_cloaking_end_pre[hIndex].func; + retVal___ = preHookFunc(bl, p1___copy); + va_end(p1___copy); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list p1___copy; va_copy(p1___copy, p1); + retVal___ = HPMHooks.source.skill.check_cloaking_end(bl, p1___copy); + va_end(p1___copy); + } + if( HPMHooks.count.HP_skill_check_cloaking_end_post ) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list p1); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_cloaking_end_post; hIndex++ ) { + va_list p1___copy; va_copy(p1___copy, p1); + postHookFunc = HPMHooks.list.HP_skill_check_cloaking_end_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, p1___copy); + va_end(p1___copy); + } + } + return retVal___; +} +bool HP_skill_can_cloak(struct map_session_data *sd, struct block_list *bl) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_skill_can_cloak_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, struct block_list *bl); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_can_cloak_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_can_cloak_pre[hIndex].func; + retVal___ = preHookFunc(sd, bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.can_cloak(sd, bl); + } + if( HPMHooks.count.HP_skill_can_cloak_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_can_cloak_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_can_cloak_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, bl); + } + } + return retVal___; +} int HP_skill_enchant_elemental_end(struct block_list *bl, int type) { int hIndex = 0; int retVal___ = 0; |