diff options
author | Hercules.ws <Hercules@efficiently.awesome> | 2014-02-03 18:32:30 +0100 |
---|---|---|
committer | HerculesWSAPI <Hercules@efficiently.awesome> | 2014-02-03 18:32:30 +0100 |
commit | c8c3255fd990ae2f91ed130c0a742bf94037128a (patch) | |
tree | 033133f18ede7a4b9a60ceea79bcb695dbabbd7a /src/plugins/HPMHooking/HPMHooking.Hooks.inc | |
parent | 35e1b99c2d1ecab5fa67b2033c87a90512b5d9aa (diff) | |
download | hercules-c8c3255fd990ae2f91ed130c0a742bf94037128a.tar.gz hercules-c8c3255fd990ae2f91ed130c0a742bf94037128a.tar.bz2 hercules-c8c3255fd990ae2f91ed130c0a742bf94037128a.tar.xz hercules-c8c3255fd990ae2f91ed130c0a742bf94037128a.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.inc | 38 |
1 files changed, 32 insertions, 6 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc index 4db53868d..9584f4960 100644 --- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc @@ -46994,14 +46994,40 @@ int HP_pc_need_status_point(struct map_session_data *sd, int type, int val) { } return retVal___; } -int HP_pc_statusup(struct map_session_data *sd, int type) { +int HP_pc_maxparameterincrease(struct map_session_data *sd, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_statusup_pre ) { + if( HPMHooks.count.HP_pc_maxparameterincrease_pre ) { int (*preHookFunc) (struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxparameterincrease_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_maxparameterincrease_pre[hIndex].func; + retVal___ = preHookFunc(sd, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.maxparameterincrease(sd, type); + } + if( HPMHooks.count.HP_pc_maxparameterincrease_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxparameterincrease_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_maxparameterincrease_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &type); + } + } + return retVal___; +} +bool HP_pc_statusup(struct map_session_data *sd, int type, int increase) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_pc_statusup_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, int *type, int *increase); for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_statusup_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_pc_statusup_pre[hIndex].func; - retVal___ = preHookFunc(sd, &type); + retVal___ = preHookFunc(sd, &type, &increase); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -47009,13 +47035,13 @@ int HP_pc_statusup(struct map_session_data *sd, int type) { } } { - retVal___ = HPMHooks.source.pc.statusup(sd, type); + retVal___ = HPMHooks.source.pc.statusup(sd, type, increase); } if( HPMHooks.count.HP_pc_statusup_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type); + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *type, int *increase); for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_statusup_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_pc_statusup_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &type); + retVal___ = postHookFunc(retVal___, sd, &type, &increase); } } return retVal___; |