summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-09-03 16:47:05 +0300
committerAndrei Karas <akaras@inbox.ru>2016-09-03 16:47:05 +0300
commita829088c61f04645794bf829a62aa8e3c06a7aa2 (patch)
tree52f0b1bf9ea4a629db8ad5caa58f79cb9e7d70e9 /src/map/skill.c
parent2d4789d60861e498e11aca0f22ebb61014c488f1 (diff)
downloadhercules-a829088c61f04645794bf829a62aa8e3c06a7aa2.tar.gz
hercules-a829088c61f04645794bf829a62aa8e3c06a7aa2.tar.bz2
hercules-a829088c61f04645794bf829a62aa8e3c06a7aa2.tar.xz
hercules-a829088c61f04645794bf829a62aa8e3c06a7aa2.zip
Add some missing functions in skill.c into interface.
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 40001659c..561154bdf 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -19417,7 +19417,7 @@ void skill_validate_castnodex(struct config_setting_t *conf, struct s_skill_db *
* @param *sk struct, pointer to s_skill_db
* @return void
*/
-int skill_validate_weapontype_sub(const char *type, bool on, struct s_skill_db *sk )
+int skill_validate_weapontype_sub(const char *type, bool on, struct s_skill_db *sk)
{
if (strcmpi(type, "NoWeapon") == 0) {
if (on) {
@@ -19628,11 +19628,11 @@ void skill_validate_weapontype(struct config_setting_t *conf, struct s_skill_db
int j = 0;
struct config_setting_t *wpt = NULL;
while ((wpt = libconfig->setting_get_elem(tt, j++)) != NULL) {
- if (skill_validate_weapontype_sub(config_setting_name(wpt), libconfig->setting_get_bool_real(wpt), sk))
+ if (skill->validate_weapontype_sub(config_setting_name(wpt), libconfig->setting_get_bool_real(wpt), sk))
skilldb_invalid_error(config_setting_name(wpt), config_setting_name(tt), sk->nameid);
}
} else if (libconfig->setting_lookup_string(conf, "WeaponTypes", &type)) {
- if (skill_validate_weapontype_sub(type, true, sk))
+ if (skill->validate_weapontype_sub(type, true, sk))
skilldb_invalid_error(type, "WeaponTypes", sk->nameid);
}
}
@@ -19730,11 +19730,11 @@ void skill_validate_ammotype(struct config_setting_t *conf, struct s_skill_db *s
int j = 0;
struct config_setting_t *amt = { 0 };
while ((amt = libconfig->setting_get_elem(tt, j++))) {
- if (skill_validate_ammotype_sub(config_setting_name(amt), libconfig->setting_get_bool_real(amt), sk))
+ if (skill->validate_ammotype_sub(config_setting_name(amt), libconfig->setting_get_bool_real(amt), sk))
skilldb_invalid_error(config_setting_name(amt), config_setting_name(tt), sk->nameid);
}
} else if( libconfig->setting_lookup_string(conf, "AmmoTypes", &tstr)) {
- if (skill_validate_ammotype_sub(tstr, true, sk))
+ if (skill->validate_ammotype_sub(tstr, true, sk))
skilldb_invalid_error(tstr, "AmmoTypes", sk->nameid);
}
}
@@ -19967,7 +19967,7 @@ void skill_validate_unit_flag(struct config_setting_t *conf, struct s_skill_db *
while ((tt = libconfig->setting_get_elem(t, j++))) {
const char *name = config_setting_name(tt);
- if (skill_validate_unit_flag_sub(name, libconfig->setting_get_bool_real(tt), sk))
+ if (skill->validate_unit_flag_sub(name, libconfig->setting_get_bool_real(tt), sk))
skilldb_invalid_error(name, config_setting_name(t), sk->nameid);
}
}
@@ -20605,6 +20605,9 @@ void skill_defaults(void) {
skill->validate_unit_flag = skill_validate_unit_flag;
skill->validate_additional_fields = skill_validate_additional_fields;
skill->validate_skilldb = skill_validate_skilldb;
+ skill->validate_weapontype_sub = skill_validate_weapontype_sub;
+ skill->validate_ammotype_sub = skill_validate_ammotype_sub;
+ skill->validate_unit_flag_sub = skill_validate_unit_flag_sub;
skill->read_skilldb = skill_read_skilldb;
skill->config_set_level = skill_config_set_level;
skill->level_set_value = skill_level_set_value;