From f102c913b2aa093ef40c7846e25850ebb1106d71 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 12 Dec 2015 21:44:27 +0200 Subject: - Fixed #723 now it's possible to retrieve Battle Config Settings from plugins into scripts - Fixed Possible Crash when null parse function pointer passed to HPMi->addConf - Now it's possible to use same parse function for all config entries - Now Battle Config entries must have a return function --- src/common/HPM.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/common/HPM.h') diff --git a/src/common/HPM.h b/src/common/HPM.h index 5420e5300..bcf831d0e 100644 --- a/src/common/HPM.h +++ b/src/common/HPM.h @@ -101,7 +101,8 @@ struct HPMFileNameCache { struct HPConfListenStorage { unsigned int pluginID; char key[HPM_ADDCONF_LENGTH]; - void (*func) (const char *val); + void (*parse_func) (const char *key, const char *val); + int (*return_func) (const char *key); }; /* Hercules Plugin Manager Interface */ @@ -145,6 +146,7 @@ struct HPM_interface { bool (*addhook_sub) (enum HPluginHookType type, const char *target, void *hook, unsigned int pID); /* for custom config parsing */ bool (*parseConf) (const char *w1, const char *w2, enum HPluginConfType point); + bool (*getBattleConf) (const char* w1, int *value); /* validates plugin data */ bool (*DataCheck) (struct s_HPMDataCheck *src, unsigned int size, int version, char *name); void (*datacheck_init) (const struct s_HPMDataCheck *src, unsigned int length, int version); -- cgit v1.2.3-60-g2f50