summaryrefslogtreecommitdiff
path: root/src/common/HPM.h
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-12-16 20:20:39 -0200
committershennetsind <ind@henn.et>2013-12-16 20:20:39 -0200
commit0e25c604d9f84cbb0a9a737633a8b764c2a9d96f (patch)
tree12fcda5f8c9c24a4833fd4e4bd26e848210c68df /src/common/HPM.h
parentf6daed397dee844234cacd90d395c0b74c404598 (diff)
downloadhercules-0e25c604d9f84cbb0a9a737633a8b764c2a9d96f.tar.gz
hercules-0e25c604d9f84cbb0a9a737633a8b764c2a9d96f.tar.bz2
hercules-0e25c604d9f84cbb0a9a737633a8b764c2a9d96f.tar.xz
hercules-0e25c604d9f84cbb0a9a737633a8b764c2a9d96f.zip
Introducing HPM Support for custom battle confs
Special Thanks to Mhalicot. Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/common/HPM.h')
-rw-r--r--src/common/HPM.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/common/HPM.h b/src/common/HPM.h
index d5a5cbb6a..1f2ba4648 100644
--- a/src/common/HPM.h
+++ b/src/common/HPM.h
@@ -88,6 +88,12 @@ struct HPDataOperationStorage {
void **HPDataSRCPtr;
unsigned int *hdatac;
};
+/* */
+struct HPConfListenStorage {
+ unsigned int pluginID;
+ char key[HPM_ADDCONF_LENGTH];
+ void (*func) (const char *val);
+};
/* Hercules Plugin Manager Interface */
struct HPM_interface {
@@ -108,6 +114,9 @@ struct HPM_interface {
/* plugin file ptr caching */
struct HPMFileNameCache *fnames;
unsigned int fnamec;
+ /* config listen */
+ struct HPConfListenStorage *confs[HPCT_MAX];
+ unsigned int confsc[HPCT_MAX];
/* --command-line */
DBMap *arg_db;
/* funcs */
@@ -135,6 +144,8 @@ struct HPM_interface {
void (*grabHPData) (struct HPDataOperationStorage *ret, enum HPluginDataTypes type, void *ptr);
/* for server-specific HPData e.g. map_session_data */
void (*grabHPDataSub) (struct HPDataOperationStorage *ret, enum HPluginDataTypes type, void *ptr);
+ /* for custom config parsing */
+ bool (*parseConf) (const char *w1, const char *w2, enum HPluginConfType point);
} HPM_s;
struct HPM_interface *HPM;