summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorKenpachi Developer <Kenpachi.Developer@gmx.de>2020-05-15 05:24:03 +0200
committerKenpachi Developer <Kenpachi.Developer@gmx.de>2020-06-01 02:01:53 +0200
commitbcfd69d16f6ccbca90b410def8fb72d129c4e216 (patch)
treea270e15134daf99b9ef71ba9af47e9a953382740 /src/plugins
parent0a2097d8e295a329ad3d0e732fb74e77707dc2bb (diff)
downloadhercules-bcfd69d16f6ccbca90b410def8fb72d129c4e216.tar.gz
hercules-bcfd69d16f6ccbca90b410def8fb72d129c4e216.tar.bz2
hercules-bcfd69d16f6ccbca90b410def8fb72d129c4e216.tar.xz
hercules-bcfd69d16f6ccbca90b410def8fb72d129c4e216.zip
Add defaults, bounds and validations when reading skill DB
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc2
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc4
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc1
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc27
4 files changed, 0 insertions, 34 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index 50e64e53c..ae47330f6 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -7580,8 +7580,6 @@ typedef void (*HPMHOOK_pre_skill_validate_unit_flag) (struct config_setting_t **
typedef void (*HPMHOOK_post_skill_validate_unit_flag) (struct config_setting_t *conf, struct s_skill_db *sk);
typedef void (*HPMHOOK_pre_skill_validate_additional_fields) (struct config_setting_t **conf, struct s_skill_db **sk);
typedef void (*HPMHOOK_post_skill_validate_additional_fields) (struct config_setting_t *conf, struct s_skill_db *sk);
-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 int (*HPMHOOK_pre_skill_validate_weapontype_sub) (const char **type, bool *on, struct s_skill_db **sk);
typedef int (*HPMHOOK_post_skill_validate_weapontype_sub) (int retVal___, const char *type, bool on, struct s_skill_db *sk);
typedef int (*HPMHOOK_pre_skill_validate_ammotype_sub) (const char **type, bool *on, struct s_skill_db **sk);
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index 0c245dee3..77f4dc18c 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -6104,8 +6104,6 @@ struct {
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_validate_weapontype_sub_pre;
struct HPMHookPoint *HP_skill_validate_weapontype_sub_post;
struct HPMHookPoint *HP_skill_validate_ammotype_sub_pre;
@@ -13029,8 +13027,6 @@ struct {
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_validate_weapontype_sub_pre;
int HP_skill_validate_weapontype_sub_post;
int HP_skill_validate_ammotype_sub_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index 2d35608f0..138c69de2 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -3121,7 +3121,6 @@ struct HookingPointData HookingPoints[] = {
{ 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->validate_weapontype_sub, HP_skill_validate_weapontype_sub) },
{ HP_POP(skill->validate_ammotype_sub, HP_skill_validate_ammotype_sub) },
{ HP_POP(skill->validate_unit_flag_sub, HP_skill_validate_unit_flag_sub) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 08d807f1c..f675caba2 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -81604,33 +81604,6 @@ void HP_skill_validate_additional_fields(struct config_setting_t *conf, struct s
}
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_validate_skilldb_pre > 0) {
- bool (*preHookFunc) (struct s_skill_db **skt, const char **source);
- *HPMforce_return = false;
- 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;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.skill.validate_skilldb(skt, source);
- }
- if (HPMHooks.count.HP_skill_validate_skilldb_post > 0) {
- 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___;
-}
int HP_skill_validate_weapontype_sub(const char *type, bool on, struct s_skill_db *sk) {
int hIndex = 0;
int retVal___ = 0;