summaryrefslogtreecommitdiff
path: root/src
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
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')
-rw-r--r--src/common/HPMDataCheck.h121
-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
4 files changed, 154 insertions, 10 deletions
diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h
index a4d94a010..19b079418 100644
--- a/src/common/HPMDataCheck.h
+++ b/src/common/HPMDataCheck.h
@@ -3,14 +3,127 @@
//
// NOTE: This file was auto-generated and should never be manually edited,
// as it will get overwritten.
-
-
#ifndef _HPM_DATA_CHECK_H_
#define _HPM_DATA_CHECK_H_
+
const struct s_HPMDataCheck HPMDataCheck[] = {
- /** PLACEHOLDER - Testing HerculesWS API Bot **/
- { "foo", 0 },
+ #ifdef _COMMON_CONF_H_
+ { "libconfig_interface", sizeof(struct libconfig_interface) },
+ #else
+ #define _COMMON_CONF_H_
+ #endif // _COMMON_CONF_H_
+ #ifdef _COMMON_DB_H_
+ { "DBData", sizeof(struct DBData) },
+ { "DBIterator", sizeof(struct DBIterator) },
+ { "DBMap", sizeof(struct DBMap) },
+ #else
+ #define _COMMON_DB_H_
+ #endif // _COMMON_DB_H_
+ #ifdef _COMMON_DES_H_
+ { "BIT64", sizeof(struct BIT64) },
+ #else
+ #define _COMMON_DES_H_
+ #endif // _COMMON_DES_H_
+ #ifdef _COMMON_ERS_H_
+ { "eri", sizeof(struct eri) },
+ #else
+ #define _COMMON_ERS_H_
+ #endif // _COMMON_ERS_H_
+ #ifdef _COMMON_MAPINDEX_H_
+ { "mapindex_interface", sizeof(struct mapindex_interface) },
+ #else
+ #define _COMMON_MAPINDEX_H_
+ #endif // _COMMON_MAPINDEX_H_
+ #ifdef _COMMON_MMO_H_
+ { "quest", sizeof(struct quest) },
+ #else
+ #define _COMMON_MMO_H_
+ #endif // _COMMON_MMO_H_
+ #ifdef _COMMON_SOCKET_H_
+ { "socket_interface", sizeof(struct socket_interface) },
+ #else
+ #define _COMMON_SOCKET_H_
+ #endif // _COMMON_SOCKET_H_
+ #ifdef _COMMON_STRLIB_H_
+ { "StringBuf", sizeof(struct StringBuf) },
+ { "s_svstate", sizeof(struct s_svstate) },
+ #else
+ #define _COMMON_STRLIB_H_
+ #endif // _COMMON_STRLIB_H_
+ #ifdef _MAP_ATCOMMAND_H_
+ { "AliasInfo", sizeof(struct AliasInfo) },
+ { "atcommand_interface", sizeof(struct atcommand_interface) },
+ #else
+ #define _MAP_ATCOMMAND_H_
+ #endif // _MAP_ATCOMMAND_H_
+ #ifdef _MAP_BATTLE_H_
+ { "Damage", sizeof(struct Damage) },
+ { "battle_interface", sizeof(struct battle_interface) },
+ #else
+ #define _MAP_BATTLE_H_
+ #endif // _MAP_BATTLE_H_
+ #ifdef _MAP_BUYINGSTORE_H_
+ { "buyingstore_interface", sizeof(struct buyingstore_interface) },
+ { "s_buyingstore_item", sizeof(struct s_buyingstore_item) },
+ #else
+ #define _MAP_BUYINGSTORE_H_
+ #endif // _MAP_BUYINGSTORE_H_
+ #ifdef _MAP_CHRIF_H_
+ { "auth_node", sizeof(struct auth_node) },
+ #else
+ #define _MAP_CHRIF_H_
+ #endif // _MAP_CHRIF_H_
+ #ifdef _MAP_CLIF_H_
+ { "clif_interface", sizeof(struct clif_interface) },
+ #else
+ #define _MAP_CLIF_H_
+ #endif // _MAP_CLIF_H_
+ #ifdef _MAP_ELEMENTAL_H_
+ { "elemental_skill", sizeof(struct elemental_skill) },
+ #else
+ #define _MAP_ELEMENTAL_H_
+ #endif // _MAP_ELEMENTAL_H_
+ #ifdef _MAP_GUILD_H_
+ { "eventlist", sizeof(struct eventlist) },
+ #else
+ #define _MAP_GUILD_H_
+ #endif // _MAP_GUILD_H_
+ #ifdef _MAP_MAP_H_
+ { "map_data_other_server", sizeof(struct map_data_other_server) },
+ #else
+ #define _MAP_MAP_H_
+ #endif // _MAP_MAP_H_
+ #ifdef _MAP_PACKETS_STRUCT_H_
+ { "EQUIPSLOTINFO", sizeof(struct EQUIPSLOTINFO) },
+ #else
+ #define _MAP_PACKETS_STRUCT_H_
+ #endif // _MAP_PACKETS_STRUCT_H_
+ #ifdef _MAP_PC_H_
+ { "autotrade_vending", sizeof(struct autotrade_vending) },
+ { "item_cd", sizeof(struct item_cd) },
+ #else
+ #define _MAP_PC_H_
+ #endif // _MAP_PC_H_
+ #ifdef _MAP_SCRIPT_H_
+ { "Script_Config", sizeof(struct Script_Config) },
+ { "script_interface", sizeof(struct script_interface) },
+ #else
+ #define _MAP_SCRIPT_H_
+ #endif // _MAP_SCRIPT_H_
+ #ifdef _MAP_SEARCHSTORE_H_
+ { "searchstore_interface", sizeof(struct searchstore_interface) },
+ #else
+ #define _MAP_SEARCHSTORE_H_
+ #endif // _MAP_SEARCHSTORE_H_
+ #ifdef _MAP_SKILL_H_
+ { "skill_cd", sizeof(struct skill_cd) },
+ { "skill_condition", sizeof(struct skill_condition) },
+ { "skill_interface", sizeof(struct skill_interface) },
+ { "skill_unit_save", sizeof(struct skill_unit_save) },
+ #else
+ #define _MAP_SKILL_H_
+ #endif // _MAP_SKILL_H_
};
unsigned int HPMDataCheckLen = ARRAYLENGTH(HPMDataCheck);
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___;