diff options
author | Haru <haru@dotalux.com> | 2016-09-10 01:04:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-10 01:04:18 +0200 |
commit | 3d4e646d56afbde1e5ca58b7b791df876360092c (patch) | |
tree | da45b4fbeed6a992f135f8e19cc5d1d8638458ed /src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | |
parent | a45a8d92d11acf1f3f2d10853bf60ebb515b84a5 (diff) | |
parent | ce55087fe7389c785515617c0b4c8628adeace53 (diff) | |
download | hercules-3d4e646d56afbde1e5ca58b7b791df876360092c.tar.gz hercules-3d4e646d56afbde1e5ca58b7b791df876360092c.tar.bz2 hercules-3d4e646d56afbde1e5ca58b7b791df876360092c.tar.xz hercules-3d4e646d56afbde1e5ca58b7b791df876360092c.zip |
Merge pull request #1416 from 4144/hpmfix
Add some fixes for HPM
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_map.Hooks.inc')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 819c3b28c..b1bc0ce34 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -70906,6 +70906,87 @@ bool HP_skill_validate_skilldb(struct s_skill_db *skt, const char *source) { } return retVal___; } +int HP_skill_validate_weapontype_sub(const char *type, bool on, struct s_skill_db *sk) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_skill_validate_weapontype_sub_pre ) { + int (*preHookFunc) (const char **type, bool *on, struct s_skill_db **sk); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_weapontype_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_validate_weapontype_sub_pre[hIndex].func; + retVal___ = preHookFunc(&type, &on, &sk); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.validate_weapontype_sub(type, on, sk); + } + if( HPMHooks.count.HP_skill_validate_weapontype_sub_post ) { + int (*postHookFunc) (int retVal___, const char *type, bool on, struct s_skill_db *sk); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_weapontype_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_validate_weapontype_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, type, on, sk); + } + } + return retVal___; +} +int HP_skill_validate_ammotype_sub(const char *type, bool on, struct s_skill_db *sk) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_skill_validate_ammotype_sub_pre ) { + int (*preHookFunc) (const char **type, bool *on, struct s_skill_db **sk); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_ammotype_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_validate_ammotype_sub_pre[hIndex].func; + retVal___ = preHookFunc(&type, &on, &sk); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.validate_ammotype_sub(type, on, sk); + } + if( HPMHooks.count.HP_skill_validate_ammotype_sub_post ) { + int (*postHookFunc) (int retVal___, const char *type, bool on, struct s_skill_db *sk); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_ammotype_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_validate_ammotype_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, type, on, sk); + } + } + return retVal___; +} +int HP_skill_validate_unit_flag_sub(const char *type, bool on, struct s_skill_db *sk) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_skill_validate_unit_flag_sub_pre ) { + int (*preHookFunc) (const char **type, bool *on, struct s_skill_db **sk); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_unit_flag_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_skill_validate_unit_flag_sub_pre[hIndex].func; + retVal___ = preHookFunc(&type, &on, &sk); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.validate_unit_flag_sub(type, on, sk); + } + if( HPMHooks.count.HP_skill_validate_unit_flag_sub_post ) { + int (*postHookFunc) (int retVal___, const char *type, bool on, struct s_skill_db *sk); + for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_unit_flag_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_skill_validate_unit_flag_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, type, on, sk); + } + } + return retVal___; +} bool HP_skill_read_skilldb(const char *filename) { int hIndex = 0; bool retVal___ = false; |