summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorHercules.ws <Hercules@efficiently.awesome>2014-02-03 18:32:30 +0100
committerHerculesWSAPI <Hercules@efficiently.awesome>2014-02-03 18:32:30 +0100
commitc8c3255fd990ae2f91ed130c0a742bf94037128a (patch)
tree033133f18ede7a4b9a60ceea79bcb695dbabbd7a /src/plugins
parent35e1b99c2d1ecab5fa67b2033c87a90512b5d9aa (diff)
downloadhercules-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')
-rw-r--r--src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc4
-rw-r--r--src/plugins/HPMHooking/HPMHooking.HookingPoints.inc1
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Hooks.inc38
3 files changed, 37 insertions, 6 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
index 3dfa69d4c..1767f103a 100644
--- a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
@@ -3649,6 +3649,8 @@ struct {
struct HPMHookPoint *HP_pc_gets_status_point_post;
struct HPMHookPoint *HP_pc_need_status_point_pre;
struct HPMHookPoint *HP_pc_need_status_point_post;
+ struct HPMHookPoint *HP_pc_maxparameterincrease_pre;
+ struct HPMHookPoint *HP_pc_maxparameterincrease_post;
struct HPMHookPoint *HP_pc_statusup_pre;
struct HPMHookPoint *HP_pc_statusup_post;
struct HPMHookPoint *HP_pc_statusup2_pre;
@@ -8668,6 +8670,8 @@ struct {
int HP_pc_gets_status_point_post;
int HP_pc_need_status_point_pre;
int HP_pc_need_status_point_post;
+ int HP_pc_maxparameterincrease_pre;
+ int HP_pc_maxparameterincrease_post;
int HP_pc_statusup_pre;
int HP_pc_statusup_post;
int HP_pc_statusup2_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
index 0b7201cdc..f47a9cc5d 100644
--- a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
@@ -1855,6 +1855,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(pc->thisjobexp, HP_pc_thisjobexp) },
{ HP_POP(pc->gets_status_point, HP_pc_gets_status_point) },
{ HP_POP(pc->need_status_point, HP_pc_need_status_point) },
+ { HP_POP(pc->maxparameterincrease, HP_pc_maxparameterincrease) },
{ HP_POP(pc->statusup, HP_pc_statusup) },
{ HP_POP(pc->statusup2, HP_pc_statusup2) },
{ HP_POP(pc->skillup, HP_pc_skillup) },
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___;