summaryrefslogtreecommitdiff
path: root/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2018-05-01 18:56:28 +0200
committerGitHub <noreply@github.com>2018-05-01 18:56:28 +0200
commit75930315136d7a6b3ce301d09065e3b0386806e0 (patch)
tree539679fec485b593c54dd2ee4096630232638ed4 /src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
parent24360ce305c85b34d814283be9fe7c70a1eff404 (diff)
parent51da42665a00756ecbeae5e264875c312fd1536d (diff)
downloadhercules-75930315136d7a6b3ce301d09065e3b0386806e0.tar.gz
hercules-75930315136d7a6b3ce301d09065e3b0386806e0.tar.bz2
hercules-75930315136d7a6b3ce301d09065e3b0386806e0.tar.xz
hercules-75930315136d7a6b3ce301d09065e3b0386806e0.zip
Merge pull request #2019 from Asheraf/mskillconf
Convert mob_skill_db into libconf format
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_map.Hooks.inc')
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc108
1 files changed, 81 insertions, 27 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 0d07e26a2..718aa77d7 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -49770,33 +49770,6 @@ void HP_mob_readchatdb(void) {
}
return;
}
-bool HP_mob_parse_row_mobskilldb(char **str, int columns, int current) {
- int hIndex = 0;
- bool retVal___ = false;
- if (HPMHooks.count.HP_mob_parse_row_mobskilldb_pre > 0) {
- bool (*preHookFunc) (char ***str, int *columns, int *current);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_row_mobskilldb_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_mob_parse_row_mobskilldb_pre[hIndex].func;
- retVal___ = preHookFunc(&str, &columns, &current);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.mob.parse_row_mobskilldb(str, columns, current);
- }
- if (HPMHooks.count.HP_mob_parse_row_mobskilldb_post > 0) {
- bool (*postHookFunc) (bool retVal___, char **str, int columns, int current);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_row_mobskilldb_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_mob_parse_row_mobskilldb_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, str, columns, current);
- }
- }
- return retVal___;
-}
void HP_mob_readskilldb(void) {
int hIndex = 0;
if (HPMHooks.count.HP_mob_readskilldb_pre > 0) {
@@ -49955,6 +49928,87 @@ void HP_mob_destroy_mob_db(int index) {
}
return;
}
+bool HP_mob_skill_db_libconfig(const char *filename, bool ignore_missing) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_mob_skill_db_libconfig_pre > 0) {
+ bool (*preHookFunc) (const char **filename, bool *ignore_missing);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_db_libconfig_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_mob_skill_db_libconfig_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &ignore_missing);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.skill_db_libconfig(filename, ignore_missing);
+ }
+ if (HPMHooks.count.HP_mob_skill_db_libconfig_post > 0) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, bool ignore_missing);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_db_libconfig_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_mob_skill_db_libconfig_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, ignore_missing);
+ }
+ }
+ return retVal___;
+}
+bool HP_mob_skill_db_libconfig_sub(struct config_setting_t *it, int n) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_mob_skill_db_libconfig_sub_pre > 0) {
+ bool (*preHookFunc) (struct config_setting_t **it, int *n);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_db_libconfig_sub_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_mob_skill_db_libconfig_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(&it, &n);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.skill_db_libconfig_sub(it, n);
+ }
+ if (HPMHooks.count.HP_mob_skill_db_libconfig_sub_post > 0) {
+ bool (*postHookFunc) (bool retVal___, struct config_setting_t *it, int n);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_db_libconfig_sub_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_mob_skill_db_libconfig_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, it, n);
+ }
+ }
+ return retVal___;
+}
+bool HP_mob_skill_db_libconfig_sub_skill(struct config_setting_t *it, int n, int mob_id) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_mob_skill_db_libconfig_sub_skill_pre > 0) {
+ bool (*preHookFunc) (struct config_setting_t **it, int *n, int *mob_id);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_db_libconfig_sub_skill_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_mob_skill_db_libconfig_sub_skill_pre[hIndex].func;
+ retVal___ = preHookFunc(&it, &n, &mob_id);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.skill_db_libconfig_sub_skill(it, n, mob_id);
+ }
+ if (HPMHooks.count.HP_mob_skill_db_libconfig_sub_skill_post > 0) {
+ bool (*postHookFunc) (bool retVal___, struct config_setting_t *it, int n, int mob_id);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_db_libconfig_sub_skill_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_mob_skill_db_libconfig_sub_skill_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, it, n, mob_id);
+ }
+ }
+ return retVal___;
+}
/* mutex_interface */
struct mutex_data* HP_mutex_create(void) {
int hIndex = 0;