summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHercules.ws <dev@herc.ws>2016-07-09 16:01:09 +0200
committerHerculesWSAPI <dev@herc.ws>2016-07-09 16:01:09 +0200
commitdbb8ff1830c80e4deb2d0ce9ee568ac6059b67d0 (patch)
tree41710d5cb5ff4dd5c059d04fab5826103b442fb3
parent8b60e9dcb652a6d74046dd28c4ba11753ae856ed (diff)
downloadhercules-dbb8ff1830c80e4deb2d0ce9ee568ac6059b67d0.tar.gz
hercules-dbb8ff1830c80e4deb2d0ce9ee568ac6059b67d0.tar.bz2
hercules-dbb8ff1830c80e4deb2d0ce9ee568ac6059b67d0.tar.xz
hercules-dbb8ff1830c80e4deb2d0ce9ee568ac6059b67d0.zip
HPM Hooks Update
Signed-off-by: HerculesWSAPI <dev@herc.ws>
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc46
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc92
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc23
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc473
4 files changed, 530 insertions, 104 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index 07782571d..b02a863e6 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -6356,16 +6356,42 @@ typedef int (*HPMHOOK_pre_skill_unit_timer_sub) (union DBKey *key, struct DBData
typedef int (*HPMHOOK_post_skill_unit_timer_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap);
typedef void (*HPMHOOK_pre_skill_init_unit_layout) (void);
typedef void (*HPMHOOK_post_skill_init_unit_layout) (void);
-typedef bool (*HPMHOOK_pre_skill_parse_row_skilldb) (char **split[], int *columns, int *current);
-typedef bool (*HPMHOOK_post_skill_parse_row_skilldb) (bool retVal___, char *split[], int columns, int current);
-typedef bool (*HPMHOOK_pre_skill_parse_row_requiredb) (char **split[], int *columns, int *current);
-typedef bool (*HPMHOOK_post_skill_parse_row_requiredb) (bool retVal___, char *split[], int columns, int current);
-typedef bool (*HPMHOOK_pre_skill_parse_row_castdb) (char **split[], int *columns, int *current);
-typedef bool (*HPMHOOK_post_skill_parse_row_castdb) (bool retVal___, char *split[], int columns, int current);
-typedef bool (*HPMHOOK_pre_skill_parse_row_castnodexdb) (char **split[], int *columns, int *current);
-typedef bool (*HPMHOOK_post_skill_parse_row_castnodexdb) (bool retVal___, char *split[], int columns, int current);
-typedef bool (*HPMHOOK_pre_skill_parse_row_unitdb) (char **split[], int *columns, int *current);
-typedef bool (*HPMHOOK_post_skill_parse_row_unitdb) (bool retVal___, char *split[], int columns, int current);
+typedef void (*HPMHOOK_pre_skill_validate_hittype) (struct config_setting_t **conf, struct s_skill_db **skill);
+typedef void (*HPMHOOK_post_skill_validate_hittype) (struct config_setting_t *conf, struct s_skill_db *skill);
+typedef void (*HPMHOOK_pre_skill_validate_skilltype) (struct config_setting_t **conf, struct s_skill_db **skill);
+typedef void (*HPMHOOK_post_skill_validate_skilltype) (struct config_setting_t *conf, struct s_skill_db *skill);
+typedef void (*HPMHOOK_pre_skill_validate_attacktype) (struct config_setting_t **conf, struct s_skill_db **skill);
+typedef void (*HPMHOOK_post_skill_validate_attacktype) (struct config_setting_t *conf, struct s_skill_db *skill);
+typedef void (*HPMHOOK_pre_skill_validate_element) (struct config_setting_t **conf, struct s_skill_db **skill);
+typedef void (*HPMHOOK_post_skill_validate_element) (struct config_setting_t *conf, struct s_skill_db *skill);
+typedef void (*HPMHOOK_pre_skill_validate_skillinfo) (struct config_setting_t **conf, struct s_skill_db **skill);
+typedef void (*HPMHOOK_post_skill_validate_skillinfo) (struct config_setting_t *conf, struct s_skill_db *skill);
+typedef void (*HPMHOOK_pre_skill_validate_damagetype) (struct config_setting_t **conf, struct s_skill_db **skill);
+typedef void (*HPMHOOK_post_skill_validate_damagetype) (struct config_setting_t *conf, struct s_skill_db *skill);
+typedef void (*HPMHOOK_pre_skill_validate_castnodex) (struct config_setting_t **conf, struct s_skill_db **skill, bool *delay);
+typedef void (*HPMHOOK_post_skill_validate_castnodex) (struct config_setting_t *conf, struct s_skill_db *skill, bool delay);
+typedef void (*HPMHOOK_pre_skill_validate_weapontype) (struct config_setting_t **conf, struct s_skill_db **skill);
+typedef void (*HPMHOOK_post_skill_validate_weapontype) (struct config_setting_t *conf, struct s_skill_db *skill);
+typedef void (*HPMHOOK_pre_skill_validate_ammotype) (struct config_setting_t **conf, struct s_skill_db **skill);
+typedef void (*HPMHOOK_post_skill_validate_ammotype) (struct config_setting_t *conf, struct s_skill_db *skill);
+typedef void (*HPMHOOK_pre_skill_validate_state) (struct config_setting_t **conf, struct s_skill_db **skill);
+typedef void (*HPMHOOK_post_skill_validate_state) (struct config_setting_t *conf, struct s_skill_db *skill);
+typedef void (*HPMHOOK_pre_skill_validate_item_requirements) (struct config_setting_t **conf, struct s_skill_db **skill);
+typedef void (*HPMHOOK_post_skill_validate_item_requirements) (struct config_setting_t *conf, struct s_skill_db *skill);
+typedef void (*HPMHOOK_pre_skill_validate_unit_target) (struct config_setting_t **conf, struct s_skill_db **skill);
+typedef void (*HPMHOOK_post_skill_validate_unit_target) (struct config_setting_t *conf, struct s_skill_db *skill);
+typedef void (*HPMHOOK_pre_skill_validate_unit_flag) (struct config_setting_t **conf, struct s_skill_db **skill);
+typedef void (*HPMHOOK_post_skill_validate_unit_flag) (struct config_setting_t *conf, struct s_skill_db *skill);
+typedef void (*HPMHOOK_pre_skill_validate_additional_fields) (struct config_setting_t **conf, struct s_skill_db **skill);
+typedef void (*HPMHOOK_post_skill_validate_additional_fields) (struct config_setting_t *conf, struct s_skill_db *skill);
+typedef bool (*HPMHOOK_pre_skill_validate_skilldb) (struct s_skill_db **skt, const char **source);
+typedef bool (*HPMHOOK_post_skill_validate_skilldb) (bool retVal___, struct s_skill_db *skt, const char *source);
+typedef bool (*HPMHOOK_pre_skill_read_skilldb) (const char **filename);
+typedef bool (*HPMHOOK_post_skill_read_skilldb) (bool retVal___, const char *filename);
+typedef void (*HPMHOOK_pre_skill_config_set_level) (struct config_setting_t **conf, int **arr);
+typedef void (*HPMHOOK_post_skill_config_set_level) (struct config_setting_t *conf, int *arr);
+typedef void (*HPMHOOK_pre_skill_level_set_value) (int **arr, int *value);
+typedef void (*HPMHOOK_post_skill_level_set_value) (int *arr, int value);
typedef bool (*HPMHOOK_pre_skill_parse_row_producedb) (char **split[], int *columns, int *current);
typedef bool (*HPMHOOK_post_skill_parse_row_producedb) (bool retVal___, char *split[], int columns, int current);
typedef bool (*HPMHOOK_pre_skill_parse_row_createarrowdb) (char **split[], int *columns, int *current);
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index 0b224127e..676d77493 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -5186,16 +5186,42 @@ struct {
struct HPMHookPoint *HP_skill_unit_timer_sub_post;
struct HPMHookPoint *HP_skill_init_unit_layout_pre;
struct HPMHookPoint *HP_skill_init_unit_layout_post;
- struct HPMHookPoint *HP_skill_parse_row_skilldb_pre;
- struct HPMHookPoint *HP_skill_parse_row_skilldb_post;
- struct HPMHookPoint *HP_skill_parse_row_requiredb_pre;
- struct HPMHookPoint *HP_skill_parse_row_requiredb_post;
- struct HPMHookPoint *HP_skill_parse_row_castdb_pre;
- struct HPMHookPoint *HP_skill_parse_row_castdb_post;
- struct HPMHookPoint *HP_skill_parse_row_castnodexdb_pre;
- struct HPMHookPoint *HP_skill_parse_row_castnodexdb_post;
- struct HPMHookPoint *HP_skill_parse_row_unitdb_pre;
- struct HPMHookPoint *HP_skill_parse_row_unitdb_post;
+ struct HPMHookPoint *HP_skill_validate_hittype_pre;
+ struct HPMHookPoint *HP_skill_validate_hittype_post;
+ struct HPMHookPoint *HP_skill_validate_skilltype_pre;
+ struct HPMHookPoint *HP_skill_validate_skilltype_post;
+ struct HPMHookPoint *HP_skill_validate_attacktype_pre;
+ struct HPMHookPoint *HP_skill_validate_attacktype_post;
+ struct HPMHookPoint *HP_skill_validate_element_pre;
+ struct HPMHookPoint *HP_skill_validate_element_post;
+ struct HPMHookPoint *HP_skill_validate_skillinfo_pre;
+ struct HPMHookPoint *HP_skill_validate_skillinfo_post;
+ struct HPMHookPoint *HP_skill_validate_damagetype_pre;
+ struct HPMHookPoint *HP_skill_validate_damagetype_post;
+ struct HPMHookPoint *HP_skill_validate_castnodex_pre;
+ struct HPMHookPoint *HP_skill_validate_castnodex_post;
+ struct HPMHookPoint *HP_skill_validate_weapontype_pre;
+ struct HPMHookPoint *HP_skill_validate_weapontype_post;
+ struct HPMHookPoint *HP_skill_validate_ammotype_pre;
+ struct HPMHookPoint *HP_skill_validate_ammotype_post;
+ struct HPMHookPoint *HP_skill_validate_state_pre;
+ struct HPMHookPoint *HP_skill_validate_state_post;
+ struct HPMHookPoint *HP_skill_validate_item_requirements_pre;
+ struct HPMHookPoint *HP_skill_validate_item_requirements_post;
+ struct HPMHookPoint *HP_skill_validate_unit_target_pre;
+ struct HPMHookPoint *HP_skill_validate_unit_target_post;
+ struct HPMHookPoint *HP_skill_validate_unit_flag_pre;
+ struct HPMHookPoint *HP_skill_validate_unit_flag_post;
+ struct HPMHookPoint *HP_skill_validate_additional_fields_pre;
+ struct HPMHookPoint *HP_skill_validate_additional_fields_post;
+ struct HPMHookPoint *HP_skill_validate_skilldb_pre;
+ struct HPMHookPoint *HP_skill_validate_skilldb_post;
+ struct HPMHookPoint *HP_skill_read_skilldb_pre;
+ struct HPMHookPoint *HP_skill_read_skilldb_post;
+ struct HPMHookPoint *HP_skill_config_set_level_pre;
+ struct HPMHookPoint *HP_skill_config_set_level_post;
+ struct HPMHookPoint *HP_skill_level_set_value_pre;
+ struct HPMHookPoint *HP_skill_level_set_value_post;
struct HPMHookPoint *HP_skill_parse_row_producedb_pre;
struct HPMHookPoint *HP_skill_parse_row_producedb_post;
struct HPMHookPoint *HP_skill_parse_row_createarrowdb_pre;
@@ -11113,16 +11139,42 @@ struct {
int HP_skill_unit_timer_sub_post;
int HP_skill_init_unit_layout_pre;
int HP_skill_init_unit_layout_post;
- int HP_skill_parse_row_skilldb_pre;
- int HP_skill_parse_row_skilldb_post;
- int HP_skill_parse_row_requiredb_pre;
- int HP_skill_parse_row_requiredb_post;
- int HP_skill_parse_row_castdb_pre;
- int HP_skill_parse_row_castdb_post;
- int HP_skill_parse_row_castnodexdb_pre;
- int HP_skill_parse_row_castnodexdb_post;
- int HP_skill_parse_row_unitdb_pre;
- int HP_skill_parse_row_unitdb_post;
+ int HP_skill_validate_hittype_pre;
+ int HP_skill_validate_hittype_post;
+ int HP_skill_validate_skilltype_pre;
+ int HP_skill_validate_skilltype_post;
+ int HP_skill_validate_attacktype_pre;
+ int HP_skill_validate_attacktype_post;
+ int HP_skill_validate_element_pre;
+ int HP_skill_validate_element_post;
+ int HP_skill_validate_skillinfo_pre;
+ int HP_skill_validate_skillinfo_post;
+ int HP_skill_validate_damagetype_pre;
+ int HP_skill_validate_damagetype_post;
+ int HP_skill_validate_castnodex_pre;
+ int HP_skill_validate_castnodex_post;
+ int HP_skill_validate_weapontype_pre;
+ int HP_skill_validate_weapontype_post;
+ int HP_skill_validate_ammotype_pre;
+ int HP_skill_validate_ammotype_post;
+ int HP_skill_validate_state_pre;
+ int HP_skill_validate_state_post;
+ int HP_skill_validate_item_requirements_pre;
+ int HP_skill_validate_item_requirements_post;
+ int HP_skill_validate_unit_target_pre;
+ int HP_skill_validate_unit_target_post;
+ int HP_skill_validate_unit_flag_pre;
+ int HP_skill_validate_unit_flag_post;
+ int HP_skill_validate_additional_fields_pre;
+ int HP_skill_validate_additional_fields_post;
+ int HP_skill_validate_skilldb_pre;
+ int HP_skill_validate_skilldb_post;
+ int HP_skill_read_skilldb_pre;
+ int HP_skill_read_skilldb_post;
+ int HP_skill_config_set_level_pre;
+ int HP_skill_config_set_level_post;
+ int HP_skill_level_set_value_pre;
+ int HP_skill_level_set_value_post;
int HP_skill_parse_row_producedb_pre;
int HP_skill_parse_row_producedb_post;
int HP_skill_parse_row_createarrowdb_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index cc3f9f303..089bfb0ac 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -2652,11 +2652,24 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(skill->unit_timer, HP_skill_unit_timer) },
{ HP_POP(skill->unit_timer_sub, HP_skill_unit_timer_sub) },
{ HP_POP(skill->init_unit_layout, HP_skill_init_unit_layout) },
- { HP_POP(skill->parse_row_skilldb, HP_skill_parse_row_skilldb) },
- { HP_POP(skill->parse_row_requiredb, HP_skill_parse_row_requiredb) },
- { HP_POP(skill->parse_row_castdb, HP_skill_parse_row_castdb) },
- { HP_POP(skill->parse_row_castnodexdb, HP_skill_parse_row_castnodexdb) },
- { HP_POP(skill->parse_row_unitdb, HP_skill_parse_row_unitdb) },
+ { HP_POP(skill->validate_hittype, HP_skill_validate_hittype) },
+ { HP_POP(skill->validate_skilltype, HP_skill_validate_skilltype) },
+ { HP_POP(skill->validate_attacktype, HP_skill_validate_attacktype) },
+ { HP_POP(skill->validate_element, HP_skill_validate_element) },
+ { HP_POP(skill->validate_skillinfo, HP_skill_validate_skillinfo) },
+ { HP_POP(skill->validate_damagetype, HP_skill_validate_damagetype) },
+ { HP_POP(skill->validate_castnodex, HP_skill_validate_castnodex) },
+ { HP_POP(skill->validate_weapontype, HP_skill_validate_weapontype) },
+ { HP_POP(skill->validate_ammotype, HP_skill_validate_ammotype) },
+ { HP_POP(skill->validate_state, HP_skill_validate_state) },
+ { HP_POP(skill->validate_item_requirements, HP_skill_validate_item_requirements) },
+ { HP_POP(skill->validate_unit_target, HP_skill_validate_unit_target) },
+ { HP_POP(skill->validate_unit_flag, HP_skill_validate_unit_flag) },
+ { HP_POP(skill->validate_additional_fields, HP_skill_validate_additional_fields) },
+ { HP_POP(skill->validate_skilldb, HP_skill_validate_skilldb) },
+ { HP_POP(skill->read_skilldb, HP_skill_read_skilldb) },
+ { HP_POP(skill->config_set_level, HP_skill_config_set_level) },
+ { HP_POP(skill->level_set_value, HP_skill_level_set_value) },
{ HP_POP(skill->parse_row_producedb, HP_skill_parse_row_producedb) },
{ HP_POP(skill->parse_row_createarrowdb, HP_skill_parse_row_createarrowdb) },
{ HP_POP(skill->parse_row_abradb, HP_skill_parse_row_abradb) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 14b724f63..f7d0bfcf0 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -69450,96 +69450,379 @@ void HP_skill_init_unit_layout(void) {
}
return;
}
-bool HP_skill_parse_row_skilldb(char *split[], int columns, int current) {
+void HP_skill_validate_hittype(struct config_setting_t *conf, struct s_skill_db *skill) {
int hIndex = 0;
- bool retVal___ = false;
- if( HPMHooks.count.HP_skill_parse_row_skilldb_pre ) {
- bool (*preHookFunc) (char **split[], int *columns, int *current);
+ if( HPMHooks.count.HP_skill_validate_hittype_pre ) {
+ void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **skill);
*HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_skilldb_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_skill_parse_row_skilldb_pre[hIndex].func;
- retVal___ = preHookFunc(&split, &columns, &current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_hittype_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_validate_hittype_pre[hIndex].func;
+ preHookFunc(&conf, &skill);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
- return retVal___;
+ return;
}
}
{
- retVal___ = HPMHooks.source.skill.parse_row_skilldb(split, columns, current);
+ HPMHooks.source.skill.validate_hittype(conf, skill);
}
- if( HPMHooks.count.HP_skill_parse_row_skilldb_post ) {
- bool (*postHookFunc) (bool retVal___, char *split[], int columns, int current);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_skilldb_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_skill_parse_row_skilldb_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, split, columns, current);
+ if( HPMHooks.count.HP_skill_validate_hittype_post ) {
+ void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *skill);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_hittype_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_validate_hittype_post[hIndex].func;
+ postHookFunc(conf, skill);
}
}
- return retVal___;
+ return;
}
-bool HP_skill_parse_row_requiredb(char *split[], int columns, int current) {
+void HP_skill_validate_skilltype(struct config_setting_t *conf, struct s_skill_db *skill) {
int hIndex = 0;
- bool retVal___ = false;
- if( HPMHooks.count.HP_skill_parse_row_requiredb_pre ) {
- bool (*preHookFunc) (char **split[], int *columns, int *current);
+ if( HPMHooks.count.HP_skill_validate_skilltype_pre ) {
+ void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **skill);
*HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_requiredb_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_skill_parse_row_requiredb_pre[hIndex].func;
- retVal___ = preHookFunc(&split, &columns, &current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_skilltype_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_validate_skilltype_pre[hIndex].func;
+ preHookFunc(&conf, &skill);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
- return retVal___;
+ return;
}
}
{
- retVal___ = HPMHooks.source.skill.parse_row_requiredb(split, columns, current);
+ HPMHooks.source.skill.validate_skilltype(conf, skill);
}
- if( HPMHooks.count.HP_skill_parse_row_requiredb_post ) {
- bool (*postHookFunc) (bool retVal___, char *split[], int columns, int current);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_requiredb_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_skill_parse_row_requiredb_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, split, columns, current);
+ if( HPMHooks.count.HP_skill_validate_skilltype_post ) {
+ void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *skill);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_skilltype_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_validate_skilltype_post[hIndex].func;
+ postHookFunc(conf, skill);
}
}
- return retVal___;
+ return;
}
-bool HP_skill_parse_row_castdb(char *split[], int columns, int current) {
+void HP_skill_validate_attacktype(struct config_setting_t *conf, struct s_skill_db *skill) {
int hIndex = 0;
- bool retVal___ = false;
- if( HPMHooks.count.HP_skill_parse_row_castdb_pre ) {
- bool (*preHookFunc) (char **split[], int *columns, int *current);
+ if( HPMHooks.count.HP_skill_validate_attacktype_pre ) {
+ void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **skill);
*HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_castdb_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_skill_parse_row_castdb_pre[hIndex].func;
- retVal___ = preHookFunc(&split, &columns, &current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_attacktype_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_validate_attacktype_pre[hIndex].func;
+ preHookFunc(&conf, &skill);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
- return retVal___;
+ return;
}
}
{
- retVal___ = HPMHooks.source.skill.parse_row_castdb(split, columns, current);
+ HPMHooks.source.skill.validate_attacktype(conf, skill);
}
- if( HPMHooks.count.HP_skill_parse_row_castdb_post ) {
- bool (*postHookFunc) (bool retVal___, char *split[], int columns, int current);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_castdb_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_skill_parse_row_castdb_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, split, columns, current);
+ if( HPMHooks.count.HP_skill_validate_attacktype_post ) {
+ void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *skill);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_attacktype_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_validate_attacktype_post[hIndex].func;
+ postHookFunc(conf, skill);
}
}
- return retVal___;
+ return;
+}
+void HP_skill_validate_element(struct config_setting_t *conf, struct s_skill_db *skill) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_skill_validate_element_pre ) {
+ void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **skill);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_element_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_validate_element_pre[hIndex].func;
+ preHookFunc(&conf, &skill);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.skill.validate_element(conf, skill);
+ }
+ if( HPMHooks.count.HP_skill_validate_element_post ) {
+ void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *skill);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_element_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_validate_element_post[hIndex].func;
+ postHookFunc(conf, skill);
+ }
+ }
+ return;
+}
+void HP_skill_validate_skillinfo(struct config_setting_t *conf, struct s_skill_db *skill) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_skill_validate_skillinfo_pre ) {
+ void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **skill);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_skillinfo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_validate_skillinfo_pre[hIndex].func;
+ preHookFunc(&conf, &skill);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.skill.validate_skillinfo(conf, skill);
+ }
+ if( HPMHooks.count.HP_skill_validate_skillinfo_post ) {
+ void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *skill);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_skillinfo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_validate_skillinfo_post[hIndex].func;
+ postHookFunc(conf, skill);
+ }
+ }
+ return;
}
-bool HP_skill_parse_row_castnodexdb(char *split[], int columns, int current) {
+void HP_skill_validate_damagetype(struct config_setting_t *conf, struct s_skill_db *skill) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_skill_validate_damagetype_pre ) {
+ void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **skill);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_damagetype_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_validate_damagetype_pre[hIndex].func;
+ preHookFunc(&conf, &skill);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.skill.validate_damagetype(conf, skill);
+ }
+ if( HPMHooks.count.HP_skill_validate_damagetype_post ) {
+ void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *skill);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_damagetype_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_validate_damagetype_post[hIndex].func;
+ postHookFunc(conf, skill);
+ }
+ }
+ return;
+}
+void HP_skill_validate_castnodex(struct config_setting_t *conf, struct s_skill_db *skill, bool delay) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_skill_validate_castnodex_pre ) {
+ void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **skill, bool *delay);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_castnodex_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_validate_castnodex_pre[hIndex].func;
+ preHookFunc(&conf, &skill, &delay);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.skill.validate_castnodex(conf, skill, delay);
+ }
+ if( HPMHooks.count.HP_skill_validate_castnodex_post ) {
+ void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *skill, bool delay);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_castnodex_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_validate_castnodex_post[hIndex].func;
+ postHookFunc(conf, skill, delay);
+ }
+ }
+ return;
+}
+void HP_skill_validate_weapontype(struct config_setting_t *conf, struct s_skill_db *skill) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_skill_validate_weapontype_pre ) {
+ void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **skill);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_weapontype_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_validate_weapontype_pre[hIndex].func;
+ preHookFunc(&conf, &skill);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.skill.validate_weapontype(conf, skill);
+ }
+ if( HPMHooks.count.HP_skill_validate_weapontype_post ) {
+ void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *skill);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_weapontype_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_validate_weapontype_post[hIndex].func;
+ postHookFunc(conf, skill);
+ }
+ }
+ return;
+}
+void HP_skill_validate_ammotype(struct config_setting_t *conf, struct s_skill_db *skill) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_skill_validate_ammotype_pre ) {
+ void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **skill);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_ammotype_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_validate_ammotype_pre[hIndex].func;
+ preHookFunc(&conf, &skill);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.skill.validate_ammotype(conf, skill);
+ }
+ if( HPMHooks.count.HP_skill_validate_ammotype_post ) {
+ void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *skill);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_ammotype_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_validate_ammotype_post[hIndex].func;
+ postHookFunc(conf, skill);
+ }
+ }
+ return;
+}
+void HP_skill_validate_state(struct config_setting_t *conf, struct s_skill_db *skill) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_skill_validate_state_pre ) {
+ void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **skill);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_state_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_validate_state_pre[hIndex].func;
+ preHookFunc(&conf, &skill);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.skill.validate_state(conf, skill);
+ }
+ if( HPMHooks.count.HP_skill_validate_state_post ) {
+ void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *skill);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_state_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_validate_state_post[hIndex].func;
+ postHookFunc(conf, skill);
+ }
+ }
+ return;
+}
+void HP_skill_validate_item_requirements(struct config_setting_t *conf, struct s_skill_db *skill) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_skill_validate_item_requirements_pre ) {
+ void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **skill);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_item_requirements_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_validate_item_requirements_pre[hIndex].func;
+ preHookFunc(&conf, &skill);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.skill.validate_item_requirements(conf, skill);
+ }
+ if( HPMHooks.count.HP_skill_validate_item_requirements_post ) {
+ void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *skill);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_item_requirements_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_validate_item_requirements_post[hIndex].func;
+ postHookFunc(conf, skill);
+ }
+ }
+ return;
+}
+void HP_skill_validate_unit_target(struct config_setting_t *conf, struct s_skill_db *skill) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_skill_validate_unit_target_pre ) {
+ void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **skill);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_unit_target_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_validate_unit_target_pre[hIndex].func;
+ preHookFunc(&conf, &skill);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.skill.validate_unit_target(conf, skill);
+ }
+ if( HPMHooks.count.HP_skill_validate_unit_target_post ) {
+ void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *skill);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_unit_target_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_validate_unit_target_post[hIndex].func;
+ postHookFunc(conf, skill);
+ }
+ }
+ return;
+}
+void HP_skill_validate_unit_flag(struct config_setting_t *conf, struct s_skill_db *skill) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_skill_validate_unit_flag_pre ) {
+ void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **skill);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_unit_flag_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_validate_unit_flag_pre[hIndex].func;
+ preHookFunc(&conf, &skill);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.skill.validate_unit_flag(conf, skill);
+ }
+ if( HPMHooks.count.HP_skill_validate_unit_flag_post ) {
+ void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *skill);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_unit_flag_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_validate_unit_flag_post[hIndex].func;
+ postHookFunc(conf, skill);
+ }
+ }
+ return;
+}
+void HP_skill_validate_additional_fields(struct config_setting_t *conf, struct s_skill_db *skill) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_skill_validate_additional_fields_pre ) {
+ void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **skill);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_additional_fields_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_validate_additional_fields_pre[hIndex].func;
+ preHookFunc(&conf, &skill);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.skill.validate_additional_fields(conf, skill);
+ }
+ if( HPMHooks.count.HP_skill_validate_additional_fields_post ) {
+ void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *skill);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_additional_fields_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_validate_additional_fields_post[hIndex].func;
+ postHookFunc(conf, skill);
+ }
+ }
+ return;
+}
+bool HP_skill_validate_skilldb(struct s_skill_db *skt, const char *source) {
int hIndex = 0;
bool retVal___ = false;
- if( HPMHooks.count.HP_skill_parse_row_castnodexdb_pre ) {
- bool (*preHookFunc) (char **split[], int *columns, int *current);
+ if( HPMHooks.count.HP_skill_validate_skilldb_pre ) {
+ bool (*preHookFunc) (struct s_skill_db **skt, const char **source);
*HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_castnodexdb_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_skill_parse_row_castnodexdb_pre[hIndex].func;
- retVal___ = preHookFunc(&split, &columns, &current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_skilldb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_validate_skilldb_pre[hIndex].func;
+ retVal___ = preHookFunc(&skt, &source);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -69547,26 +69830,26 @@ bool HP_skill_parse_row_castnodexdb(char *split[], int columns, int current) {
}
}
{
- retVal___ = HPMHooks.source.skill.parse_row_castnodexdb(split, columns, current);
+ retVal___ = HPMHooks.source.skill.validate_skilldb(skt, source);
}
- if( HPMHooks.count.HP_skill_parse_row_castnodexdb_post ) {
- bool (*postHookFunc) (bool retVal___, char *split[], int columns, int current);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_castnodexdb_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_skill_parse_row_castnodexdb_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, split, columns, current);
+ if( HPMHooks.count.HP_skill_validate_skilldb_post ) {
+ bool (*postHookFunc) (bool retVal___, struct s_skill_db *skt, const char *source);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_skilldb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_validate_skilldb_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, skt, source);
}
}
return retVal___;
}
-bool HP_skill_parse_row_unitdb(char *split[], int columns, int current) {
+bool HP_skill_read_skilldb(const char *filename) {
int hIndex = 0;
bool retVal___ = false;
- if( HPMHooks.count.HP_skill_parse_row_unitdb_pre ) {
- bool (*preHookFunc) (char **split[], int *columns, int *current);
+ if( HPMHooks.count.HP_skill_read_skilldb_pre ) {
+ bool (*preHookFunc) (const char **filename);
*HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_unitdb_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_skill_parse_row_unitdb_pre[hIndex].func;
- retVal___ = preHookFunc(&split, &columns, &current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_read_skilldb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_read_skilldb_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -69574,17 +69857,69 @@ bool HP_skill_parse_row_unitdb(char *split[], int columns, int current) {
}
}
{
- retVal___ = HPMHooks.source.skill.parse_row_unitdb(split, columns, current);
+ retVal___ = HPMHooks.source.skill.read_skilldb(filename);
}
- if( HPMHooks.count.HP_skill_parse_row_unitdb_post ) {
- bool (*postHookFunc) (bool retVal___, char *split[], int columns, int current);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_unitdb_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_skill_parse_row_unitdb_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, split, columns, current);
+ if( HPMHooks.count.HP_skill_read_skilldb_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *filename);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_read_skilldb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_read_skilldb_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename);
}
}
return retVal___;
}
+void HP_skill_config_set_level(struct config_setting_t *conf, int *arr) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_skill_config_set_level_pre ) {
+ void (*preHookFunc) (struct config_setting_t **conf, int **arr);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_config_set_level_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_config_set_level_pre[hIndex].func;
+ preHookFunc(&conf, &arr);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.skill.config_set_level(conf, arr);
+ }
+ if( HPMHooks.count.HP_skill_config_set_level_post ) {
+ void (*postHookFunc) (struct config_setting_t *conf, int *arr);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_config_set_level_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_config_set_level_post[hIndex].func;
+ postHookFunc(conf, arr);
+ }
+ }
+ return;
+}
+void HP_skill_level_set_value(int *arr, int value) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_skill_level_set_value_pre ) {
+ void (*preHookFunc) (int **arr, int *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_level_set_value_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_level_set_value_pre[hIndex].func;
+ preHookFunc(&arr, &value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.skill.level_set_value(arr, value);
+ }
+ if( HPMHooks.count.HP_skill_level_set_value_post ) {
+ void (*postHookFunc) (int *arr, int value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_level_set_value_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_level_set_value_post[hIndex].func;
+ postHookFunc(arr, value);
+ }
+ }
+ return;
+}
bool HP_skill_parse_row_producedb(char *split[], int columns, int current) {
int hIndex = 0;
bool retVal___ = false;